mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	Linus Walleij <linusw@kernel.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] gpio: shared: call gpio_chip::of_xlate() if set
Date: Tue, 17 Mar 2026 13:46:52 +0000	[thread overview]
Message-ID: <d05d4468-84f7-4692-8381-e0742f1f2749@nvidia.com> (raw)
In-Reply-To: <CAMRc=MfK_eqbWDdEQHHWgAyz-zMWyW5G=DF8eNh0o+iyt=BtOg@mail.gmail.com>


On 17/03/2026 13:43, Bartosz Golaszewski wrote:
> On Tue, Mar 17, 2026 at 1:53 PM Jon Hunter <jonathanh@nvidia.com> wrote:
>>
>>>
>>> I suppose this is not a reset-gpio-like use-case? Could you point me
>>> to the DTS you're using? I've reproduced the bug with a dummy dts and
>>> xlate function in gpio-sim and this patch fixes it but maybe I'm
>>> missing something.
>>
>> So the board I originally observed this on is a farm board with camera
>> hardware I don't have. So like you I started off reproducing locally
>> with a dummy dts by making the following change ...
>>
>> diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi
>> index f6cad29355e6..5e62ffb425f4 100644
>> --- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi
>> +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi
>> @@ -389,14 +389,14 @@ gpio-keys {
>>
>>                   key-force-recovery {
>>                           label = "Force Recovery";
>> -                       gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
>> +                       gpios = <&gpio TEGRA234_MAIN_GPIO(AF, 2) GPIO_ACTIVE_LOW>;
> 
> The difference between my test and this is that I used foo-gpios vs
> gpios here. I was thinking this would be the culprit but when I
> changed my setup to replicate it, it works fine...
> 
>>                           linux,input-type = <EV_KEY>;
>>                           linux,code = <BTN_1>;
>>                   };
>>
>>                   key-power {
>>                           label = "Power";
>> -                       gpios = <&gpio_aon TEGRA234_AON_GPIO(EE, 4) GPIO_ACTIVE_LOW>;
>> +                       gpios = <&gpio TEGRA234_MAIN_GPIO(AF, 2) GPIO_ACTIVE_LOW>;
>>                           linux,input-type = <EV_KEY>;
>>                           linux,code = <KEY_POWER>;
>>                           wakeup-event-action = <EV_ACT_ASSERTED>;
>>
>>
>> With this I see ...
>>
>>    gpiolib_shared: GPIO 154 owned by tegra234-gpio is shared by multiple consumers
>>    gpiolib_shared: Setting up a shared GPIO entry for key-force-recovery (con_id: '(none)')
>>    gpiolib_shared: Created an auxiliary GPIO proxy gpiolib_shared.proxy.3 for GPIO device tegra234-gpio
>>    gpiolib_shared: Setting up a shared GPIO entry for key-power (con_id: '(none)')
>>    gpiolib_shared: Created an auxiliary GPIO proxy gpiolib_shared.proxy.4 for GPIO device tegra234-gpio
> 
> This looks correct.
> 
>>    ...
>>    gpio-keys gpio-keys: error -ENXIO: Unable to determine IRQ# for button #0
>>
> 
> Is the above error linked to the issue?

Yes, that the final error message I see after the WARNING splat, hence, 
I was thinking that this is somehow linked to the above.

>> I am not sure if this is because these are child nodes of gpio-keys?
>> Obviously this is not a proper example, but something quick and dirty
>> for local testing :-)
>>
> 
> Let me create a setup with GPIO keys then.

Thanks!
Jon

-- 
nvpublic


  reply	other threads:[~2026-03-17 13:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 13:52 Bartosz Golaszewski
2026-03-17  8:47 ` Linus Walleij
2026-03-17 10:12 ` Jon Hunter
2026-03-17 11:44   ` Bartosz Golaszewski
2026-03-17 12:53     ` Jon Hunter
2026-03-17 13:43       ` Bartosz Golaszewski
2026-03-17 13:46         ` Jon Hunter [this message]
2026-03-17 14:05           ` Bartosz Golaszewski
2026-03-17 15:19             ` Bartosz Golaszewski
2026-03-17 22:46               ` Jon Hunter
2026-03-18  8:09                 ` Bartosz Golaszewski
2026-03-18 19:09                   ` Jon Hunter
2026-03-19  9:41                     ` Bartosz Golaszewski
2026-03-20  4:49                       ` Tzung-Bi Shih
2026-03-20 11:46                         ` Jon Hunter
2026-03-27 13:05   ` Konrad Dybcio
2026-03-17 12:53 ` Jon Hunter
2026-03-17 13:44   ` Bartosz Golaszewski

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=d05d4468-84f7-4692-8381-e0742f1f2749@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.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®