From: Marek Szyprowski <m.szyprowski@samsung.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
Subject: Re: [PATCH 3/3] gpio: shared: allow sharing a reset-gpios pin between reset-gpio and gpiolib
Date: Mon, 5 Jan 2026 18:26:06 +0100 [thread overview]
Message-ID: <3cb799ed-6760-481b-991d-5d90a23b9128@samsung.com> (raw)
In-Reply-To: <CAMRc=Mc7dqqpNTb9WSLD7ZZr9dmUTO_rvujJi3LhhjVncjE-8w@mail.gmail.com>
On 05.01.2026 13:28, Bartosz Golaszewski wrote:
> On Mon, Jan 5, 2026 at 12:50 PM Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
>> On 22.12.2025 11:01, Bartosz Golaszewski wrote:
>>> We currently support sharing GPIOs between multiple devices whose drivers
>>> use either the GPIOLIB API *OR* the reset control API but not both at
>>> the same time.
>>>
>>> There's an unlikely corner-case where a reset-gpios pin can be shared by
>>> one driver using the GPIOLIB API and a second using the reset API. This
>>> will currently not work as the reset-gpio consumers are not described in
>>> firmware at the time of scanning so the shared GPIO just chooses one of
>>> the proxies created for the consumers when the reset-gpio driver performs
>>> the lookup. This can of course conflict in the case described above.
>>>
>>> In order to fix it: if we deal with the "reset-gpios" pin that's shared
>>> acconding to the firmware node setup, create a proxy for each described
>>> consumer as well as another one for the potential reset-gpio device. To
>>> that end: rework the matching to take this into account.
>>>
>>> Fixes: 7b78b26757e0 ("gpio: shared: handle the reset-gpios corner case")
>>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
>> This patch landed in linux-next as commit 49416483a953 ("gpio: shared:
>> allow sharing a reset-gpios pin between reset-gpio and gpiolib"). In my
>> tests I found that it breaks booting and triggers warnings on some of my
>> test boards. Reverting it on top of next-20260105 fixes those issues.
>> Let me know if I can help debugging this issue.
>>
>>
>> Here are relevant logs from my 3 test systems:
>>
> Thanks for the report.
>
> Nice combo, it looks like these are three separate bugs...
>
>> 1. Samsung TM2e - arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts
>>
>> exynos-dsi 13900000.dsi: [drm:samsung_dsim_host_attach] Attached s6e3hf2
>> device (lanes:4 bpp:24 mode-flags:0x6e0)
>> Unable to handle kernel NULL pointer dereference at virtual address
> Could you use faddr2line to point me to the exact offending line? This
> would speed up the debugging.
I need some time to get that output, but this issue is caused by a
devm_gpiod_get_optional() call for a gpio that is not defined for that
board.
> > ...
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2026-01-05 17:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 10:01 [PATCH 0/3] gpio: shared: close remaining gaps Bartosz Golaszewski
2025-12-22 10:01 ` [PATCH 1/3] gpiolib: allow multiple lookup tables per consumer Bartosz Golaszewski
2025-12-22 10:01 ` [PATCH 2/3] gpio: shared: verify con_id when adding proxy lookup Bartosz Golaszewski
2025-12-22 10:01 ` [PATCH 3/3] gpio: shared: allow sharing a reset-gpios pin between reset-gpio and gpiolib Bartosz Golaszewski
[not found] ` <CGME20260105115023eucas1p1af1f8e80041f94843beb664966894fb9@eucas1p1.samsung.com>
2026-01-05 11:50 ` Marek Szyprowski
2026-01-05 12:28 ` Bartosz Golaszewski
2026-01-05 17:26 ` Marek Szyprowski [this message]
2026-01-05 18:16 ` Marek Szyprowski
2026-01-06 10:55 ` Bartosz Golaszewski
2026-01-05 15:53 ` Bartosz Golaszewski
2026-01-06 12:21 ` Mark Brown
2026-01-06 12:25 ` Bartosz Golaszewski
2026-01-08 15:46 ` Mark Brown
2026-01-08 15:52 ` Bartosz Golaszewski
2026-01-08 16:29 ` Mark Brown
2026-01-08 18:04 ` Bartosz Golaszewski
2026-01-02 9:34 ` [PATCH 0/3] gpio: shared: close remaining gaps 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=3cb799ed-6760-481b-991d-5d90a23b9128@samsung.com \
--to=m.szyprowski@samsung.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 \
/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®