From: Linus Walleij <linusw@kernel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Jon Hunter <jonathanh@nvidia.com>
Subject: Re: [PATCH] gpio: shared: call gpio_chip::of_xlate() if set
Date: Tue, 17 Mar 2026 09:47:28 +0100 [thread overview]
Message-ID: <CAD++jLm5M4BbFP4HuGFX2Jr8PBYgLzCdQqfRE3t3N-dqNxqEFg@mail.gmail.com> (raw)
In-Reply-To: <20260316-gpio-shared-xlate-v1-1-0ce07a1362d2@oss.qualcomm.com>
On Mon, Mar 16, 2026 at 2:52 PM Bartosz Golaszewski
<bartosz.golaszewski@oss.qualcomm.com> wrote:
> OF-based GPIO controller drivers may provide a translation function that
> calculates the real chip offset from whatever devicetree sources
> provide. We need to take this into account in the shared GPIO management
> and call of_xlate() if it's provided and adjust the entry->offset we
> initially set when scanning the tree.
>
> To that end: modify the shared GPIO API to take the GPIO chip as
> argument on setup (to avoid having to rcu_dereference() it from the GPIO
> device) and protect the access to entry->offset with the existing lock.
>
> Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Closes: https://lore.kernel.org/all/921ba8ce-b18e-4a99-966d-c763d22081e2@nvidia.com/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
That was a tricky one!
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
next prev parent reply other threads:[~2026-03-17 8: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 [this message]
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
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=CAD++jLm5M4BbFP4HuGFX2Jr8PBYgLzCdQqfRE3t3N-dqNxqEFg@mail.gmail.com \
--to=linusw@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=jonathanh@nvidia.com \
--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®