lkml.org 
[lkml]   [2024]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/2] gpio: gpio-adg1414: New driver
Date
> -----Original Message-----
> From: Linus Walleij <linus.walleij@linaro.org>
> Sent: Wednesday, January 24, 2024 5:51 AM
> To: Paller, Kim Seer <KimSeer.Paller@analog.com>
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>; linux-gpio@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Rob Herring
> <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>
> 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@analog.com> 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
\
 
 \ /
  Last update: 2024-05-27 14:31    [W:0.039 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site