From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Bartosz Golaszewski" <brgl@bgdev.pl>
Cc: "Arnd Bergmann" <arnd@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Peng Fan" <peng.fan@nxp.com>, "Lee Jones" <lee@kernel.org>,
"Koichiro Den" <koichiro.den@canonical.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Alexander Sverdlin" <alexander.sverdlin@gmail.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: make legacy interfaces optional
Date: Thu, 24 Jul 2025 16:36:11 +0200 [thread overview]
Message-ID: <88b2b76f-ab02-4d3d-9503-1122e9c2b538@app.fastmail.com> (raw)
In-Reply-To: <aIDu8McZRsk8xspV@smile.fi.intel.com>
On Wed, Jul 23, 2025, at 16:17, Andy Shevchenko wrote:
> On Wed, Jul 23, 2025 at 10:39:32AM +0200, Bartosz Golaszewski wrote:
>> On Tue, Jul 22, 2025 at 5:36 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> ...
>
>> > +#ifdef CONFIG_GPIOLIB
>> > +#include <linux/gpio/consumer.h>
>>
>> I want to queue this ASAP but do we really need this guard here?
>> consumer.h already guards against !CONFIG_GPIOLIB internally, right?
>
> I probably missed something, but I do not understand why we need this include
> at all in the gpio.h.
We've been thinning out linux/gpio.h over the years on both the contents
and the inclusions, but I'm fairly sure that out of the 173 files that
still include it, the majority actually need the consumer interfaces.
One thing I've considered doing here was to make this file only contain
two lines
#include <linux/gpio/consumer.h>
#include <linux/gpio/legacy.h>
then then replace all of the remaining users with one or the other
in order to remove linux/gpio.h completely.
I think both approaches are useful and can be combined, but the
CONFIG_GPIOLIB_LEGACY patch seems sufficient for now.
If you want to experiment with the other one, you could try
my whole series and drop the #include <linux/gpio/consumer.h>
line to find all the instances in allmodconfig builds that should
use that in place of linux/gpio.h.
Arnd
next prev parent reply other threads:[~2025-07-24 14:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 15:35 Arnd Bergmann
2025-07-22 16:27 ` Alexander Sverdlin
2025-07-23 8:39 ` Bartosz Golaszewski
2025-07-23 14:17 ` Andy Shevchenko
2025-07-24 14:36 ` Arnd Bergmann [this message]
2025-07-24 14:22 ` Arnd Bergmann
2025-07-24 14:24 ` Bartosz Golaszewski
2025-07-23 14:15 ` Andy Shevchenko
2025-07-24 14:25 ` (subset) " Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=88b2b76f-ab02-4d3d-9503-1122e9c2b538@app.fastmail.com \
--to=arnd@arndb.de \
--cc=alexander.sverdlin@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@kernel.org \
--cc=brgl@bgdev.pl \
--cc=geert+renesas@glider.be \
--cc=koichiro.den@canonical.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ukleinek@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®