From: Christian Lamparter <chunkeey@googlemail.com>
To: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: "Mark Rutland" <mark.rutland@arm.com>,
"Alexandre Courbot" <gnurou@gmail.com>,
"Álvaro Fernández Rojas" <noltari@gmail.com>,
"Pawel Moll" <pawel.moll@arm.com>,
"Alexander Shiyan" <shc_work@mail.ru>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Kumar Gala" <galak@codeaurora.org>,
"Christian Lamparter" <chunkeey@googlemail.com>
Subject: [RFC v4 0/8] gpio: add DT support for generic memory-mapped GPIOs
Date: Thu, 28 Apr 2016 11:05:10 +0200 [thread overview]
Message-ID: <cover.1461806071.git.chunkeey@googlemail.com> (raw)
This patch series adds device tree support for generic memory-mapped GPIOs.
The GPIO library already allows drivers and architecture support code to
reuse generic code for managing a GPIO chip. Currently, a developer has
to create a platform device "basic-mmio-gpio" and attach a bgpio_pdata
platform data structure to make use of it. However, for architectures
which rely on the device tree to enumerate devices, creating custom
platform devices is another extra step that can be avoided by having
direct support via a device tree binding.
I initially came across this patch [0] from Álvaro Fernández Rojas,
while looking for an easy way to add support for the GPIO of my
WD MyBook Live [1] (APM82181 - ppc464). This generic approach patch
allowed me to easily get the GPIO (and the connected LEDs,
buttons, gpiohogs, etc.) up and running. Even tought, Mr. Fernandez
initially developed it for his work on the brcm63xx [2].
[0] <https://patchwork.ozlabs.org/patch/422121/>
[1] <https://github.com/chunkeey/MBL-openwrt>
[2] <https://wiki.openwrt.org/doc/hardware/soc/soc.broadcom.bcm63xx>
Currently, the device tree parses for the integrated drivers
(gpio-clps711x, gpio-ge, gpio-moxart and gpio-ts4800) are still
residing in their original driver .c file. This way, these
drivers don't clutter the gpio-generic.c with their own hardware
definitions and MODULE_* statements. I hoped this would make the
transition from the _probe to the parser less painless but the diff
is retty much unreadable. So the next series will consolidate them
into gpio-generic.c and then I can drop the gpio-generic -> gpio-mmio
change. I think this is now mostly a matter of how to organize things
and why not try it just once just so it was tested.
changelog:
v3 -> v4:
- renamed gpio-generic.c to gpio-mmio.c
(The gpio-generic only contains a generic mmio driver,
this confuses and angers people!)
- changed compat. string to "linux,gpio-mmio"
- integrated Cirrus clps711x driver
- integrated GE FGPA gpio-ge driver
- integrated MOXA ART GPIO driver
- integrated TS4800 gpio driver
- reshuffled patches, reworded commits, fixed spelling errors, etc.
Thanks! (Please keep me in the CC)
---
Christian Lamparter (6):
gpio: generic: fix GPIO_GENERIC_PLATFORM is set to module case
gpio: rename gpio-generic.c into gpio-mmio.c
gpio: clps711x: integrate cirrus clps711x into gpio-mmio
gpio: ge: integrate GE's FPGA GPIO into gpio-mmio
gpio: moxart: integrate MOXA ART GPIO driver into gpio-mmio
gpio: ts4800: integrate TS4800 into gpio-mmio
Álvaro Fernández Rojas (2):
gpio: generic: add DT support for generic memory-mapped GPIOs
gpio: dt-bindings: add gpio-mmio bindings
.../devicetree/bindings/gpio/gpio-mmio.txt | 73 +++++++++++++++
drivers/gpio/Kconfig | 57 ++++++------
drivers/gpio/Makefile | 11 ++-
drivers/gpio/gpio-clps711x.c | 84 ++++++-----------
drivers/gpio/gpio-ge.c | 101 ++++++---------------
drivers/gpio/gpio-mmio-compat.h | 65 +++++++++++++
drivers/gpio/{gpio-generic.c => gpio-mmio.c} | 101 ++++++++++++++++++++-
drivers/gpio/gpio-moxart.c | 81 +++++------------
drivers/gpio/gpio-ts4800.c | 76 +++++-----------
9 files changed, 376 insertions(+), 273 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.txt
create mode 100644 drivers/gpio/gpio-mmio-compat.h
rename drivers/gpio/{gpio-generic.c => gpio-mmio.c} (86%)
--
2.8.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2016-04-28 9:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 9:05 Christian Lamparter [this message]
2016-04-28 9:05 ` [RFC v4 1/8] gpio: generic: fix GPIO_GENERIC_PLATFORM is set to module case Christian Lamparter
2016-04-28 9:05 ` [RFC v4 2/8] gpio: rename gpio-generic.c into gpio-mmio.c Christian Lamparter
2016-04-29 14:14 ` Linus Walleij
2016-04-28 9:05 ` [RFC v4 3/8] gpio: generic: add DT support for generic memory-mapped GPIOs Christian Lamparter
2016-04-28 9:58 ` Andy Shevchenko
[not found] ` <CAHp75VeSf_=rQBRQ+1ox=fn7aJ53mGg_huH7HRbZck0HEhxBAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-28 23:39 ` Christian Lamparter
2016-04-28 9:05 ` [RFC v4 4/8] gpio: clps711x: integrate cirrus clps711x into gpio-mmio Christian Lamparter
[not found] ` <cover.1461806071.git.chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-04-28 9:05 ` [RFC v4 5/8] gpio: ge: integrate GE's FPGA GPIO " Christian Lamparter
2016-04-28 9:05 ` [RFC v4 6/8] gpio: moxart: integrate MOXA ART GPIO driver " Christian Lamparter
2016-04-28 9:05 ` [RFC v4 7/8] gpio: ts4800: integrate TS4800 " Christian Lamparter
2016-04-28 9:05 ` [RFC v4 8/8] gpio: dt-bindings: add gpio-mmio bindings Christian Lamparter
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=cover.1461806071.git.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gnurou@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=noltari@gmail.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=shc_work@mail.ru \
/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).