linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: asus: Remove check for same LED brightness on set
@ 2021-07-04 22:26 Luke D. Jones
  2021-07-15 19:01 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Luke D. Jones @ 2021-07-04 22:26 UTC (permalink / raw)
  To: jikos; +Cc: benjamin.tissoires, linux-input, linux-kernel, Luke D. Jones

Remove the early return on LED brightness set so that any controller
application, daemon, or desktop may set the same brightness at any stage.

This is required because many ASUS ROG keyboards will default to max
brightness on laptop resume if the LEDs were set to off before sleep.

Signed-off-by: Luke D Jones <luke@ljones.dev>
---
 drivers/hid/hid-asus.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 60606c11bdaf..19da81d2a910 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -486,9 +486,6 @@ static void asus_kbd_backlight_set(struct led_classdev *led_cdev,
 {
 	struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
 						 cdev);
-	if (led->brightness == brightness)
-		return;
-
 	led->brightness = brightness;
 	schedule_work(&led->work);
 }
--
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: asus: Remove check for same LED brightness on set
  2021-07-04 22:26 [PATCH] HID: asus: Remove check for same LED brightness on set Luke D. Jones
@ 2021-07-15 19:01 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2021-07-15 19:01 UTC (permalink / raw)
  To: Luke D. Jones; +Cc: benjamin.tissoires, linux-input, linux-kernel

On Mon, 5 Jul 2021, Luke D. Jones wrote:

> Remove the early return on LED brightness set so that any controller
> application, daemon, or desktop may set the same brightness at any stage.
> 
> This is required because many ASUS ROG keyboards will default to max
> brightness on laptop resume if the LEDs were set to off before sleep.
> 
> Signed-off-by: Luke D Jones <luke@ljones.dev>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-15 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-04 22:26 [PATCH] HID: asus: Remove check for same LED brightness on set Luke D. Jones
2021-07-15 19:01 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).