[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <251de70b-5f70-5ec8-cd94-17d030be380f@nvidia.com>
Date: Tue, 3 Oct 2023 13:32:12 -0700
From: Dipen Patel <dipenp@...dia.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>
Cc: Aaro Koskinen <aaro.koskinen@....fi>,
Janusz Krzysztofik <jmkrzyszt@...il.com>,
Tony Lindgren <tony@...mide.com>,
Russell King <linux@...linux.org.uk>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Hans de Goede <hdegoede@...hat.com>,
Mark Gross <markgross@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-acpi@...r.kernel.org, timestamp@...ts.linux.dev,
linux-tegra@...r.kernel.org, platform-driver-x86@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 07/21] gpiolib: provide gpio_device_get_base()
On 9/7/23 12:57 AM, Bartosz Golaszewski wrote:
> On Thu, Sep 7, 2023 at 9:17 AM Linus Walleij <linus.walleij@...aro.org> wrote:
>>
>> On Tue, Sep 5, 2023 at 8:53 PM Bartosz Golaszewski <brgl@...ev.pl> wrote:
>>
>>> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>>>
>>> Let's start adding getters for the opaque struct gpio_device. Start with
>>> a function allowing to retrieve the base GPIO number.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>>
>> I guess you have a solid usecase for drivers needing to do this
>> crazy thing, because I suppose you feel as much as me that
>> this should rather be gpiolib-internal and confined to
>> drivers/gpio/gpiolib.h?
>>
>> If you add a valid reason for making this globally visible outside
>> of drivers/[gpio|pinctrl] to the commit message I guess I can live
>> with it because we need to think of the bigger picture:
>> Acked-by: Linus Walleij <linus.walleij@...aro.org>
>>
>> It brings to mind the now confusing "base" inside of
>> struct gpio_chip. We all know it should go away, but since it
>> is never used during the lifetime of the gpio_chip - or SHOULD
>> never be used - it should rather be an argument to
>> [devm_]gpiochip_add_data( .... int base);...
>>
>> Maybe something we should add to our TODO file.
>>
>> Yours,
>> Linus Walleij
>
> For this series it's the HTE driver that uses it and I don't have a
> good idea about how to change it. Dipen?
Missed responding to this, apologies. I believe we are having similar
discussion in the hte only patch. We can continue discussing there.
>
> I would also love to make pinctrl not use the internal GPIOLIB header
> so it'll be another user, unless you can figure out a way to not use
> gc->base? :)
>
> I think we're stuck with it for now.
>
> Bart
Powered by blists - more mailing lists