Commit Graph

340 Commits

Author SHA1 Message Date
Linus Torvalds 6b5a12dbca ARM: SoC multiplatform code changes for v4.5
This branch is the culmination of 5 years of effort to bring the ARMv6
 and ARMv7 platforms together such that they can all be enabled and
 boot the same kernel. It has been a tremendous amount of cleanup and
 refactoring by a huge number of people, and creation of several new
 (and major) subsystems to better abstract out all the platform details
 in an appropriate manner.
 
 The bulk of this branch is a large patchset from Arnd that brings several
 of the more minor and older platforms we have closer to multiplatform
 support.  Among these are MMP, S3C64xx, Orion5x, mv78xx0 and realview
 Much of this is moving around header files from old mach directories,
 but there are also some cleanup patches of debug_ll (lowlevel debug
 per-platform options) and other parts.
 
 Linus Walleij also has some patchs to clean up the older ARM Realview
 platforms by finally introducing DT support, and Rob Herring has some
 for ARM Versatile which is now DT-only. Both of these platforms are
 now multiplatform.
 
 Finally, a couple of patches from Russell for Dove PMU, and a fix from
 Valentin Rothberg for Exynos ADC, which were rebased on top of the
 series to avoid conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIUAwUAVqAGcmCrR//JCVInAQLDog/4x9F0PHGmZhexGfFOpi2Od63Jjx55izRU
 zRXqRjjFjambOrZuOx8lEGDy/qzqKbsDU8D1P4IUugkDr2bLSXv+NTLZL1kNBIdm
 YOlJhw/BmzLYqauOHmBzGhtv1FDUk3rqbgTsP5tTWj5LpSkwjmqui3HBZpi+f3Rr
 YOn+NeQSARiw+51D0b106a9RFshQXRGgn5m3xFjLWhJqshb2z2Ew5cogX/zdwrrM
 ss1BFomxsvgk6S+snN6v7cEX2iXe3r89qNR5jEW5BgNpQGFsAUeXPr9zzH07L/Qq
 O7XLw9jt5MX/X5372zVHPb57WoflLbF9cFaaDUZV3eTqt3lC67BTxOtYIdC2i90k
 E5GYlsy88CRwT2EO+ok/6UTryph+hVv7JqHfbKfnISrbraMCK36DtDTpBIpZ9uYF
 rRB7ncJZUWBcyoe+qvitSl+2KV54iB1ez2RXsketxM98dDZsfB2M2ImFou1F/Pgg
 ALvpifPubi/uDe7xNUsSuaT6/3jAomBuNsxnkYJ3NeiH/+duZbOYGkzK/LlcjZyc
 UrA0IpLfwIFsBNzwfpZPZ1lkEu8Y1YZZ+Hv9k65q1wMuBDgrFI5zUeYrPZi4pN9T
 Yo1xP9FstVLDouJrpGZo12VIIxR1UBeGqfRI/BZ58LEF3PRq/g2OVFsdQia5gZKr
 ddiJKSL1Vw==
 =z1AW
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC multiplatform code updates from Arnd Bergmann:
 "This branch is the culmination of 5 years of effort to bring the ARMv6
  and ARMv7 platforms together such that they can all be enabled and
  boot the same kernel.  It has been a tremendous amount of cleanup and
  refactoring by a huge number of people, and creation of several new
  (and major) subsystems to better abstract out all the platform details
  in an appropriate manner.

  The bulk of this branch is a large patchset from Arnd that brings
  several of the more minor and older platforms we have closer to
  multiplatform support.  Among these are MMP, S3C64xx, Orion5x, mv78xx0
  and realview Much of this is moving around header files from old mach
  directories, but there are also some cleanup patches of debug_ll
  (lowlevel debug per-platform options) and other parts.

  Linus Walleij also has some patchs to clean up the older ARM Realview
  platforms by finally introducing DT support, and Rob Herring has some
  for ARM Versatile which is now DT-only.  Both of these platforms are
  now multiplatform.

  Finally, a couple of patches from Russell for Dove PMU, and a fix from
  Valentin Rothberg for Exynos ADC, which were rebased on top of the
  series to avoid conflicts"

* tag 'armsoc-multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (75 commits)
  ARM: realview: don't select SMP_ON_UP for UP builds
  ARM: s3c: simplify s3c_irqwake_{e,}intallow definition
  ARM: s3c64xx: fix pm-debug compilation
  iio: exynos-adc: fix irqf_oneshot.cocci warnings
  ARM: realview: build realview-dt SMP support only when used
  ARM: realview: select apropriate targets
  ARM: realview: clean up header files
  ARM: realview: make all header files local
  ARM: no longer make CPU targets visible separately
  ARM: integrator: use explicit core module options
  ARM: realview: enable multiplatform
  ARM: make default platform work for NOMMU
  ARM: debug-ll: move DEBUG_LL_UART_EFM32 to correct Kconfig location
  ARM: defconfig: use correct debug_ll settings
  ARM: versatile: convert to multi-platform
  ARM: versatile: merge mach code into a single file
  ARM: versatile: switch to DT only booting and remove legacy code
  ARM: versatile: add DT based PCI detection
  ARM: pxa: mark ezx structures as __maybe_unused
  ARM: pxa: mark raumfeld init functions as __maybe_unused
  ...
2016-01-20 18:03:56 -08:00
Florian Fainelli a02588a0ef gpio: brcmstb: Allow building driver for BMIPS_GENERIC
BMIPS_GENERIC (arch/mips/bmips) is the Kconfig symbol associated with
Broadcom MIPS-based STB chips. Since this driver is perfectly usable on
these platforms as well, allow using it.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-01-07 16:26:53 +01:00
Andrew F. Davis 0374452968 gpio: drop surplus PCI and USB dependencies
The PCI/USB expander menus already depend on PCI/USB, drop subdependecies
on individual drivers.

Signed-off-by: Andrew F. Davis <afd@ti.com>
[Rebased to the GPIO tree]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-12-10 18:36:51 +01:00
Paul Burton dfaf19de59 gpio: pch: allow build on MIPS platforms
Allow the pch_gpio driver to be built for MIPS platforms, in preparation
for use on the MIPS Boston board.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-12-10 17:23:03 +01:00
Arnd Bergmann 0f20e456bd gpio: samsung: move gpio-samsung driver back to platform code
The gpio-samsung driver is special in the sense that it
interacts directly in multiple ways with the legacy platform
code for the s3c24xx and s3c64xx platforms. In contrast,
all devicetree based machines for Samsung, including the
ones on those two SoC families use a different driver.

The header files that define the interface between the platform
code and the gpio driver are not visible when building a
kernel for ARCH_MULTIPLATFORM, which prevents us from
turning on this option for s3c64xx.

