Bug 67821
Summary: | No ac_adapter notifications, even after acpi -a | ||
---|---|---|---|
Product: | ACPI | Reporter: | Aleksandr Mezin (mezin.alexander) |
Component: | Power-Battery | Assignee: | acpi_power-battery |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | alan, tianyu.lan |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.13-rc5 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: | acpidump output |
Description
Aleksandr Mezin
2013-12-27 19:18:44 UTC
With this patch things, at least, become as they were before 3.13 diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 8711e37..3c2e4aa 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -207,7 +207,7 @@ static int acpi_ac_probe(struct platform_device *pdev) goto end; result = acpi_install_notify_handler(ACPI_HANDLE(&pdev->dev), - ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler, ac); + ACPI_ALL_NOTIFY, acpi_ac_notify_handler, ac); if (result) { power_supply_unregister(&ac->charger); goto end; @@ -255,7 +255,7 @@ static int acpi_ac_remove(struct platform_device *pdev) return -EINVAL; acpi_remove_notify_handler(ACPI_HANDLE(&pdev->dev), - ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler); + ACPI_ALL_NOTIFY, acpi_ac_notify_handler); ac = platform_get_drvdata(pdev); if (ac->charger.dev) Please provide the output of acpidump. Created attachment 120291 [details]
acpidump output
From the acpidump, aml code notifies AC driver with zero event which is a system event. So ACPI_DEVICE_NOTIFY is not enough. Please send the patch in the comment 1 to acpi mallist. The fix patch has been merged into linux-pm tree. http://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=50a2bc5429f07ec4d53df2d287b03bdbceb281bb |