[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <uucxoejbornqxgm2h4qjxhv77aispccwxl55qelk5rynwfs6nd@vxjscvztfzlf>
Date: Fri, 21 Feb 2025 21:49:17 +0900
From: Koichiro Den <koichiro.den@...onical.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, linux-gpio@...r.kernel.org,
linus.walleij@...aro.org, maciej.borzecki@...onical.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] gpio: introduce utilities for synchronous fake
device creation
On Thu, Feb 20, 2025 at 02:27:41PM GMT, Bartosz Golaszewski wrote:
> On Thu, Feb 20, 2025 at 2:24 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> >
> > Hi Bartosz,
> >
> > On Thu, 20 Feb 2025 at 12:06, Bartosz Golaszewski <brgl@...ev.pl> wrote:
> > > On Tue, Feb 18, 2025 at 5:04 PM Koichiro Den <koichiro.den@...onical.com> wrote:
> > > > Both gpio-sim and gpio-virtuser share a mechanism to instantiate a
> > > > platform device, wait for probe completion, and retrieve the probe
> > > > success or error status synchronously. With gpio-aggregator planned to
> > > > adopt this approach for its configfs interface, it's time to factor
> > > > out the common code.
> > > >
> > > > Add dev-sync-probe.[ch] to house helper functions used by all such
> > > > implementations.
> > > >
> > > > No functional change.
> > > >
> > > > Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
> >
> > > > --- a/drivers/gpio/Kconfig
> > > > +++ b/drivers/gpio/Kconfig
> > > > @@ -1863,6 +1863,13 @@ config GPIO_MPSSE
> > > >
> > > > endmenu
> > > >
> > > > +# This symbol is selected by drivers that need synchronous fake device creation
> > >
> > > This comment is unnecessary, please drop it.
> > >
> > > > +config DEV_SYNC_PROBE
> > > > + tristate "Utilities for synchronous fake device creation"
> > >
> > > Please don't make this available for users to select, this should be a
> > > hidden symbol only to be selected by its users.
> >
> > It is still useful to make it visible for compile-testing, i.e.
> >
> > tristate "Utilities for synchronous fake device creation" if COMPILE_TEST
> >
>
> I disagree, this will get plenty of coverage being used by three
> virtual drivers.
>
> > As it does not depend on GPIO at all, I think it should be moved
> > to the end of the file, outside the big "if GPIOLIB ... endif" block.
> >
>
> Indeed. And eventually I'd like it moved to lib/ but that's for another time.
I'll move it outside the big "if GPIOLIB ... endif" block. Thanks for
pointing that out.
Koichiro
>
> Bart
>
> > > > + help
> > > > + Common helper functions for drivers that need synchronous fake
> > > > + device creation.
> > > > +
> > > > menu "Virtual GPIO drivers"
> >
> > Gr{oetje,eeting}s,
> >
> > Geert
> >
> >
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
> >
> > In personal conversations with technical people, I call myself a hacker. But
> > when I'm talking to journalists I just say "programmer" or something like that.
> > -- Linus Torvalds
Powered by blists - more mailing lists