pwm: Make use of pwm_get_xxx() helpers where appropriate
Use the pwm_get_xxx() helpers instead of directly accessing the fields in struct pwm_device. This will allow us to smoothly move to the atomic update approach. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:

committed by
Thierry Reding

parent
011e763148
commit
15da7b5001
@@ -83,7 +83,7 @@ static void rockchip_pwm_set_enable_v2(struct pwm_chip *chip,
|
||||
PWM_CONTINUOUS;
|
||||
u32 val;
|
||||
|
||||
if (pwm->polarity == PWM_POLARITY_INVERSED)
|
||||
if (pwm_get_polarity(pwm) == PWM_POLARITY_INVERSED)
|
||||
enable_conf |= PWM_DUTY_NEGATIVE | PWM_INACTIVE_POSITIVE;
|
||||
else
|
||||
enable_conf |= PWM_DUTY_POSITIVE | PWM_INACTIVE_NEGATIVE;
|
||||
|
Reference in New Issue
Block a user