From: Kent Gibson <warthog618@gmail.com>
To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org
Cc: Kent Gibson <warthog618@gmail.com>
Subject: [PATCH 2/4] gpiolib: remove debounce_period_us from struct gpio_desc
Date: Tue, 12 Dec 2023 13:42:51 +0800 [thread overview]
Message-ID: <20231212054253.50094-3-warthog618@gmail.com> (raw)
In-Reply-To: <20231212054253.50094-1-warthog618@gmail.com>
cdev is the only user of the debounce_period_us field in
struct gpio_desc, and it no longer uses it, so remove it.
Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
drivers/gpio/gpiolib.c | 3 ---
drivers/gpio/gpiolib.h | 5 -----
2 files changed, 8 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 95d2a7b2ea3e..b1e81a561141 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2330,9 +2330,6 @@ static bool gpiod_free_commit(struct gpio_desc *desc)
clear_bit(FLAG_IS_HOGGED, &desc->flags);
#ifdef CONFIG_OF_DYNAMIC
desc->hog = NULL;
-#endif
-#ifdef CONFIG_GPIO_CDEV
- WRITE_ONCE(desc->debounce_period_us, 0);
#endif
ret = true;
}
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 3ccacf3c1288..a4a2520b5f31 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -147,7 +147,6 @@ void gpiod_line_state_notify(struct gpio_desc *desc, unsigned long action);
* @label: Name of the consumer
* @name: Line name
* @hog: Pointer to the device node that hogs this line (if any)
- * @debounce_period_us: Debounce period in microseconds
*
* These are obtained using gpiod_get() and are preferable to the old
* integer-based handles.
@@ -185,10 +184,6 @@ struct gpio_desc {
#ifdef CONFIG_OF_DYNAMIC
struct device_node *hog;
#endif
-#ifdef CONFIG_GPIO_CDEV
- /* debounce period in microseconds */
- unsigned int debounce_period_us;
-#endif
};
#define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
--
2.39.2
next prev parent reply other threads:[~2023-12-12 5:43 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 5:42 [PATCH 0/4] gpiolib: cdev: relocate debounce_period_us Kent Gibson
2023-12-12 5:42 ` [PATCH 1/4] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc Kent Gibson
2023-12-13 13:54 ` Andy Shevchenko
2023-12-13 14:27 ` Kent Gibson
2023-12-13 15:40 ` Bartosz Golaszewski
2023-12-13 15:59 ` Kent Gibson
2023-12-13 16:12 ` Andy Shevchenko
2023-12-13 16:15 ` Bartosz Golaszewski
2023-12-13 16:29 ` Andy Shevchenko
2023-12-13 19:03 ` Bartosz Golaszewski
2023-12-13 20:07 ` Andy Shevchenko
2023-12-14 0:18 ` Kent Gibson
2023-12-14 2:15 ` Kent Gibson
2023-12-14 9:40 ` Bartosz Golaszewski
2023-12-14 14:35 ` Andy Shevchenko
2023-12-14 14:47 ` Kent Gibson
2023-12-13 16:14 ` Bartosz Golaszewski
2023-12-13 16:15 ` Kent Gibson
2023-12-13 16:16 ` Bartosz Golaszewski
2023-12-13 16:27 ` Andy Shevchenko
2023-12-12 5:42 ` Kent Gibson [this message]
2023-12-12 5:42 ` [PATCH 3/4] gpiolib: cdev: reduce locking in gpio_desc_to_lineinfo() Kent Gibson
2023-12-13 13:56 ` Andy Shevchenko
2023-12-13 14:07 ` Kent Gibson
2023-12-13 15:05 ` Andy Shevchenko
2023-12-13 15:11 ` Kent Gibson
2023-12-13 15:28 ` Andy Shevchenko
2023-12-12 5:42 ` [PATCH 4/4] gpiolib: cdev: improve documentation of get/set values Kent Gibson
2023-12-12 17:09 ` [PATCH 0/4] gpiolib: cdev: relocate debounce_period_us Bartosz Golaszewski
2023-12-12 23:58 ` Kent Gibson
2023-12-13 10:03 ` Bartosz Golaszewski
2023-12-13 13:17 ` Kent Gibson
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=20231212054253.50094-3-warthog618@gmail.com \
--to=warthog618@gmail.com \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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