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: NMike Dunn <mikedunn@newsguy.com> Signed-off-by: NThierry Reding <treding@nvidia.com>
Showing
想要评论请 注册 或 登录