[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aJyEzsbYrwwzCdcL@smile.fi.intel.com>
Date: Wed, 13 Aug 2025 15:27:58 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Matti Vaittinen <mazziesaccount@...il.com>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Marcelo Schmitt <marcelo.schmitt@...log.com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
Tobias Sperling <tobias.sperling@...ting.com>,
Antoniu Miclaus <antoniu.miclaus@...log.com>,
Trevor Gamblin <tgamblin@...libre.com>,
Esteban Blanc <eblanc@...libre.com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Subject: Re: [PATCH] iio: adc: bd79124: Add GPIOLIB dependency
On Wed, Aug 13, 2025 at 02:17:44PM +0200, Bartosz Golaszewski wrote:
> On Wed, Aug 13, 2025 at 12:07 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Wed, Aug 13, 2025 at 11:40 AM Bartosz Golaszewski <brgl@...ev.pl> wrote:
> > > On Wed, 13 Aug 2025 11:16:06 +0200, Matti Vaittinen
> > > <mazziesaccount@...il.com> said:
...
> > > As for the former: it seems it's
> > > a common pattern for the headers containing the "provider" part of the
> > > subystem API, you'd get the same issue with regulators or pinctrl.
> > >
> > > I don't have a good answer, I'd just apply this as it's not a common issue
> > > from what I can tell.
> >
> > If the GPIO functionality is optional (not the main one), the user
> > should be able to compile it conditionally, in such a case it's either
> > an ifdeffery in the code, or separate module with its own stubs.
>
> Honestly, it makes much more sense to factor out that optional
> functionality into its own compilation unit that can be left out
> completely for !CONFIG_GPIOLIB with a single internal registration
> function being stubbed within the driver.
That's what I suggested under "separate module with its own stubs" above.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists