From: Khristine Andreea Barbulescu <khristineandreea.barbulescu@oss.nxp.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Chester Lin <chester62515@gmail.com>,
Matthias Brugger <mbrugger@suse.com>,
Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>,
Larisa Grigore <larisa.grigore@nxp.com>,
Lee Jones <lee@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Dong Aisheng <aisheng.dong@nxp.com>, Jacky Bai <ping.bai@nxp.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Srinivas Kandagatla <srini@kernel.org>,
Alberto Ruiz <aruizrui@redhat.com>,
Christophe Lizzi <clizzi@redhat.com>,
devicetree@vger.kernel.org, Enric Balletbo <eballetb@redhat.com>,
Eric Chanudet <echanude@redhat.com>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
NXP S32 Linux Team <s32@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH v9 6/7] pinctrl: s32cc: implement GPIO functionality
Date: Wed, 10 Jun 2026 16:33:36 +0300 [thread overview]
Message-ID: <be442821-34a9-42fe-8543-d04712dee0e1@oss.nxp.com> (raw)
In-Reply-To: <CAD++jLme25qcWpzVa44VwTmnAf+Rt7suF8DgUs5tGyM_UyNbyw@mail.gmail.com>
On 6/9/2026 1:33 AM, Linus Walleij wrote:
> Hi Khristine,
>
> On Tue, Jun 2, 2026 at 10:05 AM Khristine Andreea Barbulescu
> <khristineandreea.barbulescu@oss.nxp.com> wrote:
>
>> The new version (v10) has been updated to use gpio-regmap, with a virtual
>> regmap bridge dispatching GPIO accesses to the underlying SIUL2 register
>> blocks.
>>
>> I am not fully convinced this is the cleanest model, though.
>> SIUL2 does not expose GPIO as one regular register space: direction is in
>> MSCR, input values are read from PGPDI, and output values are written through
>> PGPDO. These are backed by separate regmaps in the driver, while gpio-regmap
>> expects a single regmap.
>
> OK I did miss that detail earlier, I definitely thought it was using a single
> regmap.
>
>> So the current path becomes:
>> gpio-regmap -> virtual regmap -> MSCR/PGPDI/PGPDO regmap
>>
>> The version was updated this way so we can review the approach on top of the
>> current code. If this is still the preferred direction, it can be polished
>> further. Otherwise, I think direct gpio_chip callbacks using the existing regmap
>> helpers might be a simpler fit for this hardware.
>>
>> What do you think would be the preferred direction for the next revision?
>
> I'm pretty much happy with either version.
>
> I see your point as to why you don't want to use gpio-regmap.
>
> I also think the virtual regmap thing looks pretty OK, it's complex
> but the driver is complex anyway.
>
> What could make the gpio-regmap approach is that it will probably
> get extended with get/set_multiple() at some point and then you
> will get that improvement for free.
>
> But I think you are the best person to choose what to use here,
> if you don't think the virtual regmap looks good, then trust your
> intuition and go back to the old design.
>
> Yours,
> Linus Walleij
Hi Linus,
Thank you for the feedback!
Since you consider that the current virtual regmap approach
looks fine and also highlighted the future improvement we
would get with get/set_multiple() in the future, I will
keep the gpio-regmap approach for now.
Best regards, Khristine
next prev parent reply other threads:[~2026-06-10 13:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 13:11 [PATCH v9 0/7] gpio: siul2-s32g2: add initial GPIO driver Khristine Andreea Barbulescu
2026-05-04 13:11 ` [PATCH v9 1/7] pinctrl: s32cc: use dev_err_probe() and improve error messages Khristine Andreea Barbulescu
2026-05-04 14:39 ` Bartosz Golaszewski
2026-05-19 11:12 ` Enric Balletbo i Serra
2026-05-25 8:45 ` Linus Walleij
2026-05-04 13:11 ` [PATCH v9 2/7] pinctrl: s32cc: add/fix some comments Khristine Andreea Barbulescu
2026-05-04 14:41 ` Bartosz Golaszewski
2026-05-04 13:11 ` [PATCH v9 3/7] pinctrl: s32cc: remove inline specifiers Khristine Andreea Barbulescu
2026-05-04 14:41 ` Bartosz Golaszewski
2026-05-04 13:11 ` [PATCH v9 4/7] pinctrl: s32cc: change to "devm_pinctrl_register_and_init" Khristine Andreea Barbulescu
2026-05-04 13:11 ` [PATCH v9 5/7] dt-bindings: pinctrl: s32g2-siul2: describe GPIO and EIRQ resources Khristine Andreea Barbulescu
2026-05-05 6:36 ` Krzysztof Kozlowski
2026-05-08 9:09 ` Khristine Andreea Barbulescu
2026-05-04 13:11 ` [PATCH v9 6/7] pinctrl: s32cc: implement GPIO functionality Khristine Andreea Barbulescu
2026-05-04 14:49 ` Bartosz Golaszewski
2026-05-05 12:46 ` Linus Walleij
2026-05-08 9:06 ` Khristine Andreea Barbulescu
2026-05-11 8:48 ` Linus Walleij
2026-06-02 8:05 ` Khristine Andreea Barbulescu
2026-06-08 22:33 ` Linus Walleij
2026-06-10 13:33 ` Khristine Andreea Barbulescu [this message]
2026-05-04 13:11 ` [PATCH v9 7/7] arm64: dts: s32g: describe GPIO and EIRQ resources in SIUL2 pinctrl node Khristine Andreea Barbulescu
2026-05-19 10:50 ` [PATCH v9 0/7] gpio: siul2-s32g2: add initial GPIO driver Enric Balletbo i Serra
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=be442821-34a9-42fe-8543-d04712dee0e1@oss.nxp.com \
--to=khristineandreea.barbulescu@oss.nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=aruizrui@redhat.com \
--cc=brgl@bgdev.pl \
--cc=chester62515@gmail.com \
--cc=clizzi@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eballetb@redhat.com \
--cc=echanude@redhat.com \
--cc=festevam@gmail.com \
--cc=ghennadi.procopciuc@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=larisa.grigore@nxp.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbrugger@suse.com \
--cc=ping.bai@nxp.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=shawnguo@kernel.org \
--cc=srini@kernel.org \
--cc=vincent.guittot@linaro.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