On Thu, Feb 20, 2025 at 2:24 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > > Hi Bartosz, > > On Thu, 20 Feb 2025 at 12:06, Bartosz Golaszewski <brgl@xxxxxxxx> wrote: > > On Tue, Feb 18, 2025 at 5:04 PM Koichiro Den <koichiro.den@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> > > > > --- 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. 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@xxxxxxxxxxxxxx > > 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