* [PATCH 0/2] pwm: Make use of regmap_{set,clear}_bits()
@ 2024-06-06 16:40 Uwe Kleine-König
2024-06-06 16:40 ` [PATCH 1/2] pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() Uwe Kleine-König
2024-06-06 16:40 ` [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() Uwe Kleine-König
0 siblings, 2 replies; 11+ messages in thread
From: Uwe Kleine-König @ 2024-06-06 16:40 UTC (permalink / raw)
To: Paul Cercueil, Trevor Gamblin
Cc: linux-mips, linux-pwm, Michael Hennerich, Nuno Sá
Hello,
during the final look over Trevor's axi-pwmgen patch I found an opportunity to
use regmap_clear_bits(). Looking through the other drivers I found another
patch opportunity in the jz4740 driver.
Best regards
Uwe
Uwe Kleine-König (2):
pwm: jz4740: Another few conversions to regmap_{set,clear}_bits()
pwm: axi-pwmgen: Make use of regmap_clear_bits()
drivers/pwm/pwm-axi-pwmgen.c | 2 +-
drivers/pwm/pwm-jz4740.c | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
base-commit: 7cf775737d4ec337e46bf8497882cb6a7650839a
--
2.43.0
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 1/2] pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() 2024-06-06 16:40 [PATCH 0/2] pwm: Make use of regmap_{set,clear}_bits() Uwe Kleine-König @ 2024-06-06 16:40 ` Uwe Kleine-König 2024-06-07 16:21 ` Paul Cercueil 2024-06-06 16:40 ` [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() Uwe Kleine-König 1 sibling, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-06-06 16:40 UTC (permalink / raw) To: Paul Cercueil; +Cc: linux-mips, linux-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(-) 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); -- 2.43.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() 2024-06-06 16:40 ` [PATCH 1/2] pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() Uwe Kleine-König @ 2024-06-07 16:21 ` Paul Cercueil 0 siblings, 0 replies; 11+ messages in thread From: Paul Cercueil @ 2024-06-07 16:21 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: linux-mips, linux-pwm 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); ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-06 16:40 [PATCH 0/2] pwm: Make use of regmap_{set,clear}_bits() Uwe Kleine-König 2024-06-06 16:40 ` [PATCH 1/2] pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() Uwe Kleine-König @ 2024-06-06 16:40 ` Uwe Kleine-König 2024-06-06 17:09 ` Trevor Gamblin 2024-06-07 6:40 ` Nuno Sá 1 sibling, 2 replies; 11+ messages in thread From: Uwe Kleine-König @ 2024-06-06 16:40 UTC (permalink / raw) To: Trevor Gamblin; +Cc: Michael Hennerich, Nuno Sá, linux-pwm Instead of using regmap_update_bits() and passing val=0, better use regmap_clear_bits(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> --- drivers/pwm/pwm-axi-pwmgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c index 1bd4150e0158..aac4f395497b 100644 --- a/drivers/pwm/pwm-axi-pwmgen.c +++ b/drivers/pwm/pwm-axi-pwmgen.c @@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev) } /* Enable the core */ - ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET, 0); + ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET); if (ret) return ret; -- 2.43.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-06 16:40 ` [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() Uwe Kleine-König @ 2024-06-06 17:09 ` Trevor Gamblin 2024-06-07 6:40 ` Nuno Sá 1 sibling, 0 replies; 11+ messages in thread From: Trevor Gamblin @ 2024-06-06 17:09 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: Michael Hennerich, Nuno Sá, linux-pwm On 2024-06-06 12:40 p.m., Uwe Kleine-König wrote: > Instead of using regmap_update_bits() and passing val=0, better use > regmap_clear_bits(). > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Acked-by: Trevor Gamblin <tgamblin@baylibre.com> > --- > drivers/pwm/pwm-axi-pwmgen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c > index 1bd4150e0158..aac4f395497b 100644 > --- a/drivers/pwm/pwm-axi-pwmgen.c > +++ b/drivers/pwm/pwm-axi-pwmgen.c > @@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev) > } > > /* Enable the core */ > - ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET, 0); > + ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET); > if (ret) > return ret; > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-06 16:40 ` [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() Uwe Kleine-König 2024-06-06 17:09 ` Trevor Gamblin @ 2024-06-07 6:40 ` Nuno Sá 2024-06-10 5:53 ` Uwe Kleine-König 1 sibling, 1 reply; 11+ messages in thread From: Nuno Sá @ 2024-06-07 6:40 UTC (permalink / raw) To: Uwe Kleine-König, Trevor Gamblin Cc: Michael Hennerich, Nuno Sá, linux-pwm On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > Instead of using regmap_update_bits() and passing val=0, better use > regmap_clear_bits(). > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > --- Reviewed-by: Nuno Sa <nuno.sa@analog.com> > drivers/pwm/pwm-axi-pwmgen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c > index 1bd4150e0158..aac4f395497b 100644 > --- a/drivers/pwm/pwm-axi-pwmgen.c > +++ b/drivers/pwm/pwm-axi-pwmgen.c > @@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct > device *dev) > } > > /* Enable the core */ > - ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, > AXI_PWMGEN_REG_CONFIG_RESET, 0); > + ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, > AXI_PWMGEN_REG_CONFIG_RESET); > if (ret) > return ret; > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-07 6:40 ` Nuno Sá @ 2024-06-10 5:53 ` Uwe Kleine-König 2024-06-10 8:00 ` Conor Dooley 2024-06-10 8:10 ` Nuno Sá 0 siblings, 2 replies; 11+ messages in thread From: Uwe Kleine-König @ 2024-06-10 5:53 UTC (permalink / raw) To: Nuno Sá; +Cc: Trevor Gamblin, Michael Hennerich, Nuno Sá, linux-pwm [-- Attachment #1: Type: text/plain, Size: 757 bytes --] Hello Nuno, On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > Instead of using regmap_update_bits() and passing val=0, better use > > regmap_clear_bits(). > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > --- > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> Thanks for looking at the patch. When I apply it (using b4) I get however: NOTE: some trailers ignored due to from/email mismatches: ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> Msg From: Nuno Sá <noname.nuno@gmail.com> I'll add it anyhow, but it would be great if you fixed your workflow to have the sender match the address in the tag. Best regards Uwe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-10 5:53 ` Uwe Kleine-König @ 2024-06-10 8:00 ` Conor Dooley 2024-06-10 8:32 ` Uwe Kleine-König 2024-06-10 8:10 ` Nuno Sá 1 sibling, 1 reply; 11+ messages in thread From: Conor Dooley @ 2024-06-10 8:00 UTC (permalink / raw) To: Uwe Kleine-König Cc: Nuno Sá, Trevor Gamblin, Michael Hennerich, Nuno Sá, linux-pwm [-- Attachment #1: Type: text/plain, Size: 928 bytes --] On Mon, Jun 10, 2024 at 07:53:33AM +0200, Uwe Kleine-König wrote: > Hello Nuno, > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > Instead of using regmap_update_bits() and passing val=0, better use > > > regmap_clear_bits(). > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > --- > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > Thanks for looking at the patch. When I apply it (using b4) I get > however: > > NOTE: some trailers ignored due to from/email mismatches: > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > Msg From: Nuno Sá <noname.nuno@gmail.com> > > I'll add it anyhow, but it would be great if you fixed your workflow to > have the sender match the address in the tag. I'm curious, given I do this all the time, do you not see similar issues for me? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-10 8:00 ` Conor Dooley @ 2024-06-10 8:32 ` Uwe Kleine-König 2024-06-10 9:25 ` Conor Dooley 0 siblings, 1 reply; 11+ messages in thread From: Uwe Kleine-König @ 2024-06-10 8:32 UTC (permalink / raw) To: Conor Dooley Cc: Nuno Sá, Trevor Gamblin, Michael Hennerich, Nuno Sá, linux-pwm [-- Attachment #1: Type: text/plain, Size: 1251 bytes --] On Mon, Jun 10, 2024 at 09:00:53AM +0100, Conor Dooley wrote: > On Mon, Jun 10, 2024 at 07:53:33AM +0200, Uwe Kleine-König wrote: > > Hello Nuno, > > > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > > Instead of using regmap_update_bits() and passing val=0, better use > > > > regmap_clear_bits(). > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > > --- > > > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > > > Thanks for looking at the patch. When I apply it (using b4) I get > > however: > > > > NOTE: some trailers ignored due to from/email mismatches: > > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > Msg From: Nuno Sá <noname.nuno@gmail.com> > > > > I'll add it anyhow, but it would be great if you fixed your workflow to > > have the sender match the address in the tag. > > I'm curious, given I do this all the time, do you not see similar issues > for me? Never noticed that for you. Maybe that's a new check in b4? I recently reinstalled my devel machine, so I likely have a new version even if the upstream change is a bit older already. Best regards Uwe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-10 8:32 ` Uwe Kleine-König @ 2024-06-10 9:25 ` Conor Dooley 0 siblings, 0 replies; 11+ messages in thread From: Conor Dooley @ 2024-06-10 9:25 UTC (permalink / raw) To: Uwe Kleine-König Cc: Nuno Sá, Trevor Gamblin, Michael Hennerich, Nuno Sá, linux-pwm [-- Attachment #1: Type: text/plain, Size: 1557 bytes --] On Mon, Jun 10, 2024 at 10:32:13AM +0200, Uwe Kleine-König wrote: > On Mon, Jun 10, 2024 at 09:00:53AM +0100, Conor Dooley wrote: > > On Mon, Jun 10, 2024 at 07:53:33AM +0200, Uwe Kleine-König wrote: > > > Hello Nuno, > > > > > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > > > Instead of using regmap_update_bits() and passing val=0, better use > > > > > regmap_clear_bits(). > > > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > > > --- > > > > > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > > > > > Thanks for looking at the patch. When I apply it (using b4) I get > > > however: > > > > > > NOTE: some trailers ignored due to from/email mismatches: > > > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > > Msg From: Nuno Sá <noname.nuno@gmail.com> > > > > > > I'll add it anyhow, but it would be great if you fixed your workflow to > > > have the sender match the address in the tag. > > > > I'm curious, given I do this all the time, do you not see similar issues > > for me? > > Never noticed that for you. Maybe that's a new check in b4? I recently > reinstalled my devel machine, so I likely have a new version even if the > upstream change is a bit older already. Nah, I think that's been in b4 for as long as I have been using it, even when I used the old version from debian. Maybe my use of patatt is the reason or some exemption for kernel.org addresses. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() 2024-06-10 5:53 ` Uwe Kleine-König 2024-06-10 8:00 ` Conor Dooley @ 2024-06-10 8:10 ` Nuno Sá 1 sibling, 0 replies; 11+ messages in thread From: Nuno Sá @ 2024-06-10 8:10 UTC (permalink / raw) To: Uwe Kleine-König Cc: Trevor Gamblin, Michael Hennerich, Nuno Sá, linux-pwm On Mon, 2024-06-10 at 07:53 +0200, Uwe Kleine-König wrote: > Hello Nuno, > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > Instead of using regmap_update_bits() and passing val=0, better use > > > regmap_clear_bits(). > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > --- > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > Thanks for looking at the patch. When I apply it (using b4) I get > however: > > NOTE: some trailers ignored due to from/email mismatches: > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > Msg From: Nuno Sá <noname.nuno@gmail.com> > > I'll add it anyhow, but it would be great if you fixed your workflow to > have the sender match the address in the tag. > Yeah, I'm aware of it. Sending emails from my corporate email is just too painful that I use my personal one and an email client that actually fits kernel development. Til now, it was never an issue and this is the first "complain" I'm getting :). I'll try to remember this for pwm in the future... Sorry for the trouble! - Nuno Sá ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-06-10 9:26 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 16:40 [PATCH 0/2] pwm: Make use of regmap_{set,clear}_bits() Uwe Kleine-König
2024-06-06 16:40 ` [PATCH 1/2] pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() Uwe Kleine-König
2024-06-07 16:21 ` Paul Cercueil
2024-06-06 16:40 ` [PATCH 2/2] pwm: axi-pwmgen: Make use of regmap_clear_bits() Uwe Kleine-König
2024-06-06 17:09 ` Trevor Gamblin
2024-06-07 6:40 ` Nuno Sá
2024-06-10 5:53 ` Uwe Kleine-König
2024-06-10 8:00 ` Conor Dooley
2024-06-10 8:32 ` Uwe Kleine-König
2024-06-10 9:25 ` Conor Dooley
2024-06-10 8:10 ` Nuno Sá
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).