* [PATCH] platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255
@ 2023-01-27 23:57 Hans de Goede
2023-01-30 13:49 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2023-01-27 23:57 UTC (permalink / raw)
To: Mark Gross, Andy Shevchenko; +Cc: Hans de Goede, platform-driver-x86
Reading the thinklight LED brightnes while the LED is on returns
255 (LED_FULL) but we advertise a max_brightness of 1, so this should
be 1 (LED_ON).
Fixes: db5e2a4ca0a7 ("platform/x86: thinkpad_acpi: Fix max_brightness of thinklight")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/thinkpad_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 02860c32625e..32c10457399e 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5563,7 +5563,7 @@ static int light_sysfs_set(struct led_classdev *led_cdev,
static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev)
{
- return (light_get_status() == 1) ? LED_FULL : LED_OFF;
+ return (light_get_status() == 1) ? LED_ON : LED_OFF;
}
static struct tpacpi_led_classdev tpacpi_led_thinklight = {
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255
2023-01-27 23:57 [PATCH] platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255 Hans de Goede
@ 2023-01-30 13:49 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2023-01-30 13:49 UTC (permalink / raw)
To: Mark Gross, Andy Shevchenko; +Cc: platform-driver-x86
Hi,
On 1/28/23 00:57, Hans de Goede wrote:
> Reading the thinklight LED brightnes while the LED is on returns
> 255 (LED_FULL) but we advertise a max_brightness of 1, so this should
> be 1 (LED_ON).
>
> Fixes: db5e2a4ca0a7 ("platform/x86: thinkpad_acpi: Fix max_brightness of thinklight")
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
I've applied this to the pdx86 fixes branch now:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes
and this will be included in my next fixes pull-req to Linus.
Regards,
Hans
> ---
> drivers/platform/x86/thinkpad_acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 02860c32625e..32c10457399e 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -5563,7 +5563,7 @@ static int light_sysfs_set(struct led_classdev *led_cdev,
>
> static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev)
> {
> - return (light_get_status() == 1) ? LED_FULL : LED_OFF;
> + return (light_get_status() == 1) ? LED_ON : LED_OFF;
> }
>
> static struct tpacpi_led_classdev tpacpi_led_thinklight = {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-30 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-27 23:57 [PATCH] platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255 Hans de Goede
2023-01-30 13:49 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox