1
0
Fork 0
Commit Graph

70 Commits (redonkable)

Author SHA1 Message Date
Linus Walleij bdc54ef45d Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into devel

Linux 3.13-rc3
2013-12-09 14:04:37 +01:00
Laurent Pinchart 850dfe17e3 gpio: rcar: Support both edge trigger with DT
Some versions of the R-Car GPIO controller support triggering on both
edges of the input signal. Whether this capability is supported is
currently specified in platform data. R-Car GPIO devices instantiated
from the device tree have the capability turned off even when the
hardware supports it.

To fix this, add DT match data support to the driver, initialize both
edge trigger support from match data and enable both edge trigger in
r8a7790 and r8a7791 match data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-03 11:26:07 +01:00
Magnus Damm 4039611206 gpio: rcar: Enable mask on suspend
Now when lazy interrupt disable has been enabled in the driver
then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells
the core that only IRQs marked as wakeups need to stay enabled
during Suspend-to-RAM.

Tested on the Lager board with GPIO-keys and Suspend-to-RAM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-11-25 09:03:39 +01:00
Magnus Damm fba968a1e6 gpio: rcar: Use lazy disable
Set the ->irq_enable() and ->irq_disable() methods to NULL
to enable lazy disable of interrupts. This by itself provides
some level of optimization, but is mainly enabled as ground
work for future Suspend-to-RAM wake up support.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-11-25 09:03:39 +01:00
Dan Carpenter 0c8aab8e65 gpio: rcar: NULL dereference on error in probe()
It's not obvious from the label name but "err1" tries to release
"p->irq_domain" which leads to a NULL dereference.

Fixes: 119f5e448d ('gpio: Renesas R-Car GPIO driver V3')

Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-11-25 09:03:12 +01:00
Sachin Kamat bd0bf46844 gpio: rcar: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid build breakage in the future.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-10-16 13:10:00 +02:00
Linus Walleij 263c43a447 Linux 3.12-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJSUc9zAAoJEHm+PkMAQRiG9DMH/AtpuAF6LlMRPjrCeuJQ1pyh
 T0IUO+CsLKO6qtM5IyweP8V6zaasNjIuW1+B6IwVIl8aOrM+M7CwRiKvpey26ldM
 I8G2ron7hqSOSQqSQs20jN2yGAqQGpYIbTmpdGLAjQ350NNNvEKthbP5SZR5PAmE
 UuIx5OGEkaOyZXvCZJXU9AZkCxbihlMSt2zFVxybq2pwnGezRUYgCigE81aeyE0I
 QLwzzMVdkCxtZEpkdJMpLILAz22jN4RoVDbXRa2XC7dA9I2PEEXI9CcLzqCsx2Ii
 8eYS+no2K5N2rrpER7JFUB2B/2X8FaVDE+aJBCkfbtwaYTV9UYLq3a/sKVpo1Cs=
 =xSFJ
 -----END PGP SIGNATURE-----

Merge tag 'v3.12-rc4' into devel

