Thread (11 messages) 11 messages, 2 authors, 2021-08-11

Re: [RFC PATCH 1/6] pinctrl: Add pinctrl_gpio_as_pin()

From: Andrew Jeffery <hidden>
Date: 2021-08-11 00:25:19
Also in: linux-arm-kernel, linux-aspeed, linux-devicetree, linux-leds, lkml


On Tue, 10 Aug 2021, at 23:04, Linus Walleij wrote:
On Fri, Jul 23, 2021 at 9:59 AM Andrew Jeffery [off-list ref] wrote:
quoted
Allow gpiochips to map the GPIO numberspace onto a pin numberspace when
the register layout for GPIO control is implemented in terms of the
pin numberspace.

This requirement sounds kind of strange, but the patch is driven by
trying to resolve a bug in the leds-pca955x driver where this mapping is
not correctly performed.

Signed-off-by: Andrew Jeffery <redacted>
(...)

Hm  this looks a bit strange...
quoted
+int pinctrl_gpio_as_pin(struct pinctrl_dev *pctldev, unsigned int gpio)
This is not a good name for this function. Try to come up with
a name that says exactly what the function does.

E.g. "apple pear as apple slice" isn't very helpful, the use case for
this is really hard to understand.
That's probably because I shouldn't be trying to do what I'm doing :)

I'll stop doing that (i.e. rework patch 4/6) and this will go away entirely.
quoted
+EXPORT_SYMBOL_GPL(pinctrl_find_gpio_range_from_pin);
This looks completely wrong.
Yeah, whoops. That was an oversight while iterating on the patch.

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