Skip to content
  • Lan Tianyu's avatar
    ACPI / AC: Add sleep quirk for Thinkpad e530 · 0ab5bb64
    Lan Tianyu authored
    The Thinkpad e530's BIOS notifies the AC device first and then
    sleeps for certain amount of time before doing real work in the
    EC event handler (_Qxx):
    
     Method (_Q27, 0, NotSerialized)
     {
           Notify (AC, 0x80)
           Sleep (0x03E8)
           Store (Zero, PWRS)
           PNOT ()
     }
    
    This causes the AC driver to report an outdated AC state to user
    space, because it reads the state information from the device while
    the EC handler is sleeping.
    
    Introduce a quirk to cause the AC driver to wait in acpi_ac_notify()
    before calling acpi_ac_get_state() on systems known to have this
    problem and add Thinkpad e530 to the list of quirky machines (with
    a 1s delay which has been verified to be sufficient for that
    machine).
    
    [rjw: Changelog]
    References: https://bugzilla.kernel.org/show_bug.cgi?id=45221
    
    
    Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    0ab5bb64