• Mike Dunn's avatar
    pwm-backlight: Allow for non-increasing brightness levels · 8f43e18e
    Mike Dunn authored
    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: default avatarMike Dunn <mikedunn@newsguy.com>
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    8f43e18e
pwm_bl.c 9.49 KB