aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/ledtrig-heartbeat.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lg@denx.de>2009-01-10 13:54:39 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2009-04-06 11:06:25 -0400
commit1bd465e6b0e2b559db47420fea686507a01cfab0 (patch)
tree623c7a906e4ce117873a33f5b1717e150d5f9e59 /drivers/leds/ledtrig-heartbeat.c
parenta7d878af94b223013a48078e0c8c0a654c24a057 (diff)
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.c4
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)
47 msecs_to_jiffies(heartbeat_data->period); 47 msecs_to_jiffies(heartbeat_data->period);
48 delay = msecs_to_jiffies(70); 48 delay = msecs_to_jiffies(70);
49 heartbeat_data->phase++; 49 heartbeat_data->phase++;
50 brightness = LED_FULL; 50 brightness = led_cdev->max_brightness;
51 break; 51 break;
52 case 1: 52 case 1:
53 delay = heartbeat_data->period / 4 - msecs_to_jiffies(70); 53 delay = heartbeat_data->period / 4 - msecs_to_jiffies(70);
@@ -56,7 +56,7 @@ static void led_heartbeat_function(unsigned long data)
56 case 2: 56 case 2:
57 delay = msecs_to_jiffies(70); 57 delay = msecs_to_jiffies(70);
58 heartbeat_data->phase++; 58 heartbeat_data->phase++;
59 brightness = LED_FULL; 59 brightness = led_cdev->max_brightness;
60 break; 60 break;
61 default: 61 default:
62 delay = heartbeat_data->period - heartbeat_data->period / 4 - 62 delay = heartbeat_data->period - heartbeat_data->period / 4 -