diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-04-12 13:02:00 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-05-02 14:06:59 +0300 |
commit | 1b799c5cf031c2b615f4b21150eafde3ff227788 (patch) | |
tree | a05bbb287f63deaffabd8e9265c2352d8fd01e42 /drivers/acpi/ac.c | |
parent | 19fffc8450d4378580a8f019b195c4617083176f (diff) | |
download | linux-1b799c5cf031c2b615f4b21150eafde3ff227788.tar.xz |
ACPI / battery: Ignore AC state in handle_discharging on systems where it is broken
On some devices the "AC" interface ACPI AML code uses the exact same broken
logic which is causing the battery code to wrongly report discharging to
determine the "AC" state. Specifically the ACPI AML code is checking the
charging status bits of the charger-IC rather then the vbus present or
power-good status bits.
This makes our workaround for devices which wrongly report discharging when
plugged into AC while the charge is above the start charging threshold not
work on these devices.
This commit adds a battery_ac_is_broken flag and when that is set it skips
the power_supply_is_system_supplied() check in the workaround fixing this.
This flag gets set by a DMI quirk selected by systems where we know the AC
AML code is broken in this way *and* the rate_now value can be trusted.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/ac.c')
0 files changed, 0 insertions, 0 deletions