From: "Andrew Jeffery" <andrew@aj.id.au>
To: "Linus Walleij" <linus.walleij@linaro.org>
Cc: "Linux LED Subsystem" <linux-leds@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"Cédric Le Goater" <clg@kaod.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Joel Stanley" <joel@jms.id.au>, "Pavel Machek" <pavel@ucw.cz>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
linux-aspeed <linux-aspeed@lists.ozlabs.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/6] pinctrl: Add pinctrl_gpio_as_pin()
Date: Wed, 11 Aug 2021 09:54:53 +0930 [thread overview]
Message-ID: <53199b3e-a711-4071-96a3-7836d3323906@www.fastmail.com> (raw)
In-Reply-To: <CACRpkdZ4A3Lw2U+_jXfbuXJFhpesi3SzNN1Codqxi4sLNu5zPw@mail.gmail.com>
On Tue, 10 Aug 2021, at 23:04, Linus Walleij wrote:
> On Fri, Jul 23, 2021 at 9:59 AM Andrew Jeffery <andrew@aj.id.au> wrote:
>
> > 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 <andrew@aj.id.au>
>
> (...)
>
> Hm this looks a bit strange...
>
> > +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.
>
> > +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
next prev parent reply other threads:[~2021-08-11 0:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 7:58 [RFC PATCH 0/6] leds: Fix pca955x GPIO pin mappings Andrew Jeffery
2021-07-23 7:58 ` [RFC PATCH 1/6] pinctrl: Add pinctrl_gpio_as_pin() Andrew Jeffery
2021-08-10 13:34 ` Linus Walleij
2021-08-11 0:24 ` Andrew Jeffery [this message]
2021-07-23 7:58 ` [RFC PATCH 2/6] pinctrl: Add hook for device-specific map parsing Andrew Jeffery
2021-07-23 7:58 ` [RFC PATCH 3/6] leds: pca955x: Relocate chipdef-related descriptors Andrew Jeffery
2021-07-23 7:58 ` [RFC PATCH 4/6] leds: pca955x: Use pinctrl to map GPIOs to pins Andrew Jeffery
2021-08-10 13:54 ` Linus Walleij
2021-08-11 0:19 ` Andrew Jeffery
2021-07-23 7:58 ` [RFC PATCH 5/6] ARM: dts: rainier: Add presence-detect and fault indictor GPIO expander Andrew Jeffery
2021-07-23 7:58 ` [RFC PATCH 6/6] pinctrl: Check get_group_pins callback on init Andrew Jeffery
[not found] ` <CAHp75VeQML7njMZ6x8kC-ZJVexC1xJ6n1cB3JneVMAVfuOJgWw@mail.gmail.com>
2021-07-28 5:43 ` [RFC PATCH 0/6] leds: Fix pca955x GPIO pin mappings Andrew Jeffery
2021-07-28 9:13 ` Andy Shevchenko
2021-07-29 0:38 ` Andrew Jeffery
2021-07-29 7:40 ` Andy Shevchenko
2021-08-03 4:07 ` Andrew Jeffery
2021-08-03 10:33 ` Andy Shevchenko
2021-08-04 4:55 ` Andrew Jeffery
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53199b3e-a711-4071-96a3-7836d3323906@www.fastmail.com \
--to=andrew@aj.id.au \
--cc=clg@kaod.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®