[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47ae0fa6-8005-4c8c-9409-3189ba6f42af@baylibre.com>
Date: Thu, 27 Feb 2025 15:54:13 -0600
From: David Lechner <dlechner@...libre.com>
To: 7c5e2364-038b-48a8-ad67-3cf0f2fd2be3@...libre.com
Cc: Linus Walleij <linus.walleij@...aro.org>,
Jonathan Santos <Jonathan.Santos@...log.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Sergiu Cuciurean <sergiu.cuciurean@...log.com>, lars@...afoo.de,
Michael.Hennerich@...log.com, marcelo.schmitt@...log.com, jic23@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
marcelo.schmitt1@...il.com
Subject: Re: [PATCH RESEND v3 12/17] iio: adc: ad7768-1: Add GPIO controller
support
On 2/27/25 3:36 PM, Jonathan Santos wrote:
> On 02/20, David Lechner wrote:
>> On 2/19/25 2:34 PM, Linus Walleij wrote:
>>> Hi Jonathan/Sergiu,
>>>
>>> thanks for your patch!
>>>
>>> On Wed, Feb 12, 2025 at 7:20 PM Jonathan Santos
>>> <Jonathan.Santos@...log.com> wrote:
>>>
>>>> From: Sergiu Cuciurean <sergiu.cuciurean@...log.com>
>>>>
>>>> The AD7768-1 has the ability to control other local hardware (such as gain
>>>> stages),to power down other blocks in the signal chain, or read local
>>>> status signals over the SPI interface.
>>>>
>>>> This change exports the AD7768-1's four gpios and makes them accessible
>>>> at an upper layer.
>>>>
>>>> Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@...log.com>
>>>> Co-developed-by: Jonathan Santos <Jonathan.Santos@...log.com>
>>>> Signed-off-by: Jonathan Santos <Jonathan.Santos@...log.com>
>>>
>>> Is it not possible to use the gpio regmap library in this driver
>>> like we do in drivers/iio/addac/stx104.c?
>>>
>>> It cuts down the code size of simple GPIO chips on random
>>> chips quite a lot.
>>>
>>> Yours,
>>> Linus Walleij
>>
>> I think the answer is "no" since we need to hold a conditional lock
>> while accessing registers. Namely: iio_device_claim_direct_mode()/
>> iio_device_release_direct_mode().
>>
>> Unless we add some extra stuff to the gpio regmap implementation to
>> add optional callbacks to call these. Which could be worth it given
>> that quite a few ADCs provide GPIOs like this.
>
> Since this patch set is quite large already, is it worth to do this
> here? if you say it is necessary, i can try this.
>
>>
I'm a big fan of not trying to implement every single possible
feature in one big patch series, but rather splitting it up.
Powered by blists - more mailing lists