From: Krzysztof Kozlowski <krzk@kernel.org>
To: Conor Dooley <conor.dooley@microchip.com>,
Lorenzo Bianconi <lorenzo@kernel.org>
Cc: Christian Marangi <ansuelsmth@gmail.com>,
Rob Herring <robh@kernel.org>,
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
Conor Dooley <conor@kernel.org>,
Benjamin Larsson <benjamin.larsson@genexis.eu>,
Linus Walleij <linus.walleij@linaro.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sean Wang <sean.wang@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
upstream@airoha.com
Subject: Re: [PATCH v2 1/2] dt-bindings: pinctrl: airoha: Add EN7581 pinctrl controller
Date: Fri, 30 Aug 2024 13:03:46 +0200 [thread overview]
Message-ID: <09aa43d6-9e8c-4f6e-ab49-dc4a9571e832@kernel.org> (raw)
In-Reply-To: <20240830-payphone-unexposed-75eed532c14d@wendy>
On 30/08/2024 13:01, Conor Dooley wrote:
> On Fri, Aug 30, 2024 at 12:55:32PM +0200, Lorenzo Bianconi wrote:
>> [...]
>>
>>>>>>
>>>>>> Hi Rob, thanks a lot for the hint, I hope we can finally find a solution
>>>>>> on how to implement this.
>>>>>>
>>>>>> In Documentation the block is called GPIO Controller. As explained it does
>>>>>> expose pinctrl function AND pwm (with regs in the middle)
>>>>>>
>>>>>> Is this semplification really needed? It does pose some problem driver
>>>>>> wise (on where to put the driver, in what subsystem) and also on the
>>>>>
>>>>> Sorry, but no, dt-bindings do not affect the driver at all in such way.
>>>>> Nothing changes in your driver in such aspect, no dilemma where to put
>>>>> it (the same place as before).
>>>>>
>>>>
>>>> Ok, from the proposed node structure, is it problematic to move the
>>>> gpio-controller and -cells in the pinctrl node? And also the pwm-cells
>>>> to the pwm node?
>>>
>>> The move is just unnecessary and not neat. You design DTS based on your
>>> drivers architecture and this is exactly what we want to avoid.
>>>
>>>> This is similar to how it's done by broadcom GPIO MFD [1] that also
>>>
>>> There are 'reg' fields, which is the main problem here. I don't like
>>> that arguments because it entirely misses the discussions - about that
>>> binding or other bindings - happening prior to merge.
>>>
>>>> expose pinctrl and other device in the same register block as MFD
>>>> childs.
>>>>
>>>> This would be the final node block.
>>>>
>>>> mfd@1fbf0200 {
>>>> compatible = "airoha,en7581-gpio-mfd";
>>>> reg = <0x0 0x1fbf0200 0x0 0xc0>;
>>>>
>>>> interrupt-parent = <&gic>;
>>>> interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
>>>>
>>>> pio: pinctrl {
>>>> compatible = "airoha,en7581-pinctrl";
>>>>
>>>> gpio-controller;
>>>> #gpio-cells = <2>;
>>>>
>>>> interrupt-controller;
>>>> #interrupt-cells = <2>;
>>>
>>> No resources here...
>>
>> ack. iiuc, all the properties will be in the parent node (mfd) and we will
>> have just the compatible strings in the child ones, right? Something like:
>>
>> mfd@1fbf0200 {
>> compatible = "airoha,en7581-gpio-mfd";
>> reg = <0x0 0x1fbf0200 0x0 0xc0>;
>> gpio-controller;
>> #gpio-cells = <2>;
>>
>> ...
>> #pwm-cells = <3>;
>>
>> pio: pinctrl {
>> compatible = "airoha,en7581-pinctrl";
>> };
>>
>> pwm: pwm {
>> compatible = "airoha,en7581-pwm";
>> };
>> };
>
>
> Didn't Rob basically tell you how to do it earlier in the thread?
> What you've got now makes no sense, the compatibles only exist in that
> to probe drivers, which you can do from the mfd driver with
> mfd_add_devices() or w/e that function is called.
Yep, we are making circles.
I will repeat:
"The move is just unnecessary and not neat. You design DTS based on your
drivers architecture and this is exactly what we want to avoid."
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-08-30 11:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 9:40 [PATCH v2 0/2] Add pinctrl support to EN7581 SoC Lorenzo Bianconi
2024-08-22 9:40 ` [PATCH v2 1/2] dt-bindings: pinctrl: airoha: Add EN7581 pinctrl controller Lorenzo Bianconi
2024-08-22 16:06 ` Conor Dooley
2024-08-22 19:02 ` Lorenzo Bianconi
2024-08-22 20:50 ` Benjamin Larsson
2024-08-23 16:14 ` Conor Dooley
2024-08-23 15:08 ` Christian Marangi
2024-08-23 21:17 ` Lorenzo Bianconi
2024-08-26 17:07 ` Conor Dooley
2024-08-27 7:38 ` Benjamin Larsson
2024-08-27 8:46 ` Lorenzo Bianconi
2024-08-27 14:35 ` Rob Herring
2024-08-27 18:29 ` Christian Marangi
2024-08-29 6:20 ` Krzysztof Kozlowski
2024-08-30 8:50 ` Christian Marangi
2024-08-30 10:28 ` Krzysztof Kozlowski
2024-08-30 10:55 ` Lorenzo Bianconi
2024-08-30 11:01 ` Conor Dooley
2024-08-30 11:03 ` Krzysztof Kozlowski [this message]
2024-08-22 9:40 ` [PATCH v2 2/2] pinctrl: airoha: Add support for EN7581 SoC Lorenzo Bianconi
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=09aa43d6-9e8c-4f6e-ab49-dc4a9571e832@kernel.org \
--to=krzk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=ansuelsmth@gmail.com \
--cc=benjamin.larsson@genexis.eu \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=sean.wang@kernel.org \
--cc=upstream@airoha.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).