• Hans de Goede's avatar
    ACPI / bus: Introduce a list of ids for "always present" devices · b7ecf663
    Hans de Goede authored
    Several Bay / Cherry Trail devices (all of which ship with Windows 10) hide
    the LPSS PWM controller in ACPI, typically the _STA method looks like this:
    
        Method (_STA, 0, NotSerialized)  // _STA: Status
        {
            If (OSID == One)
            {
                Return (Zero)
            }
    
            Return (0x0F)
        }
    
    Where OSID is some dark magic seen in all Cherry Trail ACPI tables making
    the machine behave differently depending on which OS it *thinks* it is
    booting, this gets set in a number of ways which we cannot control, on
    some newer machines it simple hardcoded to "One" aka win10.
    
    This causes the PWM controller to get hidden, which means Linux cannot
    control the backlight level on cht based tablets / laptops.
    
    Since loading the driver for this does no harm (the only in kernel user
    of it is the i915 driver, which will only uses it when it needs it), this
    commit makes acpi_bus_get_status() always set status to ACPI_STA_DEFAULT
    for the LPSS PWM device, fixing the lack of backlight control.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    [ rjw: Rename the new file to utils.c ]
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    b7ecf663
utils.c 2.47 KB