mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Changhuang Liang <changhuang.liang@starfivetech.com>,
	Rob Herring <robh@kernel.org>, Linus Walleij <linusw@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
	Paul Walmsley <pjw@kernel.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Emil Renner Berthing <kernel@esmil.dk>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Bartosz Golaszewski <brgl@kernel.org>
Subject: Re: [PATCH v5 03/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
Date: Sat, 29 Aug 2026 09:31:10 +0200	[thread overview]
Message-ID: <bd23268f-dee6-43a0-9f8a-51ae8a272082@kernel.org> (raw)
In-Reply-To: <ZQ4PR01MB1202CB0BB258ED52179F3DF4F2AB2@ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn>

On 29/08/2026 05:08, Changhuang Liang wrote:
> Hi, Rob, Krzysztof, Conor
> 
>> On Mon, Aug 17, 2026 at 02:45:22PM +0200, Linus Walleij wrote:
>>> On Fri, Aug 14, 2026 at 1:22 PM Changhuang Liang
>>> <changhuang.liang@starfivetech.com> wrote:
>>>
>>>>> You still did not explain the cells - neither in reply nor in
>>>>> commit - thus start with that. Why do you need it? Multiple
>>>>> controllers have groupped pins or GPIOs in registers, so explanation
>> "every 32 GPIOs correspond to one register"
>>>>> tells me nothing. Why would that matter how many GPIOs is in one
>> register?
>>>>
>>>> Since every 32 GPIOs correspond to one register, Linus suggested at the
>> time that I could try using:
>>>> gpios = <&gpio [instance] offset flags>; gpio-ranges = <&pinctrl
>>>> [gpio_instance] gpio_offset pin_offset count>;
>>>>
>>>> The advantage of using this is that in a GPIO controller with more
>>>> than 32 GPIOs, every 32 GPIOs can be treated as one GPIO bank. This
>>>> way, in the driver, converting pin_offset to gpio_offset does not require a
>> large number of /32 and %32 operations.
>>>>
>>>> the following is Linus's original suggestion at the time
>>>>
>> https://lore.kernel.org/all/CAD++jL=tvDBWJHRGGJw4nnox_kcJKn5hwvwz9zx
>>>> adMRedyvRhw@mail.gmail.com/
>>>
>>> Just copy this explanation into the commit so it is clear why you need
>>> three cells for this.
>>
>> "Can use gpiolib" is not really justification. Neither is avoiding a shift and/or
>> mask. I suppose there's some h/w attribute here to justify it?
> 
> I'll go ahead and send out a new version per Linus's suggestion. In the meantime, 
> if anyone has any additional thoughts or further feedback, I'd be more than happy 
> to incorporate them. Please don't hesitate to let me know!

You got feedback... having things organized per registers does not make
them a bank.

Best regards,
Krzysztof

  reply	other threads:[~2026-08-29  7:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  6:36 [PATCH v5 00/21] Add basic pinctrl drivers for JHB100 SoC Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 01/21] dt-bindings: pincfg-node: Add property 'input-debounce-ns' Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 02/21] pinctrl: pinconf-generic: " Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 03/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  9:51     ` Changhuang Liang
2026-08-10 14:40       ` Rob Herring
2026-08-11  3:09         ` Changhuang Liang
2026-08-14  1:46           ` Changhuang Liang
2026-08-14  6:47             ` Krzysztof Kozlowski
2026-08-14 11:22               ` Changhuang Liang
2026-08-17 12:45                 ` Linus Walleij
2026-08-17 13:47                   ` Rob Herring
2026-08-29  3:08                     ` Changhuang Liang
2026-08-29  7:31                       ` Krzysztof Kozlowski [this message]
2026-08-30  1:32                         ` Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 04/21] pinctrl: starfive: Add StarFive JHB100 sys0 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 05/21] dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 06/21] pinctrl: starfive: Add StarFive JHB100 sys0h controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 07/21] dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 08/21] pinctrl: starfive: Add StarFive JHB100 sys1 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 09/21] dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 10/21] pinctrl: starfive: Add StarFive JHB100 sys2 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 11/21] dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 12/21] pinctrl: starfive: Add StarFive JHB100 per0 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 13/21] dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 14/21] pinctrl: starfive: Add StarFive JHB100 per1 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 15/21] dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 16/21] pinctrl: starfive: Add StarFive JHB100 per2 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 17/21] dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 18/21] pinctrl: starfive: Add StarFive JHB100 per2pok controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 19/21] dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl Changhuang Liang
2026-08-10  8:18   ` Rob Herring (Arm)
2026-08-10  6:36 ` [PATCH v5 20/21] pinctrl: starfive: Add StarFive JHB100 per3 controller driver Changhuang Liang
2026-08-10  6:36 ` [PATCH v5 21/21] riscv: dts: starfive: jhb100: Add pinctrl nodes Changhuang Liang
2026-08-11  6:14 ` [PATCH v5 00/21] Add basic pinctrl drivers for JHB100 SoC Linus Walleij

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=bd23268f-dee6-43a0-9f8a-51ae8a272082@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®