From: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy@kernel.org>,
Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>,
Srinivas Neeli <srinivas.neeli@amd.com>,
Michal Simek <michal.simek@amd.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com,
linux-arm-kernel@lists.infradead.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2 1/2] gpio: wcove: use regmap_assign_bits() in .set()
Date: Tue, 15 Jul 2025 06:29:20 -0700 [thread overview]
Message-ID: <3357db65-279f-4f43-880a-966b10e10287@linux.intel.com> (raw)
In-Reply-To: <20250715-gpiochip-set-rv-gpio-remaining-v2-1-072b4cf06330@linaro.org>
On 7/15/25 1:19 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Replace the if-else with a direct call to the regmap_assign_bits()
> helper and save a couple lines of code.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.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 1ec24f6f9300f33f5b3f0f8deb539e08392b8188..816fb8d113e66b27070f286755f3192b2a8f8512 100644
> --- a/drivers/gpio/gpio-wcove.c
> +++ b/drivers/gpio/gpio-wcove.c
> @@ -208,10 +208,7 @@ static void wcove_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
> if (reg < 0)
> return;
>
> - if (value)
> - regmap_set_bits(wg->regmap, reg, 1);
> - else
> - regmap_clear_bits(wg->regmap, reg, 1);
> + regmap_assign_bits(wg->regmap, reg, 1, value);
> }
>
> static int wcove_gpio_set_config(struct gpio_chip *chip, unsigned int gpio,
>
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
next prev parent reply other threads:[~2025-07-15 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 8:19 [PATCH v2 0/2] gpio: use new GPIO line value setter callbacks in remaining drivers Bartosz Golaszewski
2025-07-15 8:19 ` [PATCH v2 1/2] gpio: wcove: use regmap_assign_bits() in .set() Bartosz Golaszewski
2025-07-15 8:21 ` Andy Shevchenko
2025-07-15 8:22 ` Andy Shevchenko
2025-07-15 13:29 ` Sathyanarayanan Kuppuswamy [this message]
2025-07-15 8:19 ` [PATCH v2 2/2] gpio: wcove: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-07-16 8:28 ` [PATCH v2 0/2] gpio: use new GPIO line value setter callbacks in remaining drivers Bartosz Golaszewski
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=3357db65-279f-4f43-880a-966b10e10287@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=andy@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=patches@opensource.cirrus.com \
--cc=shubhrajyoti.datta@amd.com \
--cc=srinivas.neeli@amd.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®