On some systems with an axp288 PMIC the dsdt exports a non functional (*) ACPI AC device (ACPI0003 device), which results in a Mains power_supply which reports itself as being always online. This commit calls acpi_ac_unregister() after successfully registering the axp288_charger power_supply to remove the broken Mains power_supply. *) It depends on a vendor specific BMOP ACPI opregion we do not implement Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- drivers/power/supply/Kconfig | 2 ++ drivers/power/supply/axp288_charger.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig index ae8363b..fe53edd 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig @@ -235,6 +235,8 @@ config CHARGER_AXP20X config AXP288_CHARGER tristate "X-Powers AXP288 Charger" depends on MFD_AXP20X && EXTCON_AXP288 + # if ACPI_AC=m, this can't be 'y' + depends on ACPI_AC || !ACPI_AC help Say yes here to have support X-Power AXP288 power management IC (PMIC) integrated charger. diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c index 5037d98..b3b5680 100644 --- a/drivers/power/supply/axp288_charger.c +++ b/drivers/power/supply/axp288_charger.c @@ -23,6 +23,7 @@ #include <linux/platform_device.h> #include <linux/usb/otg.h> #include <linux/notifier.h> +#include <linux/power/acpi.h> #include <linux/power_supply.h> #include <linux/property.h> #include <linux/mfd/axp20x.h> @@ -882,6 +883,7 @@ static int axp288_charger_probe(struct platform_device *pdev) } } + acpi_ac_unregister(); return 0; } -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html