backlight: lp855x: Explicitly apply PWM config extracted from pwm_args
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 14 Apr 2016 19:17:31 +0000 (21:17 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 17 May 2016 12:45:05 +0000 (14:45 +0200)
Call pwm_apply_args() just after requesting the PWM device so that the
polarity and period are initialized according to the information
provided in pwm_args.

This is an intermediate state, and pwm_apply_args() should be dropped as
soon as the atomic PWM infrastructure is in place and the driver makes
use of it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/video/backlight/lp855x_bl.c

index daca9e6a2bb31590071cfc7100e4c1ee8ca4f1ec..e5b14f52628fdd365ac1a9318cc8ad8be7fe89ca 100644 (file)
@@ -246,6 +246,12 @@ static void lp855x_pwm_ctrl(struct lp855x *lp, int br, int max_br)
                        return;
 
                lp->pwm = pwm;
+
+               /*
+                * FIXME: pwm_apply_args() should be removed when switching to
+                * the atomic PWM API.
+                */
+               pwm_apply_args(pwm);
        }
 
        pwm_config(lp->pwm, duty, period);
This page took 0.026986 seconds and 5 git commands to generate.