summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_mode_object.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-04-12 12:02:00 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-05-02 13:06:59 +0200
commit1b799c5cf031c2b615f4b21150eafde3ff227788 (patch)
treea05bbb287f63deaffabd8e9265c2352d8fd01e42 /drivers/gpu/drm/drm_mode_object.c
parent19fffc8450d4378580a8f019b195c4617083176f (diff)
downloadblackbird-op-linux-1b799c5cf031c2b615f4b21150eafde3ff227788.tar.gz
blackbird-op-linux-1b799c5cf031c2b615f4b21150eafde3ff227788.zip
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/gpu/drm/drm_mode_object.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud