Message ID | 20240606164047.534741-5-u.kleine-koenig@baylibre.com |
---|---|
State | Accepted |
Headers | show |
Series | pwm: Make use of regmap_{set,clear}_bits() | expand |
Hi Uwe, Le jeudi 06 juin 2024 à 18:40 +0200, Uwe Kleine-König a écrit : > Similar to commit 7d9199995412 ("pwm: jz4740: Use > regmap_{set,clear}_bits") convert two more regmap_update_bits() calls > to > regmap_{set,clear}_bits() which were missed back then. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Thanks! Cheers, -Paul > --- > drivers/pwm/pwm-jz4740.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c > index da4bf543d357..6bdb01619380 100644 > --- a/drivers/pwm/pwm-jz4740.c > +++ b/drivers/pwm/pwm-jz4740.c > @@ -201,12 +201,11 @@ static int jz4740_pwm_apply(struct pwm_chip > *chip, struct pwm_device *pwm, > * state instead of its inactive state. > */ > if ((state->polarity == PWM_POLARITY_NORMAL) ^ state- > >enabled) > - regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm- > >hwpwm), > - TCU_TCSR_PWM_INITL_HIGH, 0); > + regmap_clear_bits(jz->map, TCU_REG_TCSRc(pwm- > >hwpwm), > + TCU_TCSR_PWM_INITL_HIGH); > else > - regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm- > >hwpwm), > - TCU_TCSR_PWM_INITL_HIGH, > - TCU_TCSR_PWM_INITL_HIGH); > + regmap_set_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm), > + TCU_TCSR_PWM_INITL_HIGH); > > if (state->enabled) > jz4740_pwm_enable(chip, pwm);
diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c index da4bf543d357..6bdb01619380 100644 --- a/drivers/pwm/pwm-jz4740.c +++ b/drivers/pwm/pwm-jz4740.c @@ -201,12 +201,11 @@ static int jz4740_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, * state instead of its inactive state. */ if ((state->polarity == PWM_POLARITY_NORMAL) ^ state->enabled) - regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm), - TCU_TCSR_PWM_INITL_HIGH, 0); + regmap_clear_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm), + TCU_TCSR_PWM_INITL_HIGH); else - regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm), - TCU_TCSR_PWM_INITL_HIGH, - TCU_TCSR_PWM_INITL_HIGH); + regmap_set_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm), + TCU_TCSR_PWM_INITL_HIGH); if (state->enabled) jz4740_pwm_enable(chip, pwm);
Similar to commit 7d9199995412 ("pwm: jz4740: Use regmap_{set,clear}_bits") convert two more regmap_update_bits() calls to regmap_{set,clear}_bits() which were missed back then. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> --- drivers/pwm/pwm-jz4740.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)