mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
leds: allow led-drivers to use a variable range of brightness values
This patch allows drivers to override the default maximum brightness value of 255. We take care to preserve backwards-compatibility as much as possible, so that user-space ABI doesn't change for existing drivers. LED trigger code has also been updated to use the per-LED maximum. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
a7d878af94
commit
1bd465e6b0
7 changed files with 29 additions and 8 deletions
|
@ -30,6 +30,7 @@ enum led_brightness {
|
|||
struct led_classdev {
|
||||
const char *name;
|
||||
int brightness;
|
||||
int max_brightness;
|
||||
int flags;
|
||||
|
||||
/* Lower 16 bits reflect status */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue