Skip to content

Commit

Permalink
Merge branches 'acpi-power', 'acpi-blacklist', 'acpi-video' and 'acpi…
Browse files Browse the repository at this point in the history
…-doc'

* acpi-power:
  power: supply: axp288_charger: Only wait for INT3496 device if present
  ACPI / AC: Add a blacklist with PMIC ACPI HIDs with a native charger driver
  ACPI / battery: Add a blacklist with PMIC ACPI HIDs with a native battery driver
  ACPI / battery: Fix acpi_battery_exit on acpi_battery_init_async errors
  ACPI / utils: Add new acpi_dev_present helper

* acpi-blacklist:
  ACPI / blacklist: add _REV quirk for Dell Inspiron 7537

* acpi-video:
  ACPI / video: add comments about subtle cases
  ACPI / video: get rid of magic numbers and use enum instead

* acpi-doc:
  ACPI / doc: linuxized-acpica.txt: fix typos
  • Loading branch information
Rafael J. Wysocki committed Apr 28, 2017
5 parents 168f4a6 + 8494206 + 2cff319 + 592c809 + bf4f5bf commit 52e70c8
Showing 9 changed files with 254 additions and 63 deletions.
10 changes: 5 additions & 5 deletions Documentation/acpi/linuxized-acpica.txt
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ upstream.
The homepage of ACPICA project is: www.acpica.org, it is maintained and
supported by Intel Corporation.

The following figure depicts the Linux ACPI subystem where the ACPICA
The following figure depicts the Linux ACPI subsystem where the ACPICA
adaptation is included:

+---------------------------------------------------------+
@@ -110,7 +110,7 @@ upstream.
Linux patches. The patches generated by this process are referred to as
"linuxized ACPICA patches". The release process is carried out on a local
copy the ACPICA git repository. Each commit in the monthly release is
converted into a linuxized ACPICA patch. Together, they form the montly
converted into a linuxized ACPICA patch. Together, they form the monthly
ACPICA release patchset for the Linux ACPI community. This process is
illustrated in the following figure:

@@ -165,7 +165,7 @@ upstream.
<http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git>.

Before the linuxized ACPICA patches are sent to the Linux ACPI community
for review, there is a quality ensurance build test process to reduce
for review, there is a quality assurance build test process to reduce
porting issues. Currently this build process only takes care of the
following kernel configuration options:
CONFIG_ACPI/CONFIG_ACPI_DEBUG/CONFIG_ACPI_DEBUGGER
@@ -195,12 +195,12 @@ upstream.
release utilities (please refer to Section 4 below for the details).
3. Linux specific features - Sometimes it's impossible to use the
current ACPICA APIs to implement features required by the Linux kernel,
so Linux developers occasionaly have to change ACPICA code directly.
so Linux developers occasionally have to change ACPICA code directly.
Those changes may not be acceptable by ACPICA upstream and in such cases
they are left as committed ACPICA divergences unless the ACPICA side can
implement new mechanisms as replacements for them.
4. ACPICA release fixups - ACPICA only tests commits using a set of the
user space simulation utilies, thus the linuxized ACPICA patches may
user space simulation utilities, thus the linuxized ACPICA patches may
break the Linux kernel, leaving us build/boot failures. In order to
avoid breaking Linux bisection, fixes are applied directly to the
linuxized ACPICA patches during the release process. When the release
20 changes: 20 additions & 0 deletions drivers/acpi/ac.c
Original file line number Diff line number Diff line change
@@ -57,12 +57,23 @@ static int acpi_ac_add(struct acpi_device *device);
static int acpi_ac_remove(struct acpi_device *device);
static void acpi_ac_notify(struct acpi_device *device, u32 event);

struct acpi_ac_bl {
const char *hid;
int hrv;
};

static const struct acpi_device_id ac_device_ids[] = {
{"ACPI0003", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, ac_device_ids);

/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
static const struct acpi_ac_bl acpi_ac_blacklist[] = {
{ "INT33F4", -1 }, /* X-Powers AXP288 PMIC */
{ "INT34D3", 3 }, /* Intel Cherrytrail Whiskey Cove PMIC */
};

#ifdef CONFIG_PM_SLEEP
static int acpi_ac_resume(struct device *dev);
#endif
@@ -424,11 +435,20 @@ static int acpi_ac_remove(struct acpi_device *device)

static int __init acpi_ac_init(void)
{
unsigned int i;
int result;

if (acpi_disabled)
return -ENODEV;

for (i = 0; i < ARRAY_SIZE(acpi_ac_blacklist); i++)
if (acpi_dev_present(acpi_ac_blacklist[i].hid, "1",
acpi_ac_blacklist[i].hrv)) {
pr_info(PREFIX "AC: found native %s PMIC, not loading\n",
acpi_ac_blacklist[i].hid);
return -ENODEV;
}

#ifdef CONFIG_ACPI_PROCFS_POWER
acpi_ac_dir = acpi_lock_ac_dir();
if (!acpi_ac_dir)
Loading

0 comments on commit 52e70c8

Please sign in to comment.