From: Krzysztof Kozlowski <krzk@kernel.org>
To: Changhuang Liang <changhuang.liang@starfivetech.com>,
Linus Walleij <linusw@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Emil Renner Berthing <kernel@esmil.dk>,
Paul Walmsley <pjw@kernel.org>, Albert Ou <aou@eecs.berkeley.edu>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alexandre Ghiti <alex@ghiti.fr>,
Philipp Zabel <p.zabel@pengutronix.de>,
Bartosz Golaszewski <brgl@kernel.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
Subject: Re: [PATCH v6 03/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
Date: Sun, 30 Aug 2026 10:47:35 +0200 [thread overview]
Message-ID: <08c6dad7-8b0d-4daf-908e-5af875306f0f@kernel.org> (raw)
In-Reply-To: <ZQ4PR01MB120205984FB23C0776BD0D0AF2AA2@ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn>
On 30/08/2026 10:42, Changhuang Liang wrote:
> Hi, Krzysztof
>
> Thanks for the review.
>
>> On 30/08/2026 03:29, Changhuang Liang wrote:
>>> Hi, Krzysztof
>>>
>>> Thanks for the review.
>>>
>>>> On 29/08/2026 04:57, Changhuang Liang wrote:
>>>>> +#ifndef __DT_BINDINGS_PINCTRL_STARFIVE_JHB100_H__
>>>>> +#define __DT_BINDINGS_PINCTRL_STARFIVE_JHB100_H__
>>>>> +
>>>>> +/* sys0 pad numbers */
>>>>> +#define PADNUM_SYS0_GPIO_A0 0
>>>>> +#define PADNUM_SYS0_GPIO_A1 1
>>>>> +#define PADNUM_SYS0_GPIO_A2 2
>>>>> +#define PADNUM_SYS0_GPIO_A3 3
>>>>
>>>> I could not find how your driver uses these, so are you sure it's a
>>>> binding constant for the SW?
>>>
>>> Yes, these are not used in the driver, but in PATCH 6/8/10/12, etc.,
>>> some definitions for other GPIOs are still used. Therefore, I have
>>> uniformly defined them in the binding, and they will be provided to the
>> device tree for use later.
>>
>> I am confused. The driver in these patches 6/8/10/12 does include the header
>> but does not use them. Why do you include unused headers? Or what is
>> exactly the use?
>
> I'm sorry, I missed one thing. Actually, the current patches 4/6/8/10/12/14/16/18/20 all use this:
>
> For example, in patch 4:
>
> static const struct jhb100_pinctrl_func_maps jhb100_func_maps_sys0[] = {
> { .func = "auxpwrgood", .val = 1 },
> { .func = "gpio", .val = 0,
> .max_pin = JHB100_FUNC_MAPS_MAX_PIN(PADNUM_SYS0_GPIO_A2) },
> { .func = "gpio", .val = 1,
> .max_pin = JHB100_FUNC_MAPS_MAX_PIN(PADNUM_SYS0_GPIO_A3) },
> { .func = "hbled", .val = 1 },
> { .func = "pe2rst_out", .val = 0 },
> };
>
> These definitions are used in `struct jhb100_pinctrl_func_maps` or `struct pinvref_desc`.
OK, I was looking for PADNUM_SYS0_GPIO_A0.
Why do you need unused constants? The constants in binding headers are
interface between DTS and drivers, not hardware values. You do not need
to store there hardware values, so what is the benefit of defining
PADNUM_SYS0_GPIO_A0? Why can't PADNUM_SYS0_GPIO_A2 start at index 0?
Indices of pins are simply not bindings.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-08-30 8:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 2:56 [PATCH v6 00/21] Add basic pinctrl drivers for JHB100 SoC Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 01/21] dt-bindings: pincfg-node: Add property 'input-debounce-ns' Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 02/21] pinctrl: pinconf-generic: " Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 03/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl Changhuang Liang
2026-08-29 8:02 ` Krzysztof Kozlowski
2026-08-30 1:29 ` Changhuang Liang
2026-08-30 8:30 ` Krzysztof Kozlowski
2026-08-30 8:42 ` Changhuang Liang
2026-08-30 8:47 ` Krzysztof Kozlowski [this message]
2026-08-30 8:57 ` Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 04/21] pinctrl: starfive: Add StarFive JHB100 sys0 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 05/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 06/21] pinctrl: starfive: Add StarFive JHB100 sys0h controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 07/21] dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 08/21] pinctrl: starfive: Add StarFive JHB100 sys1 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 09/21] dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 10/21] pinctrl: starfive: Add StarFive JHB100 sys2 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 11/21] dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 12/21] pinctrl: starfive: Add StarFive JHB100 per0 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 13/21] dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 14/21] pinctrl: starfive: Add StarFive JHB100 per1 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 15/21] dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 16/21] pinctrl: starfive: Add StarFive JHB100 per2 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 17/21] dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 18/21] pinctrl: starfive: Add StarFive JHB100 per2pok controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 19/21] dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 20/21] pinctrl: starfive: Add StarFive JHB100 per3 controller driver Changhuang Liang
2026-08-29 2:57 ` [PATCH v6 21/21] riscv: dts: starfive: jhb100: Add pinctrl nodes Changhuang Liang
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=08c6dad7-8b0d-4daf-908e-5af875306f0f@kernel.org \
--to=krzk@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=brgl@kernel.org \
--cc=changhuang.liang@starfivetech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@esmil.dk \
--cc=krzk+dt@kernel.org \
--cc=lianfeng.ouyang@starfivetech.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®