[PATCH v1 0/3] gpiolib: Reduce 'gpio' namespace when operate over GPIOd

Andy Shevchenko posted 3 patches 11 months, 1 week ago
drivers/gpio/gpiolib-acpi.c |  4 ++--
drivers/gpio/gpiolib-cdev.c |  2 +-
drivers/gpio/gpiolib.c      | 10 +++++-----
drivers/gpio/gpiolib.h      | 40 ++++++++++++++++++-------------------
4 files changed, 28 insertions(+), 28 deletions(-)
[PATCH v1 0/3] gpiolib: Reduce 'gpio' namespace when operate over GPIOd
Posted by Andy Shevchenko 11 months, 1 week ago
In order to reduce the 'gpio' namespace when operate over GPIO descriptor
rename a couple of functions.

The choice of the name in patch 2 is inspired by the existing
gpio_do_set_config() versus gpiod_set_config(). The patch 3
also fixes it to be gpiod_do_set_config(), so we establish
two namespaces here:
- gpiod_do_foo() for the internal APIs
- gpiod_foo() for the external APIs
for whatever foo that makes sense.

While at it, the ad-hoc amendment to the FLAG_* definitions to increase
readability. No functional changes intended nor made.

Andy Shevchenko (3):
  gpiolib: Align FLAG_* definitions in the struct gpio_desc
  gpiolib: Rename gpio_set_debounce_timeout() to gpiod_do_set_debounce()
  gpiolib: Rename gpio_do_set_config() --> gpiod_do_set_config()

 drivers/gpio/gpiolib-acpi.c |  4 ++--
 drivers/gpio/gpiolib-cdev.c |  2 +-
 drivers/gpio/gpiolib.c      | 10 +++++-----
 drivers/gpio/gpiolib.h      | 40 ++++++++++++++++++-------------------
 4 files changed, 28 insertions(+), 28 deletions(-)

-- 
2.47.2
Re: (subset) [PATCH v1 0/3] gpiolib: Reduce 'gpio' namespace when operate over GPIOd
Posted by Bartosz Golaszewski 11 months, 1 week ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Mon, 03 Mar 2025 18:00:31 +0200, Andy Shevchenko wrote:
> In order to reduce the 'gpio' namespace when operate over GPIO descriptor
> rename a couple of functions.
> 
> The choice of the name in patch 2 is inspired by the existing
> gpio_do_set_config() versus gpiod_set_config(). The patch 3
> also fixes it to be gpiod_do_set_config(), so we establish
> two namespaces here:
> - gpiod_do_foo() for the internal APIs
> - gpiod_foo() for the external APIs
> for whatever foo that makes sense.
> 
> [...]

Applied, thanks!

[1/3] gpiolib: Align FLAG_* definitions in the struct gpio_desc
      commit: a45faa2aba2cb2b12ad4c732c9f5692db1f7f12f

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