aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-rcar.c
AgeCommit message (Collapse)AuthorFilesLines
2013-11-25gpio: rcar: Enable mask on suspendMagnus Damm1-1/+2
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 <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-11-25gpio: rcar: Use lazy disableMagnus Damm1-2/+0
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 <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-11-25gpio: rcar: NULL dereference on error in probe()Dan Carpenter1-1/+1
It's not obvious from the label name but "err1" tries to release "p->irq_domain" which leads to a NULL dereference. Fixes: 119f5e448d32 ('gpio: Renesas R-Car GPIO driver V3') Cc: [email protected] Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Magnus Damm <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-10-16gpio: rcar: Include linux/of.h headerSachin Kamat1-0/+1
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-10-16Merge tag 'v3.12-rc4' into develLinus Walleij1-4/+3
Linux 3.12-rc4
2013-10-16gpio: rcar: drop references to "virtual" IRQLinus Walleij1-6/+6
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 <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-22gpio: rcar: Remove #gpio-range-cells DT property usageLaurent Pinchart1-4/+3
Commit a1bc260bb5f5d95da854be7898202d788e94448d ("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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-08-16gpio: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-07-03Merge tag 'gpio-for-v3.11-1' of ↵Linus Torvalds1-1/+8
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-06-21Merge tag 'renesas-gpio-rcar2-for-v3.11' of ↵Arnd Bergmann1-6/+2
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 <[email protected]>
2013-06-19gpio: rcar: fix gpio_rcar_of_tableArnd Bergmann1-0/+1
The device table needs to be terminated with an empty element. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Simon Horman <[email protected]>
2013-06-19gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sectionsLaurent Pinchart1-6/+2
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-17gpio-rcar: Use OUTDT when reading GPIOs configured as outputMagnus Damm1-1/+8
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-06-12gpio-rcar: Add DT supportLaurent Pinchart1-10/+56
Add DT bindings for the gpio-rcar driver and read the device configuration from the DT node at probe time if available. Cc: [email protected] Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-04gpio-rcar: Add support for IRQ_TYPE_EDGE_BOTHSimon Horman1-5/+21
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-06-04gpio-rcar: R-Car GPIO IRQ share interruptKuninori Morimoto1-1/+1
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-04-03gpio-rcar: Add pinctrl supportLaurent Pinchart1-0/+23
Register the GPIO pin range, and request and free GPIO pins using the pinctrl API. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2013-04-03gpio: Renesas R-Car GPIO driver V3Magnus Damm1-0/+373
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>