summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-mxs.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-07-30 17:48:48 +0200
committerThierry Reding <thierry.reding@gmail.com>2019-08-08 13:17:38 +0200
commit6cf9481b440da6d6d86bd8e4c99a8b553b9d1271 (patch)
treeb329dee49270d5708aaeee9b86c272a774f2f89d /drivers/pwm/pwm-mxs.c
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
pwm: Fallback to the static lookup-list when acpi_pwm_get fails
Commit 4a6ef8e37c4d ("pwm: Add support referencing PWMs from ACPI") made pwm_get unconditionally return the acpi_pwm_get return value if the device passed to pwm_get has an ACPI fwnode. But even if the passed in device has an ACPI fwnode, it does not necessarily have the necessary ACPI package defining its pwm bindings, especially since the binding / API of this ACPI package has only been introduced very recently. Up until now X86/ACPI devices which use a separate pwm controller for controlling their LCD screen's backlight brightness have been relying on the static lookup-list to get their pwm. pwm_get unconditionally returning the acpi_pwm_get return value breaks this, breaking backlight control on these devices. This commit fixes this by making pwm_get fall back to the static lookup-list if acpi_pwm_get returns -ENOENT. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=96571 Reported-by: youling257@gmail.com Fixes: 4a6ef8e37c4d ("pwm: Add support referencing PWMs from ACPI") Cc: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-mxs.c')
0 files changed, 0 insertions, 0 deletions