From: Linus Walleij <linus.walleij@linaro.org>
To: Bough Chen <haibo.chen@nxp.com>
Cc: Johan Korsnes <johan.korsnes@remarkable.no>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>
Subject: Re: [PATCH] gpio: vf610: add locking to gpio direction functions
Date: Fri, 14 Feb 2025 00:08:24 +0100 [thread overview]
Message-ID: <CACRpkdbCDOPGJ7wzicYcE+HA8vLVKoZLfNB2BiOY9KbYH93=rg@mail.gmail.com> (raw)
In-Reply-To: <CACRpkda7ZRR+1_6bJN+qgrsb=GQyyujg81uie6n5rX_U3tAynA@mail.gmail.com>
On Thu, Feb 13, 2025 at 10:45 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Fri, Feb 7, 2025 at 7:21 AM Bough Chen <haibo.chen@nxp.com> wrote:
> [Me]:
> > > I have no idea why this driver isn't using gpio-mmio.
> > > Not your fault though, just pointing out obvious improvement opportunities.
> >
> > I check the code, for vf610_gpio_direction_input()/vf610_gpio_direction_output(),
> > to let the input/output really works, need to call pinctrl_gpio_direction_input()
> > for vf610/imx7ulp/imx8ulp SoC.
> > Refer to drivers/pinctrl/freescale/pinctrl-vf610.c, it implement gpio_set_direction
> > callback. Also for imx7ulp/imx8ulp pinctrl drivers.
> > This should be the reason why not using gpio-mmio.
>
> If this is the *only* thing you need additionally from gpio-mmio
> then what about just adding a new flag to bgpio_init() function
> in <linux/gpio/driver.h>:
>
> #define BGPIOF_PINCTRL_BACKEND BIT(7)
>
> That makes gpio-mmio call these callbacks when setting
> direction?
It's easier if I demonstrate.
I wrote patches to do this, will send them now, test it out!
Yours,
Linus Walleij
prev parent reply other threads:[~2025-02-13 23:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 18:17 [PATCH] gpio: vf610: add locking to gpio direction functions Johan Korsnes
2025-02-06 18:23 ` Bartosz Golaszewski
2025-02-06 18:29 ` Linus Walleij
2025-02-07 6:21 ` Bough Chen
2025-02-10 8:52 ` Johan Korsnes
2025-02-10 9:35 ` Bough Chen
2025-02-13 6:12 ` Johan Korsnes
2025-02-13 6:39 ` Bough Chen
2025-02-13 21:45 ` Linus Walleij
2025-02-13 23:08 ` Linus Walleij [this message]
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='CACRpkdbCDOPGJ7wzicYcE+HA8vLVKoZLfNB2BiOY9KbYH93=rg@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=haibo.chen@nxp.com \
--cc=imx@lists.linux.dev \
--cc=johan.korsnes@remarkable.no \
--cc=linux-gpio@vger.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;
as well as URLs for NNTP newsgroup(s).