From: Alban <albeu@free.fr>
To: Manuel Lauss <manuel.lauss@gmail.com>
Cc: "Aban Bedel" <albeu@free.fr>,
Linux-MIPS <linux-mips@linux-mips.org>,
"Ralf Baechle" <ralf@linux-mips.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
"Tejun Heo" <tj@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Florian Fainelli" <florian@openwrt.org>,
"Joe Perches" <joe@perches.com>,
"Daniel Walter" <dwalter@google.com>,
"Sergey Ryazanov" <ryazanov.s.a@gmail.com>,
"Huacai Chen" <chenhc@lemote.com>,
"Andrew Bresticker" <abrestic@chromium.org>,
"James Hartley" <james.hartley@imgtec.com>,
"Paul Burton" <paul.burton@imgtec.com>,
"Waldemar Brodkorb" <wbx@openadk.org>,
"James Hogan" <james.hogan@imgtec.com>,
"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
"Levente Kurusa" <levex@linux.com>
Subject: Re: [PATCH] MIPS: Remove most of the custom gpio.h
Date: Thu, 23 Jul 2015 10:40:56 +0200 [thread overview]
Message-ID: <20150723104056.3cb903d0@tock> (raw)
In-Reply-To: <CAOLZvyE=PJUEzp7NqN+g9N1FASxSpfRJTV_uJeAppTxF3sRLhQ@mail.gmail.com>
On Wed, 22 Jul 2015 19:47:18 +0200
Manuel Lauss <manuel.lauss@gmail.com> wrote:
> On Wed, Jul 22, 2015 at 7:33 PM, Alban Bedel <albeu@free.fr> wrote:
> > Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS
> > machines, and each machine type provides its own gpio.h. However
> > only the Alchemy machine really use the feature, all other machines
> > only use the default wrappers.
> >
> > For most machine types we can just remove the custom gpio.h, as well
> > as the custom wrappers if some exists. A few more fixes are need in
> > a few drivers as they rely on linux/gpio.h to provides some machine
> > specific definitions, or used asm/gpio.h instead of linux/gpio.h for
> > the gpio API.
> >
> > Signed-off-by: Alban Bedel <albeu@free.fr>
> > ---
> >
> > This patch is based on my previous serie:
> > "MIPS: ath79: Move the GPIO driver to drivers/gpio".
> >
> > For testing I tried to build all mips defconfig, however my
> > toolchain couldn't handle a few configs: ip28 malta_qemu_32r6
> > maltasmvp_eva sead3micro. If somebody can test these that would be
> > more than welcome.
> >
> > It might well be that some more drivers for MIPS devices that are
> > not enabled in the defconfig will break because of this change, so
> > more testing would be nice :)
> >
> > Regarding Alchemy I'm not sure what to do. It use a little more
> > complex setup, quoting arch/mips/include/asm/mach-au1x00/gpio.h:
> >
> > /* Linux gpio framework integration.
> > *
> > * 4 use cases of Alchemy GPIOS:
> > *(1) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=y:
> > * Board must register gpiochips.
> > *(2) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=n:
> > * A gpiochip for the 75 GPIOs is registered.
> > *
> > *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y:
> > * the boards' gpio.h must provide the linux gpio wrapper
> > functions,
> > *
> > *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n:
> > * inlinable gpio functions are provided which enable access
> > to the
> > * Au1300 gpios only by using the numbers straight out of the
> > data-
> > * sheets.
> >
> > * Cases 1 and 3 are intended for boards which want to provide their
> > own
> > * GPIO namespace and -operations (i.e. for example you have 8 GPIOs
> > * which are in part provided by spare Au1300 GPIO pins and in part
> > by
> > * an external FPGA but you still want them to be accssible in linux
> > * as gpio0-7. The board can of course use the alchemy_gpioX_*
> > functions
> > * as required).
> > */
> >
> > This sound to me like this is really not needed anymore. Is there
> > any users of this left, or can it just go?
>
> There are no in-tree users of this, but a few out-of-tree ones (all
> made by me) Does it have to be removed? Is it blocking anything?
It is not blocking anything, but I see little gain in it. Cases 1 and 3
should nowadays be handled using normal GPIO drivers, and not with such
platform specific constructs.
Alban
WARNING: multiple messages have this Message-ID (diff)
From: Alban <albeu@free.fr>
To: Manuel Lauss <manuel.lauss@gmail.com>
Cc: "Aban Bedel" <albeu@free.fr>,
Linux-MIPS <linux-mips@linux-mips.org>,
"Ralf Baechle" <ralf@linux-mips.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
"Tejun Heo" <tj@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Florian Fainelli" <florian@openwrt.org>,
"Joe Perches" <joe@perches.com>,
"Daniel Walter" <dwalter@google.com>,
"Sergey Ryazanov" <ryazanov.s.a@gmail.com>,
"Huacai Chen" <chenhc@lemote.com>,
"Andrew Bresticker" <abrestic@chromium.org>,
"James Hartley" <james.hartley@imgtec.com>,
"Paul Burton" <paul.burton@imgtec.com>,
"Waldemar Brodkorb" <wbx@openadk.org>,
"James Hogan" <james.hogan@imgtec.com>,
"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
"Levente Kurusa" <levex@linux.com>,
"abdoulaye berthe" <berthe.ab@gmail.com>,
"Wolfram Sang" <wsa@the-dreams.de>,
LKML <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-input@vger.kernel.org,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] MIPS: Remove most of the custom gpio.h
Date: Thu, 23 Jul 2015 10:40:56 +0200 [thread overview]
Message-ID: <20150723104056.3cb903d0@tock> (raw)
In-Reply-To: <CAOLZvyE=PJUEzp7NqN+g9N1FASxSpfRJTV_uJeAppTxF3sRLhQ@mail.gmail.com>
On Wed, 22 Jul 2015 19:47:18 +0200
Manuel Lauss <manuel.lauss@gmail.com> wrote:
> On Wed, Jul 22, 2015 at 7:33 PM, Alban Bedel <albeu@free.fr> wrote:
> > Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS
> > machines, and each machine type provides its own gpio.h. However
> > only the Alchemy machine really use the feature, all other machines
> > only use the default wrappers.
> >
> > For most machine types we can just remove the custom gpio.h, as well
> > as the custom wrappers if some exists. A few more fixes are need in
> > a few drivers as they rely on linux/gpio.h to provides some machine
> > specific definitions, or used asm/gpio.h instead of linux/gpio.h for
> > the gpio API.
> >
> > Signed-off-by: Alban Bedel <albeu@free.fr>
> > ---
> >
> > This patch is based on my previous serie:
> > "MIPS: ath79: Move the GPIO driver to drivers/gpio".
> >
> > For testing I tried to build all mips defconfig, however my
> > toolchain couldn't handle a few configs: ip28 malta_qemu_32r6
> > maltasmvp_eva sead3micro. If somebody can test these that would be
> > more than welcome.
> >
> > It might well be that some more drivers for MIPS devices that are
> > not enabled in the defconfig will break because of this change, so
> > more testing would be nice :)
> >
> > Regarding Alchemy I'm not sure what to do. It use a little more
> > complex setup, quoting arch/mips/include/asm/mach-au1x00/gpio.h:
> >
> > /* Linux gpio framework integration.
> > *
> > * 4 use cases of Alchemy GPIOS:
> > *(1) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=y:
> > * Board must register gpiochips.
> > *(2) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=n:
> > * A gpiochip for the 75 GPIOs is registered.
> > *
> > *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y:
> > * the boards' gpio.h must provide the linux gpio wrapper
> > functions,
> > *
> > *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n:
> > * inlinable gpio functions are provided which enable access
> > to the
> > * Au1300 gpios only by using the numbers straight out of the
> > data-
> > * sheets.
> >
> > * Cases 1 and 3 are intended for boards which want to provide their
> > own
> > * GPIO namespace and -operations (i.e. for example you have 8 GPIOs
> > * which are in part provided by spare Au1300 GPIO pins and in part
> > by
> > * an external FPGA but you still want them to be accssible in linux
> > * as gpio0-7. The board can of course use the alchemy_gpioX_*
> > functions
> > * as required).
> > */
> >
> > This sound to me like this is really not needed anymore. Is there
> > any users of this left, or can it just go?
>
> There are no in-tree users of this, but a few out-of-tree ones (all
> made by me) Does it have to be removed? Is it blocking anything?
It is not blocking anything, but I see little gain in it. Cases 1 and 3
should nowadays be handled using normal GPIO drivers, and not with such
platform specific constructs.
Alban
next prev parent reply other threads:[~2015-07-23 8:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 17:33 [PATCH] MIPS: Remove most of the custom gpio.h Alban Bedel
2015-07-22 17:33 ` Alban Bedel
2015-07-22 17:47 ` Manuel Lauss
2015-07-22 17:47 ` Manuel Lauss
2015-07-23 8:40 ` Alban [this message]
2015-07-23 8:40 ` Alban
2015-07-23 13:03 ` Linus Walleij
2015-07-23 13:03 ` Linus Walleij
2015-07-23 13:03 ` Linus Walleij
2015-07-23 18:25 ` Lars-Peter Clausen
2015-07-23 18:25 ` Lars-Peter Clausen
2015-07-27 13:20 ` Linus Walleij
2015-07-27 13:20 ` 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=20150723104056.3cb903d0@tock \
--to=albeu@free.fr \
--cc=abrestic@chromium.org \
--cc=b.zolnierkie@samsung.com \
--cc=chenhc@lemote.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dwalter@google.com \
--cc=florian@openwrt.org \
--cc=gnurou@gmail.com \
--cc=hauke@hauke-m.de \
--cc=james.hartley@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=joe@perches.com \
--cc=levex@linux.com \
--cc=linus.walleij@linaro.org \
--cc=linux-mips@linux-mips.org \
--cc=manuel.lauss@gmail.com \
--cc=paul.burton@imgtec.com \
--cc=ralf@linux-mips.org \
--cc=ryazanov.s.a@gmail.com \
--cc=tj@kernel.org \
--cc=tomi.valkeinen@ti.com \
--cc=wbx@openadk.org \
--cc=zajec5@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.