From: Andre Przywara <andre.przywara@arm.com>
To: wens@kernel.org, Linus Walleij <linusw@kernel.org>,
Michal Piekos <michal.piekos@mmpsystems.pl>
Cc: 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 v3] pinctrl: sunxi: fix gpiochip_lock_as_irq() failure when pinmux is unknown
Date: Thu, 19 Mar 2026 15:16:33 +0100 [thread overview]
Message-ID: <dd275884-665b-46ca-a72a-c32aa189fc25@arm.com> (raw)
In-Reply-To: <CAGb2v64mBzT0_4a5qfDFVzSgZQkmkyi0TLz9qLWVtUnsG47TwA@mail.gmail.com>
Hi,
On 3/19/26 15:06, Chen-Yu Tsai wrote:
> On Thu, Mar 19, 2026 at 9:46 PM Linus Walleij <linusw@kernel.org> wrote:
>>
>> On Sat, Mar 14, 2026 at 9:10 AM Michal Piekos
>> <michal.piekos@mmpsystems.pl> wrote:
>>
>>> Fixes kernel hang during boot due to inability to set up IRQ on AXP313a.
>>>
>>> The issue is caused by gpiochip_lock_as_irq() which is failing when gpio
>>> is in unitialized state.
>>>
>>> Solution is to set pinmux to GPIO INPUT in
>>> sunxi_pinctrl_irq_request_resources() if it wasn't initialized
>>> earlier.
>>>
>>> Tested on Orange Pi Zero 3.
>>>
>>> Signed-off-by: Michal Piekos <michal.piekos@mmpsystems.pl>
>>> Suggested-by: Chen-Yu Tsai <wens@kernel.org>
>>
>> Should this have a Fixes: tag and should it be applied as an urgent fix?
>
> Fixes: 01e10d0272b9 ("pinctrl: sunxi: Implement gpiochip::get_direction()")
>
>> Tag for stable?
>
> The original patch wasn't tagged for stable. And it doesn't seem like it
> was auto picked.
>
>> Also: is there consensus with Andre that this is the way to proceed?
>
> As Andre mentioned, the mux value for "disabled" is different between
> generations. So we likely need to make the value part of
> |struct sunxi_pinctrl_desc|.
There is already the SUNXI_PINCTRL_NEW_REG_LAYOUT flag, which describes
exactly that: the new layout increased the bit field to 4 bits, moving
the HiZ value to 0xf.
But it's just a flag passed to sunxi_pinctrl_init_with_flags(), not
stored in desc, and not available during runtime. Which is what I tried
to fix for my A733 series:
https://lore.kernel.org/linux-arm-kernel/20250821004232.8134-3-andre.przywara@arm.com/
So maybe we can cherry-pick just this patch, then check for that flag?
Cheers,
Andre
>
> Michal, can you respin a version so that we can get this fixed in the
> same release?
>
>
> ChenYu
>
next prev parent reply other threads:[~2026-03-19 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 8:09 Michal Piekos
2026-03-14 8:23 ` Chen-Yu Tsai
2026-03-14 8:45 ` Michal Piekos
2026-03-16 14:37 ` Andre Przywara
2026-03-16 16:38 ` Chen-Yu Tsai
2026-03-19 13:46 ` Linus Walleij
2026-03-19 14:06 ` Chen-Yu Tsai
2026-03-19 14:16 ` Andre Przywara [this message]
2026-03-19 14:49 ` Michal Piekos
2026-03-19 14:26 ` Michal Piekos
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=dd275884-665b-46ca-a72a-c32aa189fc25@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=michal.piekos@mmpsystems.pl \
--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®