Thread (37 messages) 37 messages, 10 authors, 2025-02-04

Re: [PATCH 00/13] gpiolib: add gpiods_set_array_value_cansleep

From: Bartosz Golaszewski <hidden>
Date: 2025-02-04 08:52:33
Also in: linux-gpio, linux-iio, linux-mmc, linux-phy, linux-sound, lkml

On Mon, Feb 3, 2025 at 11:39 PM David Lechner [off-list ref] wrote:
On 2/1/25 1:47 PM, Andy Shevchenko wrote:
quoted
On Sat, Feb 1, 2025 at 6:22 PM Bartosz Golaszewski [off-list ref] wrote:
quoted
On Sat, Feb 1, 2025 at 5:17 PM David Lechner [off-list ref] wrote:
quoted
On 2/1/25 10:14 AM, Bartosz Golaszewski wrote:
quoted
On Sat, Feb 1, 2025 at 5:09 PM David Lechner [off-list ref] wrote:
quoted
On 2/1/25 4:36 AM, Bartosz Golaszewski wrote:
...
quoted
quoted
quoted
quoted
quoted
This looks good to me except for one thing: the function prefix. I would
really appreciate it if we could stay within the existing gpiod_ namespace and
not add a new one in the form of gpiods_.

Maybe: gpiod_multiple_set_ or gpiod_collected_set...?
I was waiting for someone to complain about the naming. ;-)

I was going for as short as possible, but OK, the most obvious prefix to me
would be `gpio_descs_...` (to match the first parameter). Any objections to
that?
Yes, objection! As far as any exported interfaces go: in my book
"gpio_" is the prefix for legacy symbols we want to go away and
"gpiod_" is the prefix for current, descriptor-based API. Anything
else is a no-go. I prefer a longer name that starts with gpiod_ over
anything that's shorter but doesn't.
Oops, that was a typo. I meant to write gpiod_descs_.
Eh... the D in gpioD already stands for "GPIO Descriptor" but if
there's no better option in your opinion than I guess I can live with
that.
gpiod_set_many_value_cansleep() ?
OK, taking all these suggestions into consideration along with having recently
come across regmap_multi_reg_write(), I think I'll go with:

gpiod_multi_set_value_cansleep()
Sounds good.

Bart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help