From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Alan Stern" <stern@rowland.harvard.edu>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-pci@vger.kernel.org, "Arnd Bergmann" <arnd@kernel.org>,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 09/38] gpio: add HAS_IOPORT dependencies
Date: Fri, 28 Apr 2023 16:41:24 +0200 [thread overview]
Message-ID: <9a0feb128bc3b26ca444367ce4ee44e80aa9f469.camel@linux.ibm.com> (raw)
In-Reply-To: <CACRpkdbS1U8_qakdWV0YZq3bhr1NvFuL0Umv3QsXD0wYu7Hd9A@mail.gmail.com>
On Wed, 2023-03-15 at 09:42 +0100, Linus Walleij wrote:
> Hi Niklas,
>
> thanks for your patch!
>
> On Tue, Mar 14, 2023 at 1:12 PM Niklas Schnelle <schnelle@linux.ibm.com> wrote:
> >
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. We thus need to add HAS_IOPORT as dependency for
> > those drivers using them.
> >
> > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > ---
> > drivers/gpio/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index 13be729710f2..5a874e67fc13 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -688,7 +688,7 @@ config GPIO_VISCONTI
> >
> > config GPIO_VX855
> > tristate "VIA VX855/VX875 GPIO"
> > - depends on (X86 || COMPILE_TEST) && PCI
> > + depends on (X86 || COMPILE_TEST) && PCI && HAS_IOPORT
>
> But is this the right fix? Further down in the Kconfig we have:
>
> menu "Port-mapped I/O GPIO drivers"
> depends on X86 # Unconditional I/O space access
>
> config GPIO_I8255
> tristate
> select GPIO_REGMAP
>
> (...)
>
> Isn't the right fix to:
>
> 1) Move this Kconfig entry (VX855) down under the Port-mapped /O drivers,
> and then:
>
> 2) Make the whole submenu for port-mapped IO drivers depend on
> X86 && HAS_IOPORT
>
> Yours,
> Linus Walleij
Makes sense I changed it to the above approach for v4. One thing this
makes me wonder is if then one should change the X86 dependency to at
least X86 || COMPILE_TEST or even remove it and rely on HAS_IOPORT. The
comment there at least suggests that it is there only for the I/O space
access.
Thanks,
Niklas
next prev parent reply other threads:[~2023-04-28 14:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230314121216.413434-1-schnelle@linux.ibm.com>
2023-03-14 12:11 ` [PATCH v3 09/38] gpio: add HAS_IOPORT dependencies Niklas Schnelle
2023-03-15 8:42 ` Linus Walleij
2023-04-28 14:41 ` Niklas Schnelle [this message]
2023-05-01 12:29 ` Linus Walleij
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=9a0feb128bc3b26ca444367ce4ee44e80aa9f469.camel@linux.ibm.com \
--to=schnelle@linux.ibm.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).