lkml.org 
[lkml]   [2023]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] gpiolib: rename gpio_chip_hwgpio() for consistency
On Tue, Sep 05, 2023 at 10:37:32AM +0200, Bartosz Golaszewski wrote:
> On Mon, Sep 4, 2023 at 11:27 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Sep 04, 2023 at 09:34:10AM +0200, Bartosz Golaszewski wrote:
> > > 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_chip_hwgpio() to
> > > gpiod_get_hwgpio().
> >
> > Same comment. Also, I don't think it's good idea as it steps on the exported
> > API's toes. I.o.w. I won't mix those two.
>
> Even if I agreed with your other comment, gpio_chip_hwgpio() is a
> terrible name and if I didn't know, I couldn't tell you what it does
> just from looking at the name.

That's can be improved, my previous comments were basically to avoid
mixing prefixes for internal and external APIs, let's say prefix them
similarly, but for internal with space and/or more verbose naming

gpiod_ gpio_desc_
gpiochip_ gpio_chip_
gdev_ gpio_device_

(as an example).

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-09-05 18:57    [W:0.063 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site