* [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
@ 2026-09-24 8:35 Peng Fan (OSS)
2026-09-25 8:14 ` Bartosz Golaszewski
2026-09-25 10:13 ` Andy Shevchenko
0 siblings, 2 replies; 9+ messages in thread
From: Peng Fan (OSS) @ 2026-09-24 8:35 UTC (permalink / raw)
To: Andy Shevchenko, Kuppuswamy Sathyanarayanan, Linus Walleij,
Bartosz Golaszewski
Cc: linux-kernel, Peng Fan, linux-gpio
From: Peng Fan <peng.fan@nxp.com>
Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
the simpler regmap_assign_bits() call.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/gpio/gpio-wcove.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c
index 4a5e20e936a95..937c5db7e6e49 100644
--- a/drivers/gpio/gpio-wcove.c
+++ b/drivers/gpio/gpio-wcove.c
@@ -129,10 +129,7 @@ static void wcove_update_irq_mask(struct wcove_gpio *wg, irq_hw_number_t gpio)
{
unsigned int mask, reg = to_ireg(gpio, IRQ_MASK, &mask);
- if (wg->set_irq_mask)
- regmap_set_bits(wg->regmap, reg, mask);
- else
- regmap_clear_bits(wg->regmap, reg, mask);
+ regmap_assign_bits(wg->regmap, reg, mask, wg->set_irq_mask);
}
static void wcove_update_irq_ctrl(struct wcove_gpio *wg, irq_hw_number_t gpio)
--
2.50.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-24 8:35 [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear Peng Fan (OSS)
@ 2026-09-25 8:14 ` Bartosz Golaszewski
2026-09-25 8:27 ` Andy Shevchenko
2026-09-25 10:13 ` Andy Shevchenko
1 sibling, 1 reply; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-09-25 8:14 UTC (permalink / raw)
To: Andy Shevchenko, Kuppuswamy Sathyanarayanan, Linus Walleij,
Bartosz Golaszewski, Peng Fan (OSS)
Cc: Bartosz Golaszewski, linux-kernel, Peng Fan, linux-gpio
On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
> Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
> the simpler regmap_assign_bits() call.
>
>
Applied, thanks!
[1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-25 8:14 ` Bartosz Golaszewski
@ 2026-09-25 8:27 ` Andy Shevchenko
2026-09-25 9:54 ` Bartosz Golaszewski
0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2026-09-25 8:27 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Kuppuswamy Sathyanarayanan, Linus Walleij,
Bartosz Golaszewski, Peng Fan (OSS),
linux-kernel, Peng Fan, linux-gpio
On Fri, Sep 25, 2026 at 11:14 AM Bartosz Golaszewski
<bartosz.golaszewski@oss.qualcomm.com> wrote:
> On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
> > Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
> > the simpler regmap_assign_bits() call.
>
> Applied, thanks!
>
> [1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
> https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
Are you going to handle all the Intel GPIO drivers that have a
MAINTAINERS record?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-25 8:27 ` Andy Shevchenko
@ 2026-09-25 9:54 ` Bartosz Golaszewski
2026-09-25 10:12 ` Andy Shevchenko
0 siblings, 1 reply; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-09-25 9:54 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Kuppuswamy Sathyanarayanan, Linus Walleij,
Bartosz Golaszewski, Peng Fan (OSS),
linux-kernel, Peng Fan, linux-gpio, Bartosz Golaszewski
On Fri, 25 Sep 2026 10:27:55 +0200, Andy Shevchenko
<andy.shevchenko@gmail.com> said:
> On Fri, Sep 25, 2026 at 11:14 AM Bartosz Golaszewski
> <bartosz.golaszewski@oss.qualcomm.com> wrote:
>> On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
>> > Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
>> > the simpler regmap_assign_bits() call.
>>
>> Applied, thanks!
>>
>> [1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
>> https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
>
> Are you going to handle all the Intel GPIO drivers that have a
> MAINTAINERS record?
>
Sorry, backing it up. We really need to organize GPIO drivers by vendor...
Bart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-25 9:54 ` Bartosz Golaszewski
@ 2026-09-25 10:12 ` Andy Shevchenko
2026-09-25 10:23 ` Bartosz Golaszewski
0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2026-09-25 10:12 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Andy Shevchenko, Kuppuswamy Sathyanarayanan,
Linus Walleij, Peng Fan (OSS),
linux-kernel, Peng Fan, linux-gpio, Bartosz Golaszewski
On Fri, Sep 25, 2026 at 09:54:42AM +0000, Bartosz Golaszewski wrote:
> On Fri, 25 Sep 2026 10:27:55 +0200, Andy Shevchenko
> <andy.shevchenko@gmail.com> said:
> > On Fri, Sep 25, 2026 at 11:14 AM Bartosz Golaszewski
> > <bartosz.golaszewski@oss.qualcomm.com> wrote:
> >> On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
> >> > Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
> >> > the simpler regmap_assign_bits() call.
> >>
> >> Applied, thanks!
> >>
> >> [1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
> >> https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
> >
> > Are you going to handle all the Intel GPIO drivers that have a
> > MAINTAINERS record?
>
> Sorry, backing it up. We really need to organize GPIO drivers by vendor...
Do you want me to start intel subfolder?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-24 8:35 [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear Peng Fan (OSS)
2026-09-25 8:14 ` Bartosz Golaszewski
@ 2026-09-25 10:13 ` Andy Shevchenko
1 sibling, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2026-09-25 10:13 UTC (permalink / raw)
To: Andy Shevchenko, Kuppuswamy Sathyanarayanan, Linus Walleij,
Bartosz Golaszewski, Peng Fan (OSS)
Cc: linux-kernel, Peng Fan, linux-gpio
On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
> Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
> the simpler regmap_assign_bits() call.
Applied, thanks!
[1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
commit: 0fc424b6a8ef447450f6087db42abce3a6feb328
Best regards,
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-25 10:12 ` Andy Shevchenko
@ 2026-09-25 10:23 ` Bartosz Golaszewski
2026-09-25 10:35 ` Andy Shevchenko
0 siblings, 1 reply; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-09-25 10:23 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Andy Shevchenko, Kuppuswamy Sathyanarayanan,
Linus Walleij, Peng Fan (OSS),
linux-kernel, Peng Fan, linux-gpio, Bartosz Golaszewski,
Bartosz Golaszewski
On Fri, 25 Sep 2026 12:12:30 +0200, Andy Shevchenko
<andriy.shevchenko@intel.com> said:
> On Fri, Sep 25, 2026 at 09:54:42AM +0000, Bartosz Golaszewski wrote:
>> On Fri, 25 Sep 2026 10:27:55 +0200, Andy Shevchenko
>> <andy.shevchenko@gmail.com> said:
>> > On Fri, Sep 25, 2026 at 11:14 AM Bartosz Golaszewski
>> > <bartosz.golaszewski@oss.qualcomm.com> wrote:
>> >> On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
>> >> > Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
>> >> > the simpler regmap_assign_bits() call.
>> >>
>> >> Applied, thanks!
>> >>
>> >> [1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
>> >> https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
>> >
>> > Are you going to handle all the Intel GPIO drivers that have a
>> > MAINTAINERS record?
>>
>> Sorry, backing it up. We really need to organize GPIO drivers by vendor...
>
> Do you want me to start intel subfolder?
>
I already did[1]!
Bart
[1] https://lore.kernel.org/all/20260925-gpio-organize-by-vendor-v1-1-8feefd60581b@oss.qualcomm.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-25 10:23 ` Bartosz Golaszewski
@ 2026-09-25 10:35 ` Andy Shevchenko
2026-09-25 13:58 ` Bartosz Golaszewski
0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2026-09-25 10:35 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, Andy Shevchenko, Kuppuswamy Sathyanarayanan,
Linus Walleij, Peng Fan (OSS),
linux-kernel, Peng Fan, linux-gpio, Bartosz Golaszewski
On Fri, Sep 25, 2026 at 10:23:52AM +0000, Bartosz Golaszewski wrote:
> On Fri, 25 Sep 2026 12:12:30 +0200, Andy Shevchenko
> <andriy.shevchenko@intel.com> said:
> > On Fri, Sep 25, 2026 at 09:54:42AM +0000, Bartosz Golaszewski wrote:
> >> On Fri, 25 Sep 2026 10:27:55 +0200, Andy Shevchenko
> >> <andy.shevchenko@gmail.com> said:
> >> > On Fri, Sep 25, 2026 at 11:14 AM Bartosz Golaszewski
> >> > <bartosz.golaszewski@oss.qualcomm.com> wrote:
> >> >> On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
> >> >> > Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
> >> >> > the simpler regmap_assign_bits() call.
> >> >>
> >> >> Applied, thanks!
> >> >>
> >> >> [1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
> >> >> https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
> >> >
> >> > Are you going to handle all the Intel GPIO drivers that have a
> >> > MAINTAINERS record?
> >>
> >> Sorry, backing it up. We really need to organize GPIO drivers by vendor...
> >
> > Do you want me to start intel subfolder?
> >
>
> I already did[1]!
>
> Bart
>
> [1] https://lore.kernel.org/all/20260925-gpio-organize-by-vendor-v1-1-8feefd60581b@oss.qualcomm.com/
Sorry, but I have my own approach which I prefer over yours. I will share patches soon.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
2026-09-25 10:35 ` Andy Shevchenko
@ 2026-09-25 13:58 ` Bartosz Golaszewski
0 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-09-25 13:58 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Andy Shevchenko, Kuppuswamy Sathyanarayanan,
Linus Walleij, Peng Fan (OSS),
linux-kernel, Peng Fan, linux-gpio, Bartosz Golaszewski,
Bartosz Golaszewski
On Fri, 25 Sep 2026 12:35:42 +0200, Andy Shevchenko
<andriy.shevchenko@intel.com> said:
> On Fri, Sep 25, 2026 at 10:23:52AM +0000, Bartosz Golaszewski wrote:
>> On Fri, 25 Sep 2026 12:12:30 +0200, Andy Shevchenko
>> <andriy.shevchenko@intel.com> said:
>> > On Fri, Sep 25, 2026 at 09:54:42AM +0000, Bartosz Golaszewski wrote:
>> >> On Fri, 25 Sep 2026 10:27:55 +0200, Andy Shevchenko
>> >> <andy.shevchenko@gmail.com> said:
>> >> > On Fri, Sep 25, 2026 at 11:14 AM Bartosz Golaszewski
>> >> > <bartosz.golaszewski@oss.qualcomm.com> wrote:
>> >> >> On Thu, 24 Sep 2026 16:35:11 +0800, Peng Fan (OSS) wrote:
>> >> >> > Replace if/else block using regmap_set_bits()/regmap_clear_bits() with
>> >> >> > the simpler regmap_assign_bits() call.
>> >> >>
>> >> >> Applied, thanks!
>> >> >>
>> >> >> [1/1] gpio: wcove: use regmap_assign_bits() for conditional set/clear
>> >> >> https://git.kernel.org/brgl/c/428cb7603f95d0ee6fad06cbf56321b1bdeaaa85
>> >> >
>> >> > Are you going to handle all the Intel GPIO drivers that have a
>> >> > MAINTAINERS record?
>> >>
>> >> Sorry, backing it up. We really need to organize GPIO drivers by vendor...
>> >
>> > Do you want me to start intel subfolder?
>> >
>>
>> I already did[1]!
>>
>> Bart
>>
>> [1] https://lore.kernel.org/all/20260925-gpio-organize-by-vendor-v1-1-8feefd60581b@oss.qualcomm.com/
>
> Sorry, but I have my own approach which I prefer over yours. I will share patches soon.
>
Sure, I'm certain your approach is yourer than miner. :)
Bart
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-09-25 13:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24 8:35 [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear Peng Fan (OSS)
2026-09-25 8:14 ` Bartosz Golaszewski
2026-09-25 8:27 ` Andy Shevchenko
2026-09-25 9:54 ` Bartosz Golaszewski
2026-09-25 10:12 ` Andy Shevchenko
2026-09-25 10:23 ` Bartosz Golaszewski
2026-09-25 10:35 ` Andy Shevchenko
2026-09-25 13:58 ` Bartosz Golaszewski
2026-09-25 10:13 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®