From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Andy Shevchenko <andy@kernel.org>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>
Cc: linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
linux-gpio@vger.kernel.org
Subject: [PATCH] gpio: wcove: use regmap_assign_bits() for conditional set/clear
Date: Thu, 24 Sep 2026 16:35:11 +0800 [thread overview]
Message-ID: <20260924083512.461838-1-peng.fan@oss.nxp.com> (raw)
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
next reply other threads:[~2026-09-24 8:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 8:35 Peng Fan (OSS) [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260924083512.461838-1-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=andy@kernel.org \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®