[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbW__DuyqoCO=DaFuoyjxa0fnfd-Qb6RC-FNBHYVsiN-g@mail.gmail.com>
Date: Mon, 6 May 2024 09:02:42 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Doug Berger <opendmb@...il.com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Phil Elwell <phil@...pberrypi.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>, bcm-kernel-feedback-list@...adcom.com,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] gpio: of: support gpio-ranges for multiple gpiochip devices
On Fri, May 3, 2024 at 10:21 PM Doug Berger <opendmb@...il.com> wrote:
> On 5/3/2024 1:25 AM, Linus Walleij wrote:
> > It rather looks like you are trying to accomodate the Linux numberspace
> > in the ranges, which it was explicitly designed to avoid.
> The struct gpio_chip documentation in include/linux/gpio/driver.h says:
>
> > * @offset: when multiple gpio chips belong to the same device this
> > * can be used as offset within the device so friendly names can
> > * be properly assigned.
>
> It is my understanding that this value represents the offset of a
> gpiochip relative to the GPIO controller device defined by the GPIO
> controller node in device tree. This puts it in the same number space as
> [GPIO controller offset]. I believe it was introduced for the specific
> purpose of translating [GPIO controller offset] values into
> Linux-specific offsets, which is why it is being reused for that purpose
> in this patch.
You're right, I had it confused with .base!
It's because I missed it completely when this new property was added
in 2021.
Sorry for the fuzz.
Yours,
Linus Walleij
Powered by blists - more mailing lists