diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-03-04 21:57:30 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-03-28 10:39:49 +0000 |
commit | 822c91e72eac568ed8d83765634f00decb45666c (patch) | |
tree | c13308539d0a65fbf47711eb528d4459e57daaf4 /tools | |
parent | 4cece764965020c22cff7665b18a012006359095 (diff) |
leds: trigger: Store brightness set by led_trigger_event()
If a simple trigger is assigned to a LED, then the LED may be off until
the next led_trigger_event() call. This may be an issue for simple
triggers with rare led_trigger_event() calls, e.g. power supply
charging indicators (drivers/power/supply/power_supply_leds.c).
Therefore persist the brightness value of the last led_trigger_event()
call and use this value if the trigger is assigned to a LED.
In addition add a getter for the trigger brightness value.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/b1358b25-3f30-458d-8240-5705ae007a8a@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions