linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic <linux-amlogic@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v5 1/6] gpiolib: Introduce a helper to get first GPIO controller node
Date: Thu, 5 May 2022 15:05:52 +0200	[thread overview]
Message-ID: <CAMRc=Mef77ejvzx2Pg1P_xzozxb1VjxGtArfvFdS=Cgq-8Mbwg@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VcpZPB12Y4FVN4h9RdkvYQfELtbRnd08FfPpG1cJG-99g@mail.gmail.com>

On Tue, Apr 26, 2022 at 12:29 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, Apr 26, 2022 at 12:27 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > On Thu, Apr 14, 2022 at 9:02 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > Introduce a helper to get first GPIO controller node which drivers
> > > may want to use.
>
> > > +static inline struct fwnode_handle *gpiochip_node_get_first(struct device *dev)
> > > +{
> > > +       struct fwnode_handle *fwnode;
> > > +
> > > +       for_each_gpiochip_node(dev, fwnode)
> > > +               return fwnode;
> > > +
> > > +       return NULL;
> > > +}
> > > +
> > >  #endif /* __LINUX_GPIO_DRIVER_H */
> > > --
> > > 2.35.1
> > >
> >
> > Any chance you could name it get_first_gpiochip_node()? It's static so
> > we don't have to worry about the prefix and it would make the purpose
> > more clear.
>
> There are two things why I prefer it as is:
> 1) it's static inline, so it's part of (internal) but still exported API;
> 2) it's already in my for-next branch which I would like not to
> rebase, until it's a really serious issue.
>
> That said, if you still insist I can rename it.

No that's fine and I also pulled that into my tree.

Bart

  reply	other threads:[~2022-05-05 13:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220414190251eucas1p1ef520fa995057550fa533eb34a02ae63@eucas1p1.samsung.com>
2022-04-14 19:02 ` [PATCH v5 0/6] gpiolib: more helpers and fwnode conversion Andy Shevchenko
2022-04-14 19:02   ` [PATCH v5 1/6] gpiolib: Introduce a helper to get first GPIO controller node Andy Shevchenko
2022-04-25 18:52     ` Bartosz Golaszewski
2022-04-26 10:29       ` Andy Shevchenko
2022-05-05 13:05         ` Bartosz Golaszewski [this message]
2022-05-05 13:17           ` Andy Shevchenko
2022-04-14 19:02   ` [PATCH v5 2/6] pinctrl: armada-37xx: Switch to use fwnode instead of of_node Andy Shevchenko
2022-04-14 19:02   ` [PATCH v5 3/6] pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register() Andy Shevchenko
2022-04-14 19:02   ` [PATCH v5 4/6] pinctrl: meson: Rename REG_* to MESON_REG_* Andy Shevchenko
2022-04-14 19:02   ` [PATCH v5 5/6] pinctrl: meson: Enable COMPILE_TEST Andy Shevchenko
2022-04-14 19:02   ` [PATCH v5 6/6] pinctrl: meson: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-04-14 20:28   ` [PATCH v5 0/6] gpiolib: more helpers and fwnode conversion Marek Szyprowski
2022-04-19 21:51   ` Linus Walleij

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='CAMRc=Mef77ejvzx2Pg1P_xzozxb1VjxGtArfvFdS=Cgq-8Mbwg@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregory.clement@bootlin.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=sebastian.hesselbarth@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).