]> git.baikalelectronics.ru Git - kernel.git/commit
pwm-backlight: Allow for non-increasing brightness levels
authorMike Dunn <mikedunn@newsguy.com>
Sun, 22 Sep 2013 16:59:56 +0000 (09:59 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 16 Oct 2013 07:20:09 +0000 (09:20 +0200)
commitc80847e69260d33e460a980f8d66ec224c6d8941
treedcddafc52c90afc98fa8037a0ad682e5e8b6d194
parentf6c9deb5a2efcb1045daf5be742075bf247a22ee
pwm-backlight: Allow for non-increasing brightness levels

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 maximum value, and instead searches the array for the maximum value
and uses that in the duty cycle calculation.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/video/backlight/pwm_bl.c