diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2009-01-10 18:54:39 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-04-06 16:06:25 +0100 |
commit | 1bd465e6b0e2b559db47420fea686507a01cfab0 (patch) | |
tree | 623c7a906e4ce117873a33f5b1717e150d5f9e59 /drivers/leds/ledtrig-heartbeat.c | |
parent | a7d878af94b223013a48078e0c8c0a654c24a057 (diff) | |
download | linux-1bd465e6b0e2b559db47420fea686507a01cfab0.tar.bz2 |
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>
Diffstat (limited to 'drivers/leds/ledtrig-heartbeat.c')
-rw-r--r-- | drivers/leds/ledtrig-heartbeat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c index 4bf8cec8b8c1..c1c1ea6f817b 100644 --- a/drivers/leds/ledtrig-heartbeat.c +++ b/drivers/leds/ledtrig-heartbeat.c @@ -47,7 +47,7 @@ static void led_heartbeat_function(unsigned long data) msecs_to_jiffies(heartbeat_data->period); delay = msecs_to_jiffies(70); heartbeat_data->phase++; - brightness = LED_FULL; + brightness = led_cdev->max_brightness; break; case 1: delay = heartbeat_data->period / 4 - msecs_to_jiffies(70); @@ -56,7 +56,7 @@ static void led_heartbeat_function(unsigned long data) case 2: delay = msecs_to_jiffies(70); heartbeat_data->phase++; - brightness = LED_FULL; + brightness = led_cdev->max_brightness; break; default: delay = heartbeat_data->period - heartbeat_data->period / 4 - |