From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: linux-gpio@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Linus Walleij <linus.walleij@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/7] gpiolib: remove gpio_set_debounce
Date: Tue, 31 Jan 2023 21:44:31 -0800 [thread overview]
Message-ID: <Y9n8P1rP+cYyoNIH@google.com> (raw)
In-Reply-To: <20230127101149.3475929-5-arnd@kernel.org>
On Fri, Jan 27, 2023 at 11:11:46AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> gpio_set_debounce() only has a single user, which is trivially
> converted to gpiod_set_debounce().
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Documentation/driver-api/gpio/legacy.rst | 2 --
> .../zh_CN/driver-api/gpio/legacy.rst | 1 -
> Documentation/translations/zh_TW/gpio.txt | 1 -
> drivers/input/touchscreen/ads7846.c | 25 ++++++++++---------
> include/linux/gpio.h | 10 --------
> 5 files changed, 13 insertions(+), 26 deletions(-)
>
> diff --git a/Documentation/driver-api/gpio/legacy.rst b/Documentation/driver-api/gpio/legacy.rst
> index a0559d93efd1..e0306e78e34b 100644
> --- a/Documentation/driver-api/gpio/legacy.rst
> +++ b/Documentation/driver-api/gpio/legacy.rst
> @@ -238,8 +238,6 @@ setup or driver probe/teardown code, so this is an easy constraint.)::
> ## gpio_free_array()
>
> gpio_free()
> - gpio_set_debounce()
> -
>
>
> Claiming and Releasing GPIOs
> diff --git a/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst b/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst
> index 74fa473bb504..dee2a0517c1c 100644
> --- a/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst
> +++ b/Documentation/translations/zh_CN/driver-api/gpio/legacy.rst
> @@ -219,7 +219,6 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其
> ## gpio_free_array()
>
> gpio_free()
> - gpio_set_debounce()
>
>
>
> diff --git a/Documentation/translations/zh_TW/gpio.txt b/Documentation/translations/zh_TW/gpio.txt
> index 1b986bbb0909..dc608358d90a 100644
> --- a/Documentation/translations/zh_TW/gpio.txt
> +++ b/Documentation/translations/zh_TW/gpio.txt
> @@ -226,7 +226,6 @@ GPIO 值的命令需要等待其信息排到隊首才發送命令,再獲得其
> ## gpio_free_array()
>
> gpio_free()
> - gpio_set_debounce()
>
>
>
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
> index 4c3dd01902d0..da3c55d9cb98 100644
> --- a/drivers/input/touchscreen/ads7846.c
> +++ b/drivers/input/touchscreen/ads7846.c
> @@ -25,8 +25,8 @@
> #include <linux/slab.h>
> #include <linux/pm.h>
> #include <linux/of.h>
> -#include <linux/of_gpio.h>
> #include <linux/of_device.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/gpio.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/ads7846.h>
> @@ -139,7 +139,7 @@ struct ads7846 {
> int (*filter)(void *data, int data_idx, int *val);
> void *filter_data;
> int (*get_pendown_state)(void);
> - int gpio_pendown;
> + struct gpio_desc *gpio_pendown;
>
> void (*wait_for_sync)(void);
> };
> @@ -222,7 +222,7 @@ static int get_pendown_state(struct ads7846 *ts)
> if (ts->get_pendown_state)
> return ts->get_pendown_state();
>
> - return !gpio_get_value(ts->gpio_pendown);
> + return !gpiod_get_value(ts->gpio_pendown);
No, we can not blindly do that without checking annotations on GPIOs.
> + ts->gpio_pendown = gpiod_get(&spi->dev, "pendown-gpio", GPIOD_IN);
Wrong name, you will be looking for "pendown-gpio-gpios".
Sorry, but I have to NAK this in the current form.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2023-02-01 5:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 10:11 [PATCH v2 0/7] gpiolib cleanups Arnd Bergmann
2023-01-27 10:11 ` [PATCH v2 1/7] gpiolib: remove empty asm/gpio.h files Arnd Bergmann
2023-01-27 13:34 ` Linus Walleij
2023-01-27 10:11 ` [PATCH v2 2/7] gpiolib: coldfire: remove custom asm/gpio.h Arnd Bergmann
2023-01-27 13:34 ` Linus Walleij
2023-01-27 10:11 ` [PATCH v2 3/7] gpiolib: remove asm-generic/gpio.h Arnd Bergmann
2023-01-27 10:41 ` Andy Shevchenko
2023-01-27 13:35 ` Linus Walleij
2023-01-27 10:11 ` [PATCH v2 4/7] gpiolib: remove gpio_set_debounce Arnd Bergmann
2023-01-27 10:51 ` Andy Shevchenko
2023-01-27 13:35 ` Linus Walleij
2023-02-01 5:44 ` Dmitry Torokhov [this message]
2023-02-01 18:32 ` Andy Shevchenko
2023-02-01 19:07 ` Dmitry Torokhov
2023-02-07 11:25 ` Andy Shevchenko
2023-02-07 14:34 ` Arnd Bergmann
2023-01-27 10:11 ` [PATCH v2 5/7] gpiolib: remove legacy gpio_export Arnd Bergmann
2023-01-27 13:36 ` Linus Walleij
2023-01-27 10:11 ` [PATCH v2 6/7] gpiolib: split linux/gpio/driver.h out of linux/gpio.h Arnd Bergmann
2023-01-27 13:39 ` Linus Walleij
2023-01-27 14:07 ` Arnd Bergmann
2023-01-27 10:11 ` [PATCH v2 7/7] gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h Arnd Bergmann
2023-01-27 13:39 ` Linus Walleij
2023-01-27 11:29 ` [PATCH v2 0/7] gpiolib cleanups Andy Shevchenko
2023-01-27 13:57 ` 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=Y9n8P1rP+cYyoNIH@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=brgl@bgdev.pl \
--cc=christophe.leroy@csgroup.eu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.