mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Pablo Mazzini <pmazzini@gmail.com>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: sunxi: dt: number the IRQ banks from the first one that has IRQs
Date: Thu, 1 Oct 2026 14:31:22 +0200	[thread overview]
Message-ID: <d9e249b7-baf9-4ad3-a3ae-b9765feca5d8@arm.com> (raw)
In-Reply-To: <CAD++jL=wEKZ5nRofe09heO8uUa4Cd12SYz3+XPhsStioQ5XTXQ@mail.gmail.com>

Hi Linus,

On 10/1/26 14:06, Linus Walleij wrote:
> On Wed, Sep 30, 2026 at 5:27 PM Andre Przywara <andre.przywara@arm.com> wrote:
> 
>> Yes, this is a known issue, and I already provided a quite different fix
>> for this[1]: the A523 manual actually lists a PortA GPIO interrupt, even
>> though this is pretty likely not functional. But specifying this IRQ in
>> the DT fixes the problem as well.
>> The DT binding does not say how the IRQs are assigned to the GPIO ports,
>> so from that point of view my solution is similarly usable as yours -
>> though admittedly yours looks a little better and more future proof.
>>
>> I guess we now need to figure out how we want to handle this in the
>> future, and add an explanation to the binding. The A733 has a similar
>> problem: PortA does not exist. This time the manual does not explicitly
>> specify a GPIO IRQ, but conspicuously leaves a gap before the PortB GPIO
>> IRQ, so we can use that as well.
>>
>> Linus, Chen-Yu, Jernej: what do you think?
> 
> Can't we do both patches? Maybe there is something I don't get with this
> code...

Well, if we change the DT and the code, they fight each other, and would 
be off by one again. So we need to decide for one solution, and since 
this affects the DT, this has compatibility implications. At the moment 
the code assumes that GPIO IRQ counting starts with PortA, regardless of 
whether this implemented or not. That does not sound very future proof: 
while A523 specifies an IRQ for PortA (even though it's not 
implemented!), I am afraid future SoCs might not.
So having Pablo's patch would make a lot of sense, but would break with 
the just changed DT for the A523. That former DT change was fine, since 
it never worked before, and the new v7.2 DT should work on older kernels 
even.
So we could revert the DT patch, and take Pablo's code patch, with a 
Fixes: tag, but that would create some broken combinations meanwhile.

And in any case we should add a word to the binding document, to pin 
down what's expected here.

Cheers,
Andre.


  reply	other threads:[~2026-10-01 12:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 20:36 Pablo Mazzini
2026-09-30 15:27 ` Andre Przywara
2026-10-01 12:06   ` Linus Walleij
2026-10-01 12:31     ` Andre Przywara [this message]
2026-10-01 12:05 ` 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=d9e249b7-baf9-4ad3-a3ae-b9765feca5d8@arm.com \
    --to=andre.przywara@arm.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=pmazzini@gmail.com \
    --cc=samuel@sholland.org \
    --cc=wens@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®