From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH 1/2] gpiolib: rename gpio_set_debounce_timeout() for consistency
Date: Mon, 4 Sep 2023 09:34:09 +0200 [thread overview]
Message-ID: <20230904073410.5880-1-brgl@bgdev.pl> (raw)
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
All other functions that manipulate a struct gpio_desc use the gpiod_
prefix. Follow this convention and rename gpio_set_debounce_timeout() to
gpiod_set_debounce_timeout().
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpiolib-acpi.c | 5 +++--
drivers/gpio/gpiolib.c | 4 ++--
drivers/gpio/gpiolib.h | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index fbda452fb4d6..4a390d8f6544 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -341,7 +341,7 @@ static struct gpio_desc *acpi_request_own_gpiod(struct gpio_chip *chip,
return desc;
/* ACPI uses hundredths of milliseconds units */
- ret = gpio_set_debounce_timeout(desc, agpio->debounce_timeout * 10);
+ ret = gpiod_set_debounce_timeout(desc, agpio->debounce_timeout * 10);
if (ret)
dev_warn(chip->parent,
"Failed to set debounce-timeout for pin 0x%04X, err %d\n",
@@ -1087,7 +1087,8 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *name, in
return ret;
/* ACPI uses hundredths of milliseconds units */
- ret = gpio_set_debounce_timeout(desc, info.debounce * 10);
+ ret = gpiod_set_debounce_timeout(desc,
+ info.debounce * 10);
if (ret)
return ret;
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index edffa0d2acaa..6fab0f211e67 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2377,7 +2377,7 @@ static int gpio_set_bias(struct gpio_desc *desc)
}
/**
- * gpio_set_debounce_timeout() - Set debounce timeout
+ * gpiod_set_debounce_timeout() - Set debounce timeout
* @desc: GPIO descriptor to set the debounce timeout
* @debounce: Debounce timeout in microseconds
*
@@ -2386,7 +2386,7 @@ static int gpio_set_bias(struct gpio_desc *desc)
*
* Returns 0 on success, or negative error code otherwise.
*/
-int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce)
+int gpiod_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce)
{
return gpio_set_config_with_argument_optional(desc,
PIN_CONFIG_INPUT_DEBOUNCE,
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 9bff5c2cf720..9ea5b88ad304 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -219,7 +219,7 @@ static inline int gpiod_request_user(struct gpio_desc *desc, const char *label)
int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
unsigned long lflags, enum gpiod_flags dflags);
-int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);
+int gpiod_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);
int gpiod_hog(struct gpio_desc *desc, const char *name,
unsigned long lflags, enum gpiod_flags dflags);
int gpiochip_get_ngpios(struct gpio_chip *gc, struct device *dev);
--
2.39.2
next reply other threads:[~2023-09-04 7:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 7:34 Bartosz Golaszewski [this message]
2023-09-04 7:34 ` [PATCH 2/2] gpiolib: rename gpio_chip_hwgpio() for consistency Bartosz Golaszewski
2023-09-04 9:27 ` Andy Shevchenko
2023-09-05 8:37 ` Bartosz Golaszewski
2023-09-05 10:33 ` Andy Shevchenko
2023-09-05 11:26 ` Bartosz Golaszewski
2023-09-05 11:59 ` Andy Shevchenko
2023-09-06 21:39 ` Linus Walleij
2023-09-04 9:24 ` [PATCH 1/2] gpiolib: rename gpio_set_debounce_timeout() " Andy Shevchenko
2023-09-04 9:30 ` Andy Shevchenko
2023-09-05 8:36 ` 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=20230904073410.5880-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--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.