From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-pcmcia@lists.infradead.org
Cc: Alexandre Courbot <gnurou@gmail.com>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Kristoffer Ericson <kristoffer.ericson@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Robert Jarzmik <robert.jarzmik@free.fr>
Subject: [RFC PATCH 00/33] SA11x0/PXA GPIO rework (Core + PCMCIA only)
Date: Mon, 29 Aug 2016 11:23:28 +0100 [thread overview]
Message-ID: <20160829102328.GA28796@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20160829100232.GC1041@n2100.armlinux.org.uk>
Following on from the PCMCIA fixes, this series reworks GPIO on SA11x0
and PXA platforms. This is a subset of a larger series, which I'm
splitting up due to its size. This part contains the base and PCMCIA
updates. Further updates for IrDA drivers, DMA engine, serial, and
ethernet will follow in time.
Modern gpiolib provides us with a very flexible way to handle hardware
control and status signals without distributing board specifics in
drivers. Legacy board files are able to describe the relationship
between physical GPIOs to drivers through gpio lookup tables, as well
as their polarity.
Drivers using the gpio descriptor APIs are able to lookup these GPIOs,
which may be optional, and binding to the appropriate GPIO provider.
What's even nicer is that this is forwards compatible with DT.
Several platforms provide "miscellaneous" control and status registers
which are very GPIO-like. We add a fixed-direction GPIO driver to
gpiolib to support these, where the register address, number of GPIOs,
and their direction are all fixed at initialisation time. This allows
(eg) the Assabet board control/status register, the Neponset control
and modem signal registers, and Lubbock miscellaneous write register
to be modelled as a set of GPIOs.
This permits us to implement reusable drivers for PCMCIA - we can
get rid of several board specific PCMCIA drivers in favour of a more
generic driver for the SoC.
Over the full series, we have a net increase in kernel LoC of less
than 200 lines, with the following significant changes:
59 files changed, 1690 insertions(+), 1504 deletions(-)
rename arch/arm/mach-sa1100/{include/mach => }/cerf.h (66%)
delete mode 100644 arch/arm/mach-sa1100/include/mach/neponset.h
rename arch/arm/mach-sa1100/{include/mach => }/nanoengine.h (69%)
create mode 100644 drivers/gpio/gpio-reg.c
create mode 100644 drivers/pcmcia/max1600.c
create mode 100644 drivers/pcmcia/max1600.h
delete mode 100644 drivers/pcmcia/sa1100_assabet.c
delete mode 100644 drivers/pcmcia/sa1100_cerf.c
delete mode 100644 drivers/pcmcia/sa1100_nanoengine.c
create mode 100644 include/linux/gpio-reg.h
delete mode 100644 include/linux/platform_data/irda-sa11x0.h
delete mode 100644 include/linux/sa11x0-dma.h
However, deleting the unused SA-1101.h header file gives is a net
decrease in LoC.
For this series only:
arch/arm/common/sa1111.c | 227 ++++++++++++++++++--------
arch/arm/include/asm/hardware/sa1111.h | 4 -
arch/arm/mach-pxa/Kconfig | 1 +
arch/arm/mach-pxa/lubbock.c | 40 ++++-
arch/arm/mach-sa1100/Kconfig | 1 +
arch/arm/mach-sa1100/assabet.c | 130 +++++++++++++--
arch/arm/mach-sa1100/cerf.c | 18 ++-
arch/arm/mach-sa1100/clock.c | 2 +
arch/arm/mach-sa1100/generic.c | 14 +-
arch/arm/mach-sa1100/generic.h | 3 +
arch/arm/mach-sa1100/h3xxx.c | 17 ++
arch/arm/mach-sa1100/include/mach/assabet.h | 6 -
arch/arm/mach-sa1100/jornada720.c | 12 ++
arch/arm/mach-sa1100/nanoengine.c | 23 +++
arch/arm/mach-sa1100/neponset.c | 172 +++++++++++++-------
arch/arm/mach-sa1100/shannon.c | 13 ++
arch/arm/mach-sa1100/simpad.c | 12 ++
drivers/gpio/Kconfig | 6 +
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-reg.c | 139 ++++++++++++++++
drivers/gpio/gpio-sa1100.c | 218 ++++++++++++++++---------
drivers/pcmcia/Kconfig | 5 +
drivers/pcmcia/Makefile | 3 +-
drivers/pcmcia/max1600.c | 119 ++++++++++++++
drivers/pcmcia/max1600.h | 31 ++++
drivers/pcmcia/sa1100_assabet.c | 106 -------------
drivers/pcmcia/sa1100_cerf.c | 92 -----------
drivers/pcmcia/sa1100_generic.c | 129 +++++++++++++--
drivers/pcmcia/sa1100_generic.h | 3 -
drivers/pcmcia/sa1100_h3600.c | 16 +-
drivers/pcmcia/sa1100_nanoengine.c | 133 ----------------
drivers/pcmcia/sa1100_shannon.c | 29 +---
drivers/pcmcia/sa1100_simpad.c | 16 +-
drivers/pcmcia/sa1111_generic.h | 1 +
drivers/pcmcia/sa1111_jornada720.c | 81 ++++++----
drivers/pcmcia/sa1111_lubbock.c | 110 +++----------
drivers/pcmcia/sa1111_neponset.c | 79 +++------
drivers/pcmcia/soc_common.c | 238 +++++++++++++++++++---------
drivers/pcmcia/soc_common.h | 24 ++-
include/linux/gpio-reg.h | 12 ++
40 files changed, 1400 insertions(+), 886 deletions(-)
create mode 100644 drivers/gpio/gpio-reg.c
create mode 100644 drivers/pcmcia/max1600.c
create mode 100644 drivers/pcmcia/max1600.h
delete mode 100644 drivers/pcmcia/sa1100_assabet.c
delete mode 100644 drivers/pcmcia/sa1100_cerf.c
delete mode 100644 drivers/pcmcia/sa1100_nanoengine.c
create mode 100644 include/linux/gpio-reg.h
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next parent reply other threads:[~2016-08-29 10:23 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160829100232.GC1041@n2100.armlinux.org.uk>
2016-08-29 10:23 ` Russell King - ARM Linux [this message]
2016-08-29 10:24 ` [PATCH 01/33] gpio: sa1100: fix irq probing for ucb1x00 Russell King
2016-09-07 22:25 ` Linus Walleij
2016-08-29 10:24 ` [PATCH 02/33] gpio: sa1100: use sa11x0_gpio_set_wake() Russell King
2016-08-29 10:24 ` [PATCH 03/33] gpio: sa1100: convert to use IO accessors Russell King
2016-08-29 10:24 ` [PATCH 04/33] gpio: sa1100: implement get_direction method Russell King
2016-08-29 10:24 ` [PATCH 05/33] gpio: add generic single-register fixed-direction GPIO driver Russell King
2016-08-29 19:39 ` Robert Jarzmik
2016-08-29 23:12 ` Russell King - ARM Linux
2016-08-30 6:08 ` Alexander Shiyan
2016-08-30 7:41 ` Russell King - ARM Linux
2016-08-30 9:18 ` Russell King - ARM Linux
2016-08-30 16:42 ` Robert Jarzmik
2016-08-30 18:46 ` Russell King - ARM Linux
2016-08-30 21:32 ` Robert Jarzmik
2016-08-31 8:49 ` Russell King - ARM Linux
2016-08-31 10:27 ` Russell King - ARM Linux
2016-09-01 7:19 ` Robert Jarzmik
2016-09-01 9:27 ` Russell King - ARM Linux
2016-09-01 21:58 ` Robert Jarzmik
2016-09-01 23:02 ` Russell King - ARM Linux
2016-09-02 17:50 ` Robert Jarzmik
2016-09-02 18:56 ` Russell King - ARM Linux
2016-09-02 21:21 ` Robert Jarzmik
2016-09-02 23:34 ` Russell King - ARM Linux
2016-09-03 9:15 ` Russell King - ARM Linux
2016-09-03 9:09 ` Russell King - ARM Linux
2016-09-03 10:25 ` Russell King - ARM Linux
2016-09-03 11:31 ` Robert Jarzmik
2016-09-04 19:04 ` Robert Jarzmik
2016-09-04 20:18 ` Russell King - ARM Linux
2016-09-05 9:06 ` Linus Walleij
2016-09-05 12:26 ` Russell King - ARM Linux
2016-09-08 13:21 ` Linus Walleij
2016-09-14 8:50 ` Linus Walleij
2016-08-30 21:25 ` Linus Walleij
2016-08-30 21:42 ` Russell King - ARM Linux
2016-08-30 21:47 ` Linus Walleij
2016-09-02 17:00 ` Russell King - ARM Linux
2016-09-04 20:53 ` Linus Walleij
2016-08-29 10:24 ` [PATCH 06/33] ARM: pxa/lubbock: add GPIO driver for LUB_MISC_WR register Russell King
2016-08-29 19:57 ` Robert Jarzmik
2016-08-29 22:58 ` Russell King - ARM Linux
2016-08-29 10:24 ` [PATCH 07/33] ARM: sa1100/assabet: add BCR/BSR GPIO driver Russell King
2016-08-29 10:24 ` [PATCH 08/33] ARM: sa1100/neponset: add GPIO drivers for control and modem registers Russell King
2016-08-29 10:24 ` [PATCH 09/33] ARM: sa1111: implement a gpio_chip for SA1111 GPIOs Russell King
2016-08-29 10:24 ` [PATCH 10/33] pcmcia: soc_common: switch to using gpio_descs Russell King
2016-09-14 11:29 ` Linus Walleij
2016-09-14 12:10 ` Russell King - ARM Linux
2016-08-29 10:25 ` [PATCH 11/33] pcmcia: soc_common: request legacy detect GPIO with active low Russell King
2016-08-29 10:25 ` [PATCH 12/33] pcmcia: soc_common: add support for reset and bus enable GPIOs Russell King
2016-08-29 10:25 ` [PATCH 13/33] pcmcia: soc_common: restore previous socket state on error Russell King
2016-08-29 10:25 ` [PATCH 14/33] pcmcia: soc_common: add CF socket state helper Russell King
2016-08-29 10:25 ` [PATCH 15/33] pcmcia: soc_common: add support for Vcc and Vpp regulators Russell King
2016-08-29 10:25 ` [PATCH 16/33] pcmcia: soc_common: switch to a per-socket cpufreq notifier Russell King
2016-08-29 10:25 ` [PATCH 17/33] pcmcia: soc_common: constify pcmcia_low_level ops pointer Russell King
2016-08-29 10:25 ` [PATCH 18/33] pcmcia: sa1100: provide generic CF support Russell King
2016-09-14 8:52 ` Linus Walleij
2016-09-14 9:06 ` Russell King - ARM Linux
2016-09-14 11:13 ` Linus Walleij
2016-08-29 10:25 ` [PATCH 19/33] pcmcia: sa1111: add driver-data pointer Russell King
2016-08-29 10:25 ` [PATCH 20/33] pcmcia: add MAX1600 driver Russell King
2016-08-29 10:25 ` [PATCH 21/33] ARM: sa1100: provide infrastructure to support generic CF sockets Russell King
2016-08-29 10:25 ` [PATCH 22/33] ARM: sa1100/assabet: convert to " Russell King
2016-08-29 10:26 ` [PATCH 23/33] ARM: sa1100/cerf: " Russell King
2016-08-29 10:26 ` [PATCH 24/33] ARM: sa1100/h3xxx: switch h3xxx PCMCIA to use gpiod APIs Russell King
2016-08-29 10:26 ` [PATCH 25/33] ARM: sa1100/nanoengine: convert to generic CF sockets Russell King
2016-08-29 10:26 ` [PATCH 26/33] ARM: sa1100/shannon: switch shannon PCMCIA to use gpiod APIs Russell King
2016-08-29 10:26 ` [PATCH 27/33] ARM: sa1100/simpad: switch simpad CF " Russell King
2016-08-29 10:26 ` [PATCH 28/33] ARM: sa1100/neponset: add GPIOs for PCMCIA Russell King
2016-08-29 10:26 ` [PATCH 29/33] pcmcia: sa1111/neponset: convert to use MAX1600 power driver Russell King
2016-08-29 10:26 ` [PATCH 30/33] ARM: sa1100/jornada720: switch jornada720 PCMCIA to gpiod APIs Russell King
2016-08-29 10:26 ` [PATCH 31/33] ARM: pxa/lubbock: convert PCMCIA to use MAX1600 driver Russell King
2016-08-29 10:26 ` [PATCH 32/33] pcmcia: sa1100*: remove redundant bvd1/bvd2 setting Russell King
2016-08-29 10:26 ` [PATCH 33/33] ARM: sa1111: remove legacy GPIO interfaces Russell King
2016-08-30 21:31 ` [RFC PATCH 00/33] SA11x0/PXA GPIO rework (Core + PCMCIA only) Linus Walleij
2016-09-01 15:34 ` Russell King - ARM Linux
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=20160829102328.GA28796@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=daniel@zonque.org \
--cc=gnurou@gmail.com \
--cc=haojian.zhuang@gmail.com \
--cc=kristoffer.ericson@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=robert.jarzmik@free.fr \
/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).