Re: [PATCH] pwm-backlight: allow for non-increasing brightness levels

From
Sascha Hauer <s.hauer@pengutronix.de>
Date
2013-09-17 09:36:49
Also in
linux-devicetree, linux-pwm, lkml
Reply to
Mike Dunn, 2013-09-12
Hi Mike,

On Thu, Sep 12, 2013 at 11:35:52AM -0700, Mike Dunn wrote:
Currently the driver assumes that the values specified in the brightness-levels
device tree property increase as they are parsed from left to right.  But boards
that invert the signal between the PWM output and the backlight will need to
specify decreasing brightness-levels.  This patch removes the assumption that
the last element of the array is the max value, and instead searches the array
for the max value and uses that as the normalizing value when determining the
duty cycle.
Note there's also support for inverted PWMs in the PWM framework
provided your hardware supports this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Thread (5 messages) 5 messages, 3 authors, last reply 2013-09-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help