diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-03-23 15:47:22 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 10:59:41 +0200 |
commit | a40a7633f7506d32bdced4181e545a4dc364833a (patch) | |
tree | 638b76a35203a62129ddca18bdc0960890269ff5 /include/linux/leds_pwm.h | |
parent | c8e4b64a1fa7ecf95ca472ff76137823100ff950 (diff) |
backlight/leds: add low threshold to pwm backlight/led
The intensity of the backlight/led can be varied from a range of
max_brightness to zero. Though most, if not all the pwm based
backlight/led devices start flickering at lower brightness value.
And also for each device there exists a brightness value below
which the backlight appears to be turned off though the value is
not equal to zero.
If the range of brightness for a device is from zero to
max_brightness. A graph is plotted for brightness Vs intensity fo the
pwm based backlight/led device has to be a linear graph.
intensity
| /
| /
| /
|/
---------
0 max_brightness
But pratically on measuring the above we note that the intensity of
backlight/led goes to zero(OFF) when the value in not zero almost nearing to
zero(some x%). so the graph looks like
intensity
| /
| /
| /
| |
------------
0 x max_brightness
In order to overcome this drawback knowing this x% i.e nothing but the
low threshold beyond which the backlight/led is off and will have no effect,
the brightness value is being offset by the low threshold
value(retaining the linearity of the graph). Now the graph becomes
intensity
| /
| /
| /
| /
-------------
0 max_brightness
With this for each and every digit increment in the brightness from zero
there is a change in the intensity of backlight/led.
Devices having this behaviour can set the low threshold
brightness(lth_brightness) and pass the same as platform data else can
have it as zero.
ST-Ericsson ID: Task168737
Change-Id: I7198ec89aa69e0c687d329b21f723fd8d5368928
Signed-off-by: Prajadevi H <prajadevi.h@stericsson.com>
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/5231
Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Diffstat (limited to 'include/linux/leds_pwm.h')
-rw-r--r-- | include/linux/leds_pwm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/leds_pwm.h b/include/linux/leds_pwm.h index 33a07116748..9c5eab6e086 100644 --- a/include/linux/leds_pwm.h +++ b/include/linux/leds_pwm.h @@ -11,6 +11,7 @@ struct led_pwm { u8 active_low; unsigned max_brightness; unsigned pwm_period_ns; + unsigned int lth_brightness; }; struct led_pwm_platform_data { |