Skip to contentSkip to conversation

pwm: iqs620a: Replace one remaining instance of regmap_update_bits()

PATCH RESEND Applied Jeff LaBundy 2 participants 2 messages Feb 6, 2023 – Feb 17, 2023 PWM

lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 pwm: iqs620a: Replace one remaining instance of regmap_update_bits()

The call to regmap_update_bits() which was responsible for clearing the PWM output enable register bit was recently dropped in favor of a call to regmap_clear_bits(), thereby simplifying the code.

Similarly, the call to regmap_update_bits() which sets the same bit can be simplified with a call to regmap_set_bits().

---
Changes in v2:
- Dropped Fixes tag

 drivers/pwm/pwm-iqs620a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pwm/pwm-iqs620a.c +2 -2
index 4987ca940b64..8362b4870c66 100644
@@ -55,8 +55,8 @@ static int iqs620_pwm_init(struct iqs620_pwm_private *iqs620_pwm,
 	if (ret)
 		return ret;
 
-	return regmap_update_bits(iqs62x->regmap, IQS620_PWR_SETTINGS,
-				  IQS620_PWR_SETTINGS_PWM_OUT, 0xff);
+	return regmap_set_bits(iqs62x->regmap, IQS620_PWR_SETTINGS,
+			       IQS620_PWR_SETTINGS_PWM_OUT);
 }
 
 static int iqs620_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · Jeff LaBundy

The call to regmap_update_bits() which was responsible for clearing the PWM output enable register bit was recently dropped in favor of a call to regmap_clear_bits(), thereby simplifying the code.

Similarly, the call to regmap_update_bits() which sets the same bit can be simplified with a call to regmap_set_bits().

[...]

Applied, thanks!

[1/1] pwm: iqs620a: Replace one remaining instance of regmap_update_bits()

      commit: 860793bbdcdfbeae684d552ce0121846cffc4803

Best regards,

Signature · 1 line
Thierry Reding <[email protected]>