RE: [PATCH 2/2] gpio: gpio-adg1414: New driver

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

 



> -----Original Message-----
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Sent: Wednesday, January 24, 2024 5:51 AM
> To: Paller, Kim Seer <KimSeer.Paller@xxxxxxxxxx>
> Cc: Bartosz Golaszewski <brgl@xxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Rob Herring
> <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>
> Subject: Re: [PATCH 2/2] gpio: gpio-adg1414: New driver
> 
> [External]
> 
> Hi Kim,
> 
> On Tue, Jan 23, 2024 at 11:31 AM Paller, Kim Seer
> <KimSeer.Paller@xxxxxxxxxx> wrote:
> 
> > > Locking here is simple enough that you could use the SPI regmap and
> > > get it to do the serialization for you. And then you could possibly
> > > reuse the gpio-regmap abstraction and get an even smaller footprint.
> >
> > I could not seem to figure out how to use the SPI regmap in this case.
> > Since the number of daisy-chained devices depends on the length of
> > data transferred with continuous transaction, I could not determine
> > how to implement that using the SPI regmap. Or maybe I misunderstood
> > the statement. However, is it still acceptable to use the current approach?
> 
> You just override or wrap with your own read/write callbacks if necessary
> by defining a custom static struct regmap_bus.
> 
> For example in drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> I do this.
> 
> It may not save a lot of code in this case but it's still worth it because
> we understand what regmap_read/write/update_bits do and reading
> and understanding adg1414_set/get cognitively require more from us
> as maintainers.

Hi Linus,

I'll check this out.

Thanks,
Kim




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux