summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-01 14:13:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-01 14:13:28 -0700
commit08be881064da126b8df4b96b0b3e2e307969a4a1 (patch)
tree0b51c465a0700ffc28d5083fa714285e5b894782 /drivers/power
parent0e285e90887bcb248178d55960e1276188c657c9 (diff)
parent52e70c8af7e5d04e3fe431066f0530a17a8147c2 (diff)
downloadlinux-08be881064da126b8df4b96b0b3e2e307969a4a1.tar.bz2
Merge tag 'acpi-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These are some device enumeration code changes, updates of the AC and battery drivers to help them avoid attaching to devices that cannot be handled by them, new operation region driver for the Intel CHT Whiskey Cove PMIC, new sysfs entries for CPPC performance capabilities, a new _REV quirk blacklist entry and a couple of assorted minor fixes and cleanups. Specifics: - Update the core device enumeration code to make it more internally consistent and robust and drop the force_remove sysfs attribute that could be used to tell it to ignore errors on device hot-removal which was dangerous in general and no real and still relevant use cases for it could be found (Rafael Wysocki, Michal Hocko). - Make the core device enumeration code use _PXM to associate platform devices created by it with specific NUMA nodes (Shanker Donthineni). - Extend the CPPC library by adding more sysfs entries for performance capabilities to it and making it use the lowest nonlinear performance parameter (Prashanth Prakash). - Make the CPU online more consistent with CPU initialization in the ACPI processor driver (Prashanth Prakash). - Update the AC and battery drivers to help them avoid attaching to devices that cannot be handled by them and update the axp288_charger power supply driver to work correctly on ACPI systems without the INT3496 device (Hans de Goede). - Add an ACPI operation region driver for the Intel CHT Whiskey Cove PMIC and update the xpower operation region driver to work without IIO which isn't really necessary for it to work (Hans de Goede). - Add a new entry for Dell Inspiron 7537 to the _REV quirk blacklist (Kai Heng Feng). - Make the code in the ACPI video driver easier to follow by adding symbols and comments to it (Dmitry Frank). - Update ACPI documentation and drop a function that has no users from the tables-handling code (Cao jin, Baoquan He)" * tag 'acpi-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PMIC: Stop xpower OPRegion handler relying on IIO ACPI / PMIC: Add opregion driver for Intel CHT Whiskey Cove PMIC ACPI / scan: Avoid enumerating devices more than once ACPI / scan: Apply default enumeration to devices with ACPI drivers 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 / video: add comments about subtle cases ACPI / video: get rid of magic numbers and use enum instead ACPI / doc: linuxized-acpica.txt: fix typos ACPI / blacklist: add _REV quirk for Dell Inspiron 7537 ACPI / tables: Drop acpi_parse_entries() which is not used ACPI / CPPC: add sysfs entries for CPPC perf capabilities ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps() ACPI / platform: Update platform device NUMA node based on _PXM method ACPI / Processor: Drop setup_max_cpus check from acpi_processor_add() ACPI / scan: Drop support for force_remove
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/axp288_charger.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
index 6be2fe27bb07..d51ebd1da65e 100644
--- a/drivers/power/supply/axp288_charger.c
+++ b/drivers/power/supply/axp288_charger.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/regmap.h>
@@ -113,7 +114,8 @@
#define ILIM_3000MA 3000 /* 3000mA */
#define AXP288_EXTCON_DEV_NAME "axp288_extcon"
-#define USB_HOST_EXTCON_DEV_NAME "INT3496:00"
+#define USB_HOST_EXTCON_HID "INT3496"
+#define USB_HOST_EXTCON_NAME "INT3496:00"
static const unsigned int cable_ids[] =
{ EXTCON_CHG_USB_SDP, EXTCON_CHG_USB_CDP, EXTCON_CHG_USB_DCP };
@@ -807,10 +809,14 @@ static int axp288_charger_probe(struct platform_device *pdev)
return -EPROBE_DEFER;
}
- info->otg.cable = extcon_get_extcon_dev(USB_HOST_EXTCON_DEV_NAME);
- if (info->otg.cable == NULL) {
- dev_dbg(dev, "EXTCON_USB_HOST is not ready, probe deferred\n");
- return -EPROBE_DEFER;
+ if (acpi_dev_present(USB_HOST_EXTCON_HID, NULL, -1)) {
+ info->otg.cable = extcon_get_extcon_dev(USB_HOST_EXTCON_NAME);
+ if (info->otg.cable == NULL) {
+ dev_dbg(dev, "EXTCON_USB_HOST is not ready, probe deferred\n");
+ return -EPROBE_DEFER;
+ }
+ dev_info(&pdev->dev,
+ "Using " USB_HOST_EXTCON_HID " extcon for usb-id\n");
}
platform_set_drvdata(pdev, info);
@@ -849,13 +855,15 @@ static int axp288_charger_probe(struct platform_device *pdev)
/* Register for OTG notification */
INIT_WORK(&info->otg.work, axp288_charger_otg_evt_worker);
info->otg.id_nb.notifier_call = axp288_charger_handle_otg_evt;
- ret = devm_extcon_register_notifier(&pdev->dev, info->otg.cable,
+ if (info->otg.cable) {
+ ret = devm_extcon_register_notifier(&pdev->dev, info->otg.cable,
EXTCON_USB_HOST, &info->otg.id_nb);
- if (ret) {
- dev_err(dev, "failed to register EXTCON_USB_HOST notifier\n");
- return ret;
+ if (ret) {
+ dev_err(dev, "failed to register EXTCON_USB_HOST notifier\n");
+ return ret;
+ }
+ schedule_work(&info->otg.work);
}
- schedule_work(&info->otg.work);
/* Register charger interrupts */
for (i = 0; i < CHRG_INTR_END; i++) {