From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Yinbo Zhu <zhuyinbo@loongson.cn>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Jianmin Lv <lvjianmin@loongson.cn>,
wanghongliang@loongson.cn, loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v3 1/2] gpio: dt-bindings: add parsing of loongson gpio offset
Date: Thu, 10 Aug 2023 08:08:31 +0200 [thread overview]
Message-ID: <2d5b0f37-ac1e-c22a-9389-959fcfa74668@linaro.org> (raw)
In-Reply-To: <36dd6038-933d-1513-1426-9c1283f3cbf8@loongson.cn>
On 10/08/2023 05:35, Yinbo Zhu wrote:
>
>
> 在 2023/8/9 下午9:00, Krzysztof Kozlowski 写道:
>> On 09/08/2023 09:28, Yinbo Zhu wrote:
>>>>
>>>>> - gpio-ranges
>>>>> - interrupts
>>>>>
>>>>> @@ -49,11 +82,16 @@ examples:
>>>>> #include <dt-bindings/interrupt-controller/irq.h>
>>>>>
>>>>> gpio0: gpio@1fe00500 {
>>>>> - compatible = "loongson,ls2k-gpio";
>>>>> + compatible = "loongson,ls2k1000-gpio";
>>>>> reg = <0x1fe00500 0x38>;
>>>>> ngpios = <64>;
>>>>> #gpio-cells = <2>;
>>>>> gpio-controller;
>>>>> + loongson,gpio-conf-offset = <0>;
>>>>> + loongson,gpio-in-offset = <0x20>;
>>>>> + loongson,gpio-out-offset = <0x10>;
>>>>> + loongson,gpio-ctrl-mode = <0>;
>>>>> + loongson,gpio-inten-offset = <0x30>;
>>>>
>>>> I still think that you just embed the programming model into properties,
>>>> instead of using dedicated compatible for different blocks. It could be
>>>> fine, although I would prefer to check it with your DTS
>>>
>>> Okay, I got it, and if I understand correctly, you seem to agree with
>>> me adding attributes like this.
>>>
>>> And, if using this method that programming model into dts properites,
>>> then when adding a new platform's GPIO, there is no longer a need to
>>> modify the driver because gpio controller is compatible and different
>>> platform can use a same compatible.
>>
>> Uhu, so there we are. You use this method now to avoid new compatibles.
>> No, therefore I do not agree.
>
>
> I don't seem to got it, if the GPIO controllers of two platforms are
> compatible, shouldn't they use the same compatible?
They can use the same fallback compatible, but you should have specific
compatible anyway. However they are not compatible, because programming
model is different.-
>
>>
>>>
>>>>
>>>> Where is your DTS?
>>>
>>>
>>> Sorry, the dts containing gpio nodes are only available in the product
>>> code and have not been sent to the community yet.
>>
>> Does not help to convince us, but it is your right. With this and above
>> explanation, my answer is no - NAK.
>
>
> The community work for DTS on the 2K platform is still ongoing. Do I
> need to add a GPIO DTS node based on the following DTS to request your
> review? so that you can more conveniently review whether my patch is
> suitable.
>
> 2k1000
> https://lore.kernel.org/all/99bdbfc66604b4700e3e22e28c3d27ef7c9c9af7.1686882123.git.zhoubinbin@loongson.cn/
>
> 2k500
> https://lore.kernel.org/all/c7087046a725e7a2cfde788185112c150e216f1b.1686882123.git.zhoubinbin@loongson.cn/
>
> 2k2000
> https://lore.kernel.org/all/977009099c38177c384fca5a0ee77ebbe50e3ea2.1686882123.git.zhoubinbin@loongson.cn/
If you want to convince us that your properties makes sense, adding GPIO
nodes there would be helpful.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-08-10 6:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 7:40 [PATCH v3 0/2] gpio: loongson: add firmware offset parse support Yinbo Zhu
2023-08-07 7:40 ` [PATCH v3 1/2] gpio: dt-bindings: add parsing of loongson gpio offset Yinbo Zhu
2023-08-08 12:05 ` Conor Dooley
2023-08-09 7:47 ` Yinbo Zhu
2023-08-09 15:39 ` Conor Dooley
2023-08-10 6:19 ` Yinbo Zhu
2023-08-11 14:25 ` Bartosz Golaszewski
2023-08-14 3:39 ` Yinbo Zhu
2023-08-14 19:18 ` Krzysztof Kozlowski
2023-08-15 8:59 ` Linus Walleij
2023-08-23 3:37 ` Yinbo Zhu
2023-08-08 15:05 ` Krzysztof Kozlowski
2023-08-09 7:28 ` Yinbo Zhu
2023-08-09 13:00 ` Krzysztof Kozlowski
2023-08-10 3:35 ` Yinbo Zhu
2023-08-10 6:08 ` Krzysztof Kozlowski [this message]
2023-08-07 7:40 ` [PATCH v3 2/2] gpio: loongson: add firmware offset parse support Yinbo Zhu
2023-08-10 8:27 ` Linus Walleij
2023-08-11 3:50 ` Yinbo Zhu
2023-08-14 21:48 ` andy.shevchenko
2023-08-23 7:36 ` Yinbo Zhu
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=2d5b0f37-ac1e-c22a-9389-959fcfa74668@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=lvjianmin@loongson.cn \
--cc=robh+dt@kernel.org \
--cc=wanghongliang@loongson.cn \
--cc=zhuyinbo@loongson.cn \
/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).