Re: [PATCH RESEND v3 12/17] iio: adc: ad7768-1: Add GPIO controller support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 20, 2025 at 11:27 PM David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> On 2/19/25 2:34 PM, Linus Walleij wrote:

> > 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.
>
> 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().

Sorry for potentially dumb question, but if this is required to access
the registers, why is it not done in the regmap abstraction itself?
It's kind of that stuff regmap is supposed to hide.

Yours,
Linus Walleij





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux