* [PATCH v2] pwm: iqs620a: Replace one remaining instance of regmap_update_bits()
@ 2022-12-27 14:05 Jeff LaBundy
2022-12-27 21:38 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Jeff LaBundy @ 2022-12-27 14:05 UTC (permalink / raw)
To: thierry.reding; +Cc: u.kleine-koenig, linux-pwm, jeff
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().
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
---
Changes in v2:
- Dropped Fixes tag
drivers/pwm/pwm-iqs620a.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-iqs620a.c b/drivers/pwm/pwm-iqs620a.c
index 4987ca940b64..8362b4870c66 100644
--- a/drivers/pwm/pwm-iqs620a.c
+++ b/drivers/pwm/pwm-iqs620a.c
@@ -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,
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] pwm: iqs620a: Replace one remaining instance of regmap_update_bits()
2022-12-27 14:05 [PATCH v2] pwm: iqs620a: Replace one remaining instance of regmap_update_bits() Jeff LaBundy
@ 2022-12-27 21:38 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2022-12-27 21:38 UTC (permalink / raw)
To: Jeff LaBundy; +Cc: thierry.reding, linux-pwm
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
On Tue, Dec 27, 2022 at 08:05:01AM -0600, Jeff LaBundy wrote:
> 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().
>
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-27 21:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 14:05 [PATCH v2] pwm: iqs620a: Replace one remaining instance of regmap_update_bits() Jeff LaBundy
2022-12-27 21:38 ` Uwe Kleine-König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.