Skip to content

Commit 32b4f1a

Browse files
Uwe Kleine-KönigUwe Kleine-König
authored andcommitted
pwm: jz4740: Another few conversions to regmap_{set,clear}_bits()
Similar to commit 7d91999 ("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 <[email protected]> Reviewed-by: Paul Cercueil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 41814fe commit 32b4f1a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/pwm/pwm-jz4740.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,11 @@ static int jz4740_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
201201
* state instead of its inactive state.
202202
*/
203203
if ((state->polarity == PWM_POLARITY_NORMAL) ^ state->enabled)
204-
regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm),
205-
TCU_TCSR_PWM_INITL_HIGH, 0);
204+
regmap_clear_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm),
205+
TCU_TCSR_PWM_INITL_HIGH);
206206
else
207-
regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm),
208-
TCU_TCSR_PWM_INITL_HIGH,
209-
TCU_TCSR_PWM_INITL_HIGH);
207+
regmap_set_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm),
208+
TCU_TCSR_PWM_INITL_HIGH);
210209

211210
if (state->enabled)
212211
jz4740_pwm_enable(chip, pwm);

0 commit comments

Comments
 (0)