mbox series

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

Message ID 20250303160341.1322640-1-andriy.shevchenko@linux.intel.com
Headers show
Series gpiolib: Reduce 'gpio' namespace when operate over GPIOd | expand

Message

Andy Shevchenko March 3, 2025, 4 p.m. UTC
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(-)

Comments

Andy Shevchenko March 3, 2025, 4:10 p.m. UTC | #1
On Mon, Mar 03, 2025 at 06:09:21PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 03, 2025 at 06:00:34PM +0200, Andy Shevchenko wrote:
> > In order to reduce the 'gpio' namespace when operate over GPIO descriptor
> > rename gpio_do_set_config() to gpiod_do_set_config().
> 
> This change was made against my custom tree and I forgot about that.
> I will wait for the overall response to this series and if okay I
> may issue the correct patch.

Or I can send that custom change separately as a prerequisite...
Tell me what you prefer.
Linus Walleij March 4, 2025, 8:44 a.m. UTC | #2
On Mon, Mar 3, 2025 at 5:03 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> Align FLAG_* definitions in the struct gpio_desc for better readability.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Bartosz Golaszewski March 4, 2025, 1:41 p.m. UTC | #3
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,