To work around this, we now move the driver back into platform
code, from where it was originally moved to as part of commit
1b39d5f2cc ("gpio/samsung: gpio-samsung.c to support
Samsung GPIOs").

The long-term plan for this driver would be to remove it
entirely, after all Samsung machines have been converted
over to boot from DT, but there is currently no timeline
for when that might happen.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2015-12-01 21:50:24 +01:00
William Breathitt Gray 6ddcf9b486 gpio: Add GPIO support for the ACCES 104-IDI-48
The ACCES 104-IDI-48 family of PC/104 utility boards feature 48
individually optically isolated digital inputs. Enabled inputs feature
change-of-state detection capability; if change-of-state detection is
enabled, an interrupt is fired off if a change of input level
(low-to-high or high-to-low) is detected. Change-of-state IRQs are
enabled/disabled on 8-bit boundaries, for a total of six boundaries.

This driver provides GPIO and IRQ support for these 48 channels of
digital input. The base port address for the device may be configured
via the idi_48_base module parameter. The interrupt line number for the
device may be configured via the idi_48_irq module parameter.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-12-01 09:56:36 +01:00
William Breathitt Gray a11841477a gpio: Add IRQ support to ACCES 104-IDIO-16 driver
The ACCES 104-IDIO-16 series offers Change-of-State detection interrupt
functionality; if Change-of-State detection is enabled, an interrupt is
fired off if any input line changes state (i.e. goes from low to high,
or from high to low). This patch adds support to handle these interrupts
and allows the user to mask which GPIO lines are affected. The interrupt
line number for the device may be set via the idio_16_irq module
parameter.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-11-19 09:24:36 +01:00
Linus Walleij 0963670aea gpio: fix up SPI submenu
- Relax dependencies on SPI_MASTER for drivers in the SPI menu
  that already has this dependency.
- Move out the expander that would be hidden for I2C access if
  SPI_MASTER was not selected. Tentatively create a separate
  menu for this.
- Move the ZX SoC driver to memory-mapped drivers, this must be
  a mistake and only worked because the system has an SPI master
  enabled at the same time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-11-01 10:50:19 +01:00
Linus Walleij 269a46f80b gpio: drop surplus I2C dependencies
The I2C expander menu already depends on I2C, drop subdependecies
on individual drivers. Keep the instances of depends on I2C=y
though, so these are still restricted to the compiled-in case.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-11-01 10:43:16 +01:00
Linus Walleij 7768feb0f5 gpio: drop surplus X86 dependencies
Port-mapped I/O depends on X86 already, so individual drivers need
not specify this dependency.

Suggested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-11-01 10:39:07 +01:00
Linus Walleij bc6a73bbfb gpio: group port-mapped I/O drivers in a menu
Create a Kconfig submenu for drivers using X86 port-mapped I/O
and depend on X86 for this.

Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Andreas Bofjall <andreas@gazonk.org>
Cc: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Bruno Randolf <br1@einfach.org>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-31 22:09:56 +01:00
Soren Brinkmann 79786721c2 gpio: xilinx: Drop architecture dependencies
The driver does not have any real architecture dependencies. To avoid
listing each architecture that might use this driver on some
FPGA-enabled platform, drop these dependencies.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-27 16:47:18 +01:00
William Breathitt Gray 1ceacea220 gpio: Add GPIO support for the ACCES 104-IDIO-16
The ACCES 104-IDIO-16 family of PC/104 utility boards feature 16
optically isolated inputs and 16 optically isolated FET solid state
outputs. This driver provides GPIO support for these 32 channels of
digital I/O. Change-of-State detection interrupts are not supported.

GPIO 0-15 correspond to digital outputs 0-15, while GPIO 16-31
correspond to digital inputs 0-15. The base port address for the device
may be set via the idio_16_base module parameter.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-27 11:01:19 +01:00
YD Tseng 6057d40f41 gpio: driver for AMD Promontory
This patch adds a new GPIO driver for AMD Promontory chip.

This GPIO controller is enumerated by ACPI and the ACPI compliant
hardware ID is AMDF030.

Change history:

v2: 1. fix coding style
    2. registers renaming
v3: 1. change include file
    2. fix coding style
    3. remove module_init/exit, add module_platform_driver
    4. remove MODULE_ALIAS
v4: 1. change TOTAL_GPIO_PINS to PT_TOTAL_GPIO
    2. remove PCI dependency in Kconfig
    3. fix subject line

Signed-off-by: YD Tseng <Yd_Tseng@asmedia.com.tw>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-26 14:45:26 +01:00
Kamlakant Patel 83ea24fd45 gpio: xlp: Convert to use gpiolib irqchip helpers
commit "325f0a (MIPS: Netlogic: Use chip_data for irq_chip methods)"
Updates "mips/netlogic/common/irq.c" to use chip_data to store interrupt
controller data pointer. Before this commit handler_data was used to
store interrupt controller data which caused errors while using
gpiochip_set_chained_irqchip.

Update XLP GPIO driver to use the gpiolib irqchip helpers.
And add missing depends on OF_GPIO in Kconfig.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-22 14:36:41 +02:00
Zubair Lutfullah Kakakhel 85001089a7 gpio/xilinx: enable for MIPS
MIPSfpga uses the axi gpio controller. Enable the driver for MIPS.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-19 08:52:41 +02:00
Diego Elio Pettenò b8664924e8 gpio: add GPIO support for IT87xx, replacing gpio-it8761e
This patch adds support for the GPIOs found on the ITE super-I/O chips
IT87xx.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-02 04:19:35 -07:00
Stephen Boyd 9f35382803 gpio: msm: Remove unused driver
Remove this driver now that Bjorn has introduced a pinctrl driver
for msm8660 and the dts files have been updated with the pinctrl
compatibles.

Cc: Andy Gross <agross@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-02 04:19:33 -07:00
Kuninori Morimoto aad38b75fb gpio: rcar: GPIO_RCAR doesn't relate to ARM
8cd1470("gpio: rcar: Add r8a7795 (R-Car H3) support") added
GPIO support for r8a7795. r8a7795 based on CONFIG_ARM64.
OTOH, GPIO_RCAR driver can be compiled fine on non-ARM.
This patch removed ARM dependency for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-09-14 09:12:03 +02:00
Gregory Fong 19a7b6940b gpio: brcmstb: Add interrupt and wakeup source support
Uses the gpiolib irqchip helpers.  For this to work, the irq setup
function is called once per bank instead of once per device.  Note
that all known uses of this block have a BCM7120 L2 interrupt
controller as a parent.  Supports interrupts for all GPIOs.

In the IRQ handler, we check for raised IRQs for invalid GPIOs and
warn (ratelimited) if they're encountered.

Also, several drivers (e.g. gpio-keys) allow for GPIOs to be
configured as wakeup sources, and this GPIO controller supports that
through a separate interrupt path.

The de-facto standard DT property "wakeup-source" is checked, since
that indicates whether the GPIO controller hardware can wake.  Uses
the IRQCHIP_MASK_ON_SUSPEND irq_chip flag because UPG GIO doesn't have
any of its own wakeup source configuration.

Aside regarding gpiolib irqchip helpers: It wasn't obvious (to me)
that you can have multiple chained irqchips and associated IRQ domains
for a single parent IRQ, and as long as the xlate function is written
correctly, a GPIO IRQ request end up checking the correct domain and
will get associated with the correct IRQ.  What helps make this clear
is to read
  drivers/gpio/gpiolib-of.c:
   - of_gpiochip_find_and_xlate()
   - of_get_named_gpiod_flags()
  drivers/gpio/gpiolib.c:
   - gpiochip_find()

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-08-13 13:13:26 +02:00
Rabin Vincent 29b5357d25 gpio: etraxfs: add interrupt support
On ETRAX FS, all pins on the first port (and only the first port) have
interrupt support.

On ARTPEC-3, all pins on all ports have interrupt support.  However,
there are only eight interrupts.  Each of the interrupts is associated
with a group of pins and for each interrupt the one pin from the group
which will trigger it can be selected.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-08-03 10:57:04 +02:00
Jun Nie e7aa6d8c1b gpio: zx: Add ZTE zx296702 GPIO support
Add ZTE zx296702 GPIO controller support

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-07-16 10:14:45 +02:00
Masahiro Yamada 4c52bd5c61 gpio: mvebu: kill bogus dependency on GPIO_GENERIC
The driver gpio-mvebu.c does not depend on gpio-generic.c at all.
Drop unneeded "select GPIO_GENERIC".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-07-16 00:11:03 +02:00
Masahiro Yamada d58ec58f40 gpio: altera: kill bogus dependency on GPIO_GENERIC
The driver gpio-altera.c does not depend on gpio-generic.c at all.
Drop unneeded "select GPIO_GENERIC".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Tien Hock Loh <thloh@altera.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-07-16 00:11:02 +02:00
Anurag Kumar Vulisha bdf7a4ae37 gpio: Added support to Zynq Ultrascale+ MPSoC
Added support to Zynq Ultrascale+ MPSoC on the existing zynq
gpio driver.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-06-10 09:44:17 +02:00
Rabin Vincent d342571efe gpio: add ETRAXFS GPIO driver
Add a GPIO driver for the General I/O block on Axis ETRAX FS SoCs.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-06-10 09:11:10 +02:00
Gregory Fong 3b0213d56e gpio: Add GPIO support for Broadcom STB SoCs
This adds support for the GPIO IP "UPG GIO" used on
Broadcom STB SoCs (BCM7XXX and some others). Uses
basic_mmio_gpio to instantiate a gpio_chip for each bank.
The driver assumes that it handles the base set of GPIOs
on the system and that it can start its numbering sequence
from 0, so any GPIO expanders used with it must dynamically
assign GPIO numbers after this driver has finished
registering its GPIOs.

Does not implement the interrupt-controller portion yet,
will be done in a future commit.

v2:
- change include to use <linux/gpio/driver.h> instead of
  <linux/gpio.h>
- get rid of unnecessary imask member in struct bank
- rename GPIO_PER_BANK -> MAX_GPIO_PER_BANK
- always have 32 GPIOs per bank and add 'width' member in
  struct bank to hold actual number of GPIOs in use
- mark of_match table as const

List-usage-fixed-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-06-02 15:36:22 +02:00
Kamlakant Patel ff71880006 gpio: xlp: GPIO controller for Netlogic XLP SoCs
Add GPIO controller driver for Netlogic XLP MIPS64 SOCs.

This driver is instantiated by device tree and supports interrupts
for GPIOs.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-06 16:33:56 +02:00
Tony Lindgren cac089f902 gpio: omap: Allow building as a loadable module
We currently get all kinds of errors building the omap gpio driver
as a module starting with:

undefined reference to `omap2_gpio_resume_after_idle'
undefined reference to `omap2_gpio_prepare_for_idle'
...

Let's fix the issue by adding inline functions to the header.
Note that we can now also remove the two unused functions for
omap_set_gpio_debounce and omap_set_gpio_debounce_time.

Then doing rmmod on the module produces further warnings
because of missing exit related functions. Let's add those.

And finally, we can make the Kconfig entry just a tristate
option that's selected for omaps.

Cc: Javier Martinez Canillas <javier@dowhile0.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@linaro.org>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-06 15:23:03 +02:00
Joachim Eastwood 13a43fd9e9 gpio: add lpc18xx gpio driver
Driver for the GPIO block found on NXP LPC18xx/43xx devices.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-05 17:50:07 +02:00
Linus Torvalds d0440c59f5 ARM: SoC cleanups for v4.1
We've got a fairly large cleanup branch this time. The bulk of this is removal
 of non-DT platforms of several flavors:
 
 - Atmel at91 platforms go full-DT, with removal of remaining board-file based
   support
 - OMAP removes legacy board files for three more platforms
 - Removal of non-DT mach-msm, newer Qualcomm platforms now live in mach-qcom
 - Freescale i.MX25 also removes non-DT platform support
 
 Most of the rest of the changes here are fallout from the above, i.e. for
 example removal of drivers that now lack platforms, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVNzI3AAoJEIwa5zzehBx3ePwQAJKb4Mf72/4iiKb4dbVcooQN
 EiZ84fwWiWD6Mww/3A76xVnz/b7JWmB3vwW0b4fcbvzubmOjnROBmZgCWeNy4ZTv
 dOZc3/9jK7OrlwvpFBeZykQwHcbz+550+m3WxmLft1oqH/7BA1k5aunwYtFB96ii
 5Owi4Cy9OmxEyALQAvzktFaJdI7J66LNb+i30r5zIZHlkVooeF3UyadndiswUP2o
 EBzCE8UPqRi5kV6FuwVyf4MZaV28FWoglTqdx9OxogcTnKNFT6RlHQ39q/iPu348
 Wkh4kOryVy7Rlab1K4wQRpBoOwkonKDV73u2H2ifRFj7V9ZAdjibK8pgKn3kjkba
 bJkwHIqlqtqqqjj2Hh93wl+8hKSypoLXO9tagPWYBiLtFXCH/+EVsihWYpAc/A5E
 pUS6hJrJyXKJouwwsXu6459zP0ieqhvpbQG72xs9PRimAfAdSTulSTzdI/dMh42Q
 pwYkmvh+ReY3Ll4MeCzu7+eCIY0qAKsor48W1ImuziwQhg2lZj16qWtA4YdPk3+O
 N8ckyaaFg663PAfsZgBx1qTgxw5v0ec2k68/iEVGS5mUJCgcWxFvR95chTDIxQXq
 ZmJ+SuMFyLB/2zVSiGU96L1PQTcUkxJJ8LVB3qNp6KlYT7qUSsgAU+qYveFlUh+p
 X8MVsSVh8n1MTNepsLij
 =BV8A
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanups from Olof Johansson:
 "We've got a fairly large cleanup branch this time.  The bulk of this
  is removal of non-DT platforms of several flavors:

   - Atmel at91 platforms go full-DT, with removal of remaining
     board-file based support

   - OMAP removes legacy board files for three more platforms

   - removal of non-DT mach-msm, newer Qualcomm platforms now live in
     mach-qcom

   - Freescale i.MX25 also removes non-DT platform support"

Most of the rest of the changes here are fallout from the above, i.e. for
example removal of drivers that now lack platforms, etc.

* tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (58 commits)
  mmc: Remove msm_sdcc driver
  gpio: Remove gpio-msm-v1 driver
  ARM: Remove mach-msm and associated ARM architecture code
  ARM: shmobile: cpuidle: Remove the pointless default driver
  ARM: davinci: dm646x: Add interrupt resource for McASPs
  ARM: davinci: irqs: Correct McASP1 TX interrupt definition for DM646x
  ARM: davinci: dm646x: Clean up the McASP DMA resources
  ARM: davinci: devices-da8xx: Add support for McASP2 on da830
  ARM: davinci: devices-da8xx: Clean up and correct the McASP device creation
  ARM: davinci: devices-da8xx: Add interrupt resource to McASP structs
  ARM: davinci: devices-da8xx: Add resource name for the McASP DMA request
  ARM: OMAP2+: Remove legacy support for omap3 TouchBook
  ARM: OMAP3: Remove legacy support for devkit8000
  ARM: OMAP3: Remove legacy support for EMA-Tech Stalker board
  ARM: shmobile: Consolidate the pm code for R-Car Gen2
  ARM: shmobile: r8a7791: Correct SYSCIER value
  ARM: shmobile: r8a7790: Correct SYSCIER value
  ARM: at91: remove old setup
  ARM: at91: sama5d4: remove useless map_io
  ARM: at91: sama5 use SoC detection infrastructure
  ...
2015-04-22 09:04:39 -07:00
Linus Torvalds 510965dd4a This is the bulk of GPIO changes for the v4.1 development
cycle:
 
 - A new GPIO hogging mechanism has been added. This can
   be used on boards that want to drive some GPIO line high,
   low, or set it as input on boot and then never touch it
   again. For some embedded systems this is bliss and
   simplifies things to a great extent.
 
 - Some API cleanup and closure: gpiod_get_array() and
   gpiod_put_array() has been added to get and put GPIOs
   in bulk as was possible with the non-descriptor API.
 
 - Encapsulate cross-calls to the pin control subsystem in
   <linux/gpio/driver.h>. Now this should be the only header
   any GPIO driver needs to include or something is wrong.
   Cleanups restricting drivers to this include are welcomed
   if tested.
 
 - Sort the GPIO Kconfig and split it into submenus, as
   it was becoming and unstructured, illogical and
   unnavigatable mess. I hope this is easier to follow.
   Menus that require a certain subsystem like I2C can
   now be hidden nicely for example, still working on
   others.
 
 - New drivers:
 
     - New driver for the Altera Soft GPIO.
 
     - The F7188x driver now handles the F71869 and
       F71869A variants.
 
     - The MIPS Loongson driver has been moved to
       drivers/gpio for consolidation and cleanup.
 
 - Cleanups:
 
    - The MAX732x is converted to use the GPIOLIB_IRQCHIP
      infrastructure.
 
    - The PCF857x is converted to use the GPIOLIB_IRQCHIP
      infrastructure.
 
    - Radical cleanup of the OMAP driver.
 
 - Misc:
 
    - Enable the DWAPB GPIO for all architectures. This is
      a "hard IP" block from Synopsys which has started to
      turn up in so diverse architectures as X86 Quark, ARC
      and a slew of ARM systems. So even though it's not an
      expander, it's generic enough to be available for all.
 
    - We add a mock GPIO on Crystalcove PMIC after a long
      discussion with Daniel Vetter et al, tracing back to
      the shootout at the kernel summit where DRM drivers
      and sub-componentization was discussed. In this case
      a mock GPIO is assumed to be the best compromise
      gaining some reuse of infrastructure without making
      DRM drivers overly complex at the same time. Let's
      see.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVMNYHAAoJEEEQszewGV1zSmwP/2oCk4CB4fexrqM+irUJrDnT
 3D/8tuaq7EghMnwPXCfHa8R8eWF6XEDvHPcJNVgXiWbtCGRMpdsiobFunzwLQv5A
 CbcuAOzWmzA0ePbfa0+xpLpWM/RJP9u1an/RboIzeeS7oQ1Yj/VjF8uS8Se+Pe3r
 nPKvTpoU5lGpIUTEEYjiJhL8pBmp8k75a6NGM4U8VwXI9BsdhDkpRGsfG3NK8hs2
 vSvWDB19NCW6iOd3gN4KA4f0Zz57WONMS7jY2WaipqYRlr37o4i2CA0ME1xoXEfg
 3JT1lmg7esNCvnjQOaGTaM6nf66j7/nleNtnMmAAJcJeMNoh9yS6397TGaYFThsn
 C1WmAoaonor3RAujrL3oRenxfq2+Vl63OvsClDiWz7LL9YYJ/G2nS3MggFHpZUhu
 /CHXSt08j0Kewfc5SkvFCTnrPG7aWy/YDou6PfuXIvkFp5h1FXDkHTXvOD33turD
 ohEPlg/9i2uCnVQfN+GV4h69WSyEiOpxG5W7ryE+nIo6XzWIctHLIH2V6aE7YrwG
 FBg7hC1QV1cI776HFOuM4rPwG1N80IQeC3vr5z/jEtZVPXrIaGvupxFC+O1DAx4W
 rzBD8lX45B96WmIW2odg11KXXyPO1srW4ZFWghm95HTfvnQc3O6LmV9riv1k7DYA
 gR+aRYNiLO01UmoTPYbK
 =QFbC
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO updates from Linus Walleij:
 "This is the bulk of GPIO changes for the v4.1 development cycle:

   - A new GPIO hogging mechanism has been added.  This can be used on
     boards that want to drive some GPIO line high, low, or set it as
     input on boot and then never touch it again.  For some embedded
     systems this is bliss and simplifies things to a great extent.

   - Some API cleanup and closure: gpiod_get_array() and
     gpiod_put_array() has been added to get and put GPIOs in bulk as
     was possible with the non-descriptor API.

   - Encapsulate cross-calls to the pin control subsystem in
     <linux/gpio/driver.h>.  Now this should be the only header any GPIO
     driver needs to include or something is wrong.  Cleanups
     restricting drivers to this include are welcomed if tested.

   - Sort the GPIO Kconfig and split it into submenus, as it was
     becoming and unstructured, illogical and unnavigatable mess.  I
     hope this is easier to follow.  Menus that require a certain
     subsystem like I2C can now be hidden nicely for example, still
     working on others.

   - New drivers:

       - New driver for the Altera Soft GPIO.

       - The F7188x driver now handles the F71869 and F71869A variants.

       - The MIPS Loongson driver has been moved to drivers/gpio for
         consolidation and cleanup.

   - Cleanups:

       - The MAX732x is converted to use the GPIOLIB_IRQCHIP
         infrastructure.

       - The PCF857x is converted to use the GPIOLIB_IRQCHIP
         infrastructure.

       - Radical cleanup of the OMAP driver.

   - Misc:

       - Enable the DWAPB GPIO for all architectures.  This is a "hard
         IP" block from Synopsys which has started to turn up in so
         diverse architectures as X86 Quark, ARC and a slew of ARM
         systems.  So even though it's not an expander, it's generic
         enough to be available for all.

       - We add a mock GPIO on Crystalcove PMIC after a long discussion
         with Daniel Vetter et al, tracing back to the shootout at the
         kernel summit where DRM drivers and sub-componentization was
         discussed.  In this case a mock GPIO is assumed to be the best
         compromise gaining some reuse of infrastructure without making
         DRM drivers overly complex at the same time.  Let's see"

* tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (62 commits)
  Revert "gpio: sch: use uapi/linux/pci_ids.h directly"
  gpio: dwapb: remove dependencies
  gpio: dwapb: enable for ARC
  gpio: removing kfree remove functionality
  gpio: mvebu: Fix mask/unmask managment per irq chip type
  gpio: split GPIO drivers in submenus
  gpio: move MFD GPIO drivers under their own comment
  gpio: move BCM Kona Kconfig option
  gpio: arrange SPI Kconfig symbols alphabetically
  gpio: arrange PCI GPIO controllers alphabetically
  gpio: arrange I2C Kconfig symbols alphabetically
  gpio: arrange Kconfig symbols alphabetically
  gpio: ich: Implement get_direction function
  gpio: use (!foo) instead of (foo == NULL)
  gpio: arizona: drop owner assignment from platform_drivers
  gpio: max7300: remove 'ret' variable
  gpio: use devm_kzalloc
  gpio: sch: use uapi/linux/pci_ids.h directly
  gpio: x-gene: fix devm_ioremap_resource() check
  gpio: loongson: Add Loongson-3A/3B GPIO driver support
  ...
2015-04-18 08:22:10 -04:00
Linus Walleij 549c5dc19e gpio: dwapb: remove dependencies
The Synopsys DesignWare DWAPB GPIO block is popular to
synthesize amongst many architectures: X86, ARM, ARC.
The driver was restricted to only these archs due to
using [read|write]l_relaxed() accessors that were not
universally available in the past,
but as of commit 9439eb3ab9
"asm-generic: io: implement relaxed accessor macros as
conditional wrappers" these accessors are available on all
archs so this should not be a problem any more. Enable the
driver for all archs.

Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-09 10:35:32 +02:00
Vineet Gupta a490c656c9 gpio: dwapb: enable for ARC
Synopsys SDP platform uses DW GPIO controller in design with
ARC cores. So adding ARC to architectures that may select this
GPIO controller.

Even though support for Synopsys SDP is yet to be submitted we'll need
this tiny option enabled at least for properly working interrupts (DW
GPIO controller is used as interrupt controller).

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 17:02:55 +02:00
Linus Walleij 177b0381c5 gpio: split GPIO drivers in submenus
Create Kconfig submenus for memory mapped, I2C, MFD,
PCI, SPI and USB GPIO drivers to help navigate the forest
of drivers in this subsystem. The I2C, SPI and USB menus
get dependencies so we don't have to see them unless we
have the required subsystem enabled in the first place.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 15:19:49 +02:00
Linus Walleij be9cab5bed gpio: move MFD GPIO drivers under their own comment
Get rid of AC97, MODULbus and other weird subheadings for
GPIO drivers. Move all MFD drivers out of I2C etc and in under
the MFD comment. This is too weird as it is and makes no
sense, if the dependent parent driver is MFD, group these as
MFD GPIO drivers. Alphabetize and move this comment group
inbetween "I2C" and "PCI" to also have the groups in
alphabetic order.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 15:19:05 +02:00
Linus Walleij ea948cff41 gpio: move BCM Kona Kconfig option
Move the Kconfig option for the Broadcom BCM Kona up to the
commin GPIO controllers, as it is currently grouped under
MODULbus expanders which it definately is not.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 14:36:17 +02:00
Linus Walleij a7ec2e7f15 gpio: arrange SPI Kconfig symbols alphabetically
Rearrange the SPI GPIO expanders in alphabetic order
as already indicated by the comment in the file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 14:34:51 +02:00
Linus Walleij 92c33ef7ef gpio: arrange PCI GPIO controllers alphabetically
Rearrange PCI GPIO controllers in alphabetic order
as already indicated by the comment in the file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 14:30:37 +02:00
Linus Walleij bf5a16bae5 gpio: arrange I2C Kconfig symbols alphabetically
Rearrange the I2C GPIO expanders in alphabetic order
as already indicated by the comment in the file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 14:14:40 +02:00
Linus Walleij 223fa2725a gpio: arrange Kconfig symbols alphabetically
This rearranges the GPIO drivers Kconfig symbols alphabetically
as the top comment in the file already states they should be.
No functional changes whatsoever.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 10:08:56 +02:00
Huacai Chen cbfb3ea7f8 gpio: loongson: Add Loongson-3A/3B GPIO driver support
Improve Loongson-2's GPIO driver to support Loongson-3A/3B, and update
Loongson-3's default config file.

Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-08 09:53:42 +02:00
Huacai Chen 991ff4e3d7 MIPS: Move Loongson GPIO driver to drivers/gpio
Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.

Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-07 11:15:56 +02:00
Stephen Boyd 8c7b69ae43 gpio: Remove gpio-msm-v1 driver
This driver is orphaned now that mach-msm has been removed.
Delete it.

Cc: David Brown <davidb@codeaurora.org>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2015-03-27 11:31:02 -05:00
Linus Walleij 1422731dbc mfd: tc3589x: Enforce device-tree only mode
All systems using the TC3589x multifunction expander uses
devicetree, so don't clutter the place with a lot of
and assume it is there.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-03-26 14:20:17 +00:00
Andy Shevchenko a4dd4ddd4b gpio: dwapb: enable for Quark
The Intel Quark SoC contains the DW GPIO on board. While fixing the build error
the commit 1972c97db5 (gpio: dwapb: fix compile errors) disables the
possibility to build the driver on X86, i.e. Intel Quark.

The patch reenables it for Intel Quark as well.

Since we have Intel Quark SoC introduced in 4.0-rc1 I would like to make this
fix available there as well, though the actual MFD driver [1] is applied only
for next version.

[1] https://lkml.org/lkml/2015/2/1/217

Fixes: 1972c97db5 (gpio: dwapb: fix compile errors)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-03-19 09:46:05 +01:00
Andreas Bofjall 7e9603638a gpio: f7188x: add GPIO support for F71869A
Add support for the GPIOs found on the Fintek SuperI/O chip F71869A,
such as the one found on the Jetway JNF99-525 motherboard, to the f7188x
gpio driver.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-03-17 17:57:37 +01:00
Andreas Bofjall 24ccef359e gpio: f7188x: add GPIO support for F71869
Add support for the GPIOs found on the Fintek SuperI/O chip F71869, such
as the one found on the Jetway NF96u-525 motherboard, to the f7188x gpio
driver.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
Tested-by: Les Schaffer <schaffer@optonline.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-03-17 17:56:42 +01:00
Kefeng Wang b90f8f22ed gpio: dwapb: re-enable GPIO_DWAPB for arm64
Hisilicon arm64 soc uses designWare gpio, re-enable it after
commit 1972c97db5b(gpio: dwapb: fix compile errors).

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-03-09 11:54:36 +01:00
Tien Hock Loh c5abbba932 drivers/gpio: Altera soft IP GPIO driver
Adds a new driver for Altera soft GPIO IP. The driver is able to do
read/write and allows GPIO to be a interrupt controller.

Tested on Altera GHRD on interrupt handling and IO.

v10:
- Updated conflicting device tree parameters
- Removed unused headers
- Used macro instead of magic numbers for ngpio
- Code readability cleanup using ?: and temporal variables
- Removed leftover garbage and unnecessary function calls
- Checked bgpio_init but unusable because Altera GPIO may not
  be a multiple of 8 bits

v9:
- Removed duplicated initialization on set_type using temporals
  to improve code readability in calling generic_handle_irq
- Using ?: ternary to reduce code size

v8:
- Using for_each_set_bit
- Added const for struct definition
- Removed naggy pr_err
- Sort alpha header
- Remove unused macros
- Use fixed width data types instead of unsigned long
- Whitespace issue fixes
- Removed _relaxed function for better compatibility across different
  CPU
- Changed irq_create_mapping to platform_get_irq updated implementation
  to use gpiochip_irqchip_add
- Reserve interrupt-cells number 2 in device tree binding for future
  use
- Remove confusing sections on devicetree bindings
- Added tristate Kconfig help text

v7:
- Used dev_warn instead of pr_warn
- Clean up unnecesarry if else indentation

v6:
- Added irq_startup and irq_shutdown
- Changed bitwise clamping style
- Cleanup bitwise operation to improve readability change naming of
  mapped irqs from virq to mapped_irq

v5:
- Dispose irq_domain mapping correctly
- Update optional binding description in binding docs

v4:
- Added vendor prefix to devicetree binding for IP specific properties
  using MMIO GPIO helper library instead of manually map PIO to memory
- altera_gpio_chip inline struct documentation to kerneldoc
- Using dev_ print to print a better failure message

v2, v3:
- Do not reference NO_IRQ
- Updated irq_set_type to only allow the hardware configured irq type

Signed-off-by: Tien Hock Loh <thloh@altera.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-03-07 20:30:49 +01:00