mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpiolib: cdev: remove redundant store of debounce_period_us
@ 2024-10-20 11:52 Kent Gibson
  2024-10-22  7:16 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Kent Gibson @ 2024-10-20 11:52 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, brgl, linus.walleij; +Cc: Kent Gibson

debounce_setup() stores the debounce_period_us if the driver supports
debounce, but the debounce_period_us is also stored where debounce_setup()
is called, independent of whether the debounce is being perfomed by
hardware or software.

Remove the redundant storing of the debounce_period_us in
debounce_setup().

Signed-off-by: Kent Gibson <warthog618@gmail.com>
---

Based on gpio/for-next with v5 of your recent notify series.

 drivers/gpio/gpiolib-cdev.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 13d83675bf4f..0ec162b0ea04 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -929,10 +929,6 @@ static int debounce_setup(struct line *line, unsigned int debounce_period_us)
 	ret = gpio_do_set_config(line->desc,
 			pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE,
 						 debounce_period_us));
-	if (!ret) {
-		WRITE_ONCE(line->desc->debounce_period_us, debounce_period_us);
-		return ret;
-	}
 	if (ret != -ENOTSUPP)
 		return ret;
 

base-commit: 94fe8eced6e1448378bb368c9f14c9af510670d4
-- 
2.39.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpiolib: cdev: remove redundant store of debounce_period_us
  2024-10-20 11:52 [PATCH] gpiolib: cdev: remove redundant store of debounce_period_us Kent Gibson
@ 2024-10-22  7:16 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2024-10-22  7:16 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, brgl, linus.walleij, Kent Gibson
  Cc: Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Sun, 20 Oct 2024 19:52:38 +0800, Kent Gibson wrote:
> debounce_setup() stores the debounce_period_us if the driver supports
> debounce, but the debounce_period_us is also stored where debounce_setup()
> is called, independent of whether the debounce is being perfomed by
> hardware or software.
> 
> Remove the redundant storing of the debounce_period_us in
> debounce_setup().
> 
> [...]

Applied, thanks!

[1/1] gpiolib: cdev: remove redundant store of debounce_period_us
      commit: 9eb1e8276155b9f540281f2dbf59885efbb9f09f

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-22  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-20 11:52 [PATCH] gpiolib: cdev: remove redundant store of debounce_period_us Kent Gibson
2024-10-22  7:16 ` Bartosz Golaszewski

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®