Linux 3.12-rc4
2013-10-16 10:05:53 +02:00
Linus Walleij c0d6c1ad0a gpio: rcar: drop references to "virtual" IRQ
Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Cc: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-10-16 09:59:53 +02:00
Laurent Pinchart 01eb2d18fd gpio: rcar: Remove #gpio-range-cells DT property usage
Commit a1bc260bb5 ("gpio: clean up
gpio-ranges documentation") deprecated the #gpio-range-cells property.
Replace its usage with a hardcoded value in the gpio-rcar driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-09-22 21:28:11 +09:00
Jingoo Han e56aee1897 gpio: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-08-16 15:24:35 +02:00
Linus Torvalds 60b5adffb4 GPIO changes for the v3.11 development cycle:
- Incremental development for the Langwell (Atom SoC),
   Xilinx, ICH and RCAR drivers.
 - Cleanups from Jingoo Han, Axel Lin, Wei Jongjun,
   Wolfram Sang, Tushar Behera, Sachin Kamat and Yijing Wang.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJR0T6GAAoJEEEQszewGV1zs14QAJj+NPEy5yIVUMLqBp68Wwvo
 KHryjSLIDsrZj3GthRn8XG61zjdZxCuJY+i8FPldu0mIeJ1rpqxJS1DU8q0CXvuc
 uJV5pBXY48WOiutspz1m3HMgNINrm2K8hgvGc3T+oSjh0+De8iacorWEPYjVZllW
 ibm3rsgzamqRkI9SgXpfH5VFs9HNsxrpxgS+dRztIndWM3pEzyJQHgYm9TYEnMg8
 XNWIRo54v1PRgIlW/zFMVVZvhzVc8sWjaVCp8uMnlDbyU2u/uFB632QinMyi5G7z
 LaMR4AgVzC2+6Gc/7zuYSvTqTrI7Y8Dqucmz4lcsabKsoRYmdG3GZSgPRE8Eo/4b
 E5t5MBb9o7juXprqMRNi68W8r9zob4UAA34KT+hkgE5dL+EDYWguX59IhQ2EkSrh
 X/2OeiLi2icdBQ+yjVc0qQ07q8tAGSFX/atY3KPzvLhoxFEDdaOuI7R0r1DNT5LN
 1Vps6qQVyQmsHcHO8PaPIXB76KuOQ7W4oYfma/JjxOjZtjcGJdyG+/0UkdsSobET
 l4Q+2WxlozNoN6zsHeJd2iPc6LB61ZCG3BzsCbv/tVPEJ8fsMylC1pAAEoaNZ6zf
 0HzTFWa2ZiBe7F95m2leQmtHlvZ2oME+IkS3xUY8v0VQD77bdKWXs63c91JUHLC9
 BywEJzCgXvUoR6O+mr4p
 =5JfC
 -----END PGP SIGNATURE-----

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

Pull GPIO updates from Linus Walleij:
 "Here is a batch of GPIO changes for v3.11.  I have agreed with Grant
  to take care of the pull requests for this development cycle.

  No special things are happening in the GPIO tree this time (nice with
  some calm) and I have been extra careful to do regression builds and
  it's well boiled in -next.

  GPIO changes for the v3.11 development cycle:
   - Incremental development for the Langwell (Atom SoC), Xilinx, ICH
     and RCAR drivers.
   - Cleanups from Jingoo Han, Axel Lin, Wei Jongjun, Wolfram Sang,
     Tushar Behera, Sachin Kamat and Yijing Wang"

* tag 'gpio-for-v3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (35 commits)
  Gpio/trivial: replace numeric with standard PM state macros
  gpiolib: remove warnning of allocations with IRQs disabled
  gpio: grgpio: Staticize local symbols
  gpio-langwell: remove Withney point support
  gpio: ich: add GPO_BLINK support
  gpio-sta2x11: Convert to use devm_ioremap_resource
  gpio_msm: Convert to use devm_ioremap_resource
  gpio-rcar: Use OUTDT when reading GPIOs configured as output
  gpio-sta2x11: Fix potential NULL pointer dereference
  gpio/omap: omap_gpio_init_context stub must be inline
  gpio: msm-v1: Remove errant __devinit to fix compile
  gpio: devres: make comments proper
  GPIO: xilinx: Enable driver for Xilinx zynq
  DT: Add documentation for gpio-xilinx
  GPIO: xilinx: Use BIT macro
  GPIO: xilinx: Use __raw_readl/__raw_writel IO functions
  GPIO: xilinx: Add support for dual channel
  GPIO: xilinx: Simplify driver probe function
  gpio: sx150x: convert to use devm_* functions
  MAINTAINERS: add linux-gpio mailing list
  ...
2013-07-03 11:39:44 -07:00
Arnd Bergmann e7692e2cfd Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11
Documentation enhancement and code cleanup by Laurent Pinchart.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRwvwkAAoJENfPZGlqN0++mukP/1+rldtrgijEKjqRLFFll2M1
 3Z1FABTR7IywSzGvr2npBpmfPsa+w9Cmnn6BDTKUHjJYyurjiinumtDLH5oo6/Xb
 fXmhmco1huO0rnf9C84GysmDjDdSqYMs6wEaG2XjDcLPpYd6pLkb5/tl5bnTCoSt
 MW5kChypAVcrVflc2DMMU0cTtJ2joslOASHxlTXwCfgdG87R8iX2FtoPynKL9l3i
 pe0R8ASoZkxtGd4JT9PJyORq0PtACJB0z4Wm2V7wM8S/Cln4mDIl6NJc3VWCMnHp
 2YRvSMhUDpKfhDrSnGFVHAhJBMuJQdVRHSxj0ZwDKQi9xeQr7lsfGa5bbb3a3pOr
 HYGz/eRkExIRWFw8rQ4YGoEAN6T7os5BTxxSTagRztZxRz5fD+yqQMGzv9/uIG9c
 iKOkGhrR0UPz4Ul8fo/C+uX8kvSfX4CpVozCBFOnszW0pMF/qIabsOVpJoAMOBsR
 q2YIyLkFxn/S97DK4xm/lyX1o3SBwIOeyCHb5KIlxFS6AVgOvxJwowjfQSaDbrP0
 MIFxTSd4rkIt3kph6gT2cfJ6l8TbXs0bxtxWzOfu4UAVrwdc/HJzLUcSs++0s7Ca
 +Z48tjhuz3a8WPQgay1l8PoEaFXzvMaLNTMbG+Zfx9gVyWbmyk5r6VM7akXJqy2P
 cJA8purzFCEWjmk0od51
 =tnz4
 -----END PGP SIGNATURE-----

Merge tag 'renesas-gpio-rcar2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

From Simon Horman:

Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11

Documentation enhancement and code cleanup by Laurent Pinchart.

* tag 'renesas-gpio-rcar2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  gpio-rcar: Reference core gpio documentation in the DT bindings

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-21 15:15:57 +02:00
Arnd Bergmann 30d2266c68 gpio: rcar: fix gpio_rcar_of_table
The device table needs to be terminated with an empty element.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
2013-06-19 17:47:25 +02:00
Laurent Pinchart e305062e94 gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
All functions and data types used by OF-specific code paths are declared
in <linux/of.h> regardless of CONFIG_OF. Replace the #ifdef CONFIG_OF
guard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize
the unused code away.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-19 21:38:38 +09:00
Magnus Damm ae9550f635 gpio-rcar: Use OUTDT when reading GPIOs configured as output
Testing on r8a7790 shows that INDT does not indicate the correct
pin state when reading a GPIO configured as output, so update
the gpio_rcar_get() function to handle this case.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-06-17 10:34:36 +02:00
Laurent Pinchart 159f8a0209 gpio-rcar: Add DT support
Add DT bindings for the gpio-rcar driver and read the device
configuration from the DT node at probe time if available.

Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-12 21:48:09 +09:00
Simon Horman 7e1092b5a2 gpio-rcar: Add support for IRQ_TYPE_EDGE_BOTH
As hardware support for this feature is not universal for all SoCs a flag,
has_both_edge_trigger, has been added to the platform data of the driver to
allow this feature to be enabled.

The motivation for this is to allow use of the gpio-keys driver on the
lager board which is based on the r8a7790 SoC. The V2 of this patch has been
fully exercised using that driver on that board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-04 20:28:36 +09:00
Kuninori Morimoto c234962b80 gpio-rcar: R-Car GPIO IRQ share interrupt
R-Car H1 or Gen2 GPIO interrupts are assigned per each GPIO domain,
but, Gen1 E1/M1 GPIO interrupts are shared for all GPIO domain.
gpio-rcar driver needs IRQF_SHARED flags for these.
This patch was tested on Bock-W board

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-04 20:28:36 +09:00
Laurent Pinchart dc3465a943 gpio-rcar: Add pinctrl support
Register the GPIO pin range, and request and free GPIO pins using the
pinctrl API.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-04-03 10:30:34 +09:00
Magnus Damm 119f5e448d gpio: Renesas R-Car GPIO driver V3
This patch is V3 of a GPIO driver for the R-Car series of
SoCs from Renesas. This driver is designed to be reusable
between multiple SoCs that share the same basic building block,
but so far it has only been used on R-Car H1 (r8a7779).

Each driver instance handles 32 GPIOs with individually
maskable IRQs. The driver operates on a single I/O memory
range and the 32 GPIOs are hooked up a single interrupt.

In the case of R-Car H1 either external IRQ pins or GPIOs
with interrupts can be used for on-board interupts. For
external IRQs 4 pins are supported, and in the case of GPIO
there are 202 GPIOS as 202 interrupts hooked up via 6 driver
instances and to the GIC and the Cortex-A9 Quad.

At this point this driver is interfacing as a regular
platform device driver. In the future DT support will be
submitted as an incremental feature patch.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-04-03 10:30:24 +09:00