summaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)Author
2011-06-11gpio/mxc: fix a bug with gpio_get_value callingShawn Guo
When calling gpio_get_value, the gpio number other than bit offset should be passed as the argument. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-10gpio/vr41xx: Convert use of struct resource to resource_size(ptr)Joe Perches
Remove miscellaneous use of direct calculation by using resource_size(). Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-10treewide: Convert uses of struct resource to resource_size(ptr)Joe Perches
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-09gpio/nomadik: fix sleepmode for elder NomadikLinus Walleij
The mach-nomadik machine did not compile properly due to bad ux500-specific functions being called. Introduce new state variables to fix this up. Reported-by: Axel Lin <axel.lin@gmail.com> Cc: Alessandro Rubini <rubini@unipv.it> Cc: Prafulla Wadaskar <prafulla.wadaskar@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-09gpio/ep93xx: Remove superfluous debug pr_info statementGrant Likely
Reported-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/ep93xx: convert to platform_driver and use basic_mmio_gpio libraryH Hartley Sweeten
This converts the gpio-ep93xx driver into a platform_driver and uses the basic_mmio_gpio library. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/pca953x: Fix warning of enabled interrupts in handlerDavid Jander
When using nested threaded irqs, use handle_nested_irq(). This function does not call the chip handler, so no handler is set. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/pca953x: Interrupt pin is active-lowDavid Jander
The interrupt pin of the PCA953x is active low, and on the rising edge no interrupt should be produced. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08gpio/pca953x: Fix IRQ support.David Jander
It seems that in the normal case, IRQ_NOREQUEST needs to be explicitly cleared, otherwise claiming the interrupt fails. In the case of sparse interrupts, the descriptor needs to be allocated first. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08Merge branch 'for_3.0/gpio-fixes' of ↵Grant Likely
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into gpio/merge
2011-06-07gpio/ep93xx: fix pr_fmt outputH Hartley Sweeten
With this driver now being moved from arch/arm/mach-ep93xx/gpio.c to drivers/gpio/gpio-ep93xx.c the prefix "ep93xx" is now redundant in the pr_* output. Using KBUILD_MODNAME is sufficient. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-07gpio/samsung: make Kconfig options def_boolH Hartley Sweeten
The Samsung GPIO drivers are always built-in when the relevant platform is selected.  Change the Kconfig symbol to def_bool y dependant on the platform. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-07gpio/exynos4: Fix incorrect mapping of gpio pull-up macro to register settingThomas Abraham
The S3C_GPIO_PULL_UP macro value incorrectly maps to a reserved setting of GPIO pull up/down registers on Exynos4 platform. Fix this incorrect mapping by adding wrappers to the s3c_gpio_setpull_updown and s3c_gpio_getpull_updown functions. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-07gpio/mxs: convert gpio-mxs to use generic irq chipShawn Guo
The patch converts gpio-mxs driver to use generic irq chip. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-07gpio/mxs: remove irq_high related implementationShawn Guo
The irq_high stuff was mistakenly copied from mxc gpio driver. The mxs gpio controller has only one irq line for each 32-pin gpio port. The patch remove irq_high related codes. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-07gpio/mxs: convert gpio-mxs to use basic_mmio_gpio libraryShawn Guo
The gpio-mxs controller complies with basic_mmio_gpio library. This patch converts the driver to use the library. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-07gpio/mxc: convert gpio-mxc to use generic irq chipShawn Guo
The patch converts gpio-mxc driver to use generic irq chip. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06GPIO: OMAP: add locking around calls to _set_gpio_triggeringColin Cross
_set_gpio_triggering uses read-modify-write on bank registers, lock bank->lock around all calls to it to prevent register corruption if two cpus access gpios in the same bank at the same time. Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-06-06GPIO: OMAP: fix setting IRQWAKEN bits for OMAP4Colin Cross
Setting the IRQWAKEN bit was overwriting previous IRQWAKEN bits, causing only the last bit set to take effect, resulting in lost wakeups when the GPIO controller is in idle. Replace direct writes to IRQWAKEN with MOD_REG_BIT calls to perform a read-modify-write on the register. Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-06-06GPIO: OMAP: fix section mismatch warningsRussell King
WARNING: arch/arm/plat-omap/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function omap_gpio_probe() to the function .init.text:omap_gpio_chip_init() The function __devinit omap_gpio_probe() references a function __init omap_gpio_chip_init(). If omap_gpio_chip_init is only used by omap_gpio_probe then annotate omap_gpio_chip_init with a matching annotation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-06-06gpio: reorganize driversGrant Likely
Sort the gpio makefile and enforce the naming convention gpio-*.c for gpio drivers. v2: cleaned up filenames in Kconfig and comment blocks v3: fixup use of BASIC_MMIO to GENERIC_GPIO for mxc Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06Merge branch 'gpio/next-mx' into gpio/nextGrant Likely
2011-06-06gpio/pca953x.c: Interrupt pin is active-lowDavid Jander
The interrupt pin of the PCA953x is active low, and on the rising edge no interrupt should be produced. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio/ep93xx: move driver to drivers/gpioH Hartley Sweeten
The GPIO driver should reside in drivers/gpio. v3: Change Kconfig option to def_bool y v2: Make the Kconfig symbol a silent option, dependent on ARCH_EP93XX Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio/mxc: convert gpio-mxc to use basic_mmio_gpio libraryShawn Guo
The gpio-mxc controller complies with basic_mmio_gpio library. The patch convert the driver to use the library. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio/mxc: Change gpio-mxc into an upstanding gpio driverShawn Guo
The patch makes necessary changes on gpio-mxc as below to turn it into an upstanding gpio driver. * Add a list to save all mx2 ports references, so that mx2_gpio_irq_handler can walk through all interrupt status registers * Use readl/writel to replace mach-specific accessors __raw_readl/__raw_writel * Change mxc_gpio_init into mxc_gpio_probe function * Move "struct mxc_gpio_port" into gpio-mxc.c, as it needs not to be public at all, and also make some other cleanup on plat-mxc/include/mach/gpio.h at the same time And the patch then migrates mach-imx and mach-mx5 to the updated driver by adding corresponding platform devices. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio/mxc: Move Freescale MXC gpio driver to drivers/gpioShawn Guo
GPIO drivers are getting moved to drivers/gpio for cleanup and consolidation. This patch moves the plat-mxc driver. Follow up patches will clean it up and make it a fine upstanding gpio driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio/mxs: Change gpio-mxs into an upstanding gpio driverShawn Guo
The patch makes necessary changes on gpio-mxs as below to turn it into an upstanding gpio driver. * Clean up the gpio port definition stuff * Use readl/writel to replace mach-specific accessors __raw_readl/__raw_writel * Change mxs_gpio_init into mxs_gpio_probe function And it then migrates mach-mxs to the updated driver by adding corresponding platform devices. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06gpio/mxs: Move Freescale mxs gpio driver to drivers/gpioGrant Likely
GPIO drivers are getting moved to drivers/gpio for cleanup and consolidation. This patch moves the mxs driver. Follow up patches will clean it up and make it a fine upstanding example of a gpio driver. v2: Removed header file entirely and put struct definition directly into driver. The struct isn't used anywhere else in the kernel. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-06-03gpio/samsung: make Kconfig options def_boolH Hartley Sweeten
The Samsung GPIO drivers are always built-in when the relevant platform is selected.  Change the Kconfig symbol to def_bool y dependant on the platform. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-03gpio/74x164: remove unnecessary defines and prototypeH Hartley Sweeten
Remove the #define GEN_74X164_GPIO_COUNT since it's only used in one place and it's meaning is obvious. Also remove the #define GEN_74X164_DRIVER_NAME and use spi->modalias to set the gpio chip's label and the string "74x164" for the driver name. Reorder the code slightly to remove the need to prototype gen_74x164_set_value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-29gpio: Fix gpio-exynos4 build fails in mainlineKyungmin Park
After the GPIO driver move, some symbols became selectable when they shouldn't be. Tighten the dependencies. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-29arm gpio drivers: make them 'depends on ARM'Linus Torvalds
We had a few drivers move from arch/arm into drivers/gpio, but they don't actually compile without the ARM platform headers etc. As a result they were messing up allyesconfig on x86. Make them depend on ARM. Reported-by: Ingo Molnar <mingo@elte.hu> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-28Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: gpio/pch_gpio: Support new device ML7223 gpio: make gpio_{request,free}_array gpio array parameter const GPIO: OMAP: move to drivers/gpio GPIO: OMAP: move register offset defines into <plat/gpio.h> gpio: Convert gpio_is_valid to return bool gpio: Move the s5pc100 GPIO to drivers/gpio gpio: Move the s5pv210 GPIO to drivers/gpio gpio: Move the exynos4 GPIO to drivers/gpio gpio: Move to Samsung common GPIO library to drivers/gpio gpio/nomadik: add function to read GPIO pull down status gpio/nomadik: show all pins in debug gpio: move Nomadik GPIO driver to drivers/gpio gpio: move U300 GPIO driver to drivers/gpio langwell_gpio: add runtime pm support gpio/pca953x: Add support for pca9574 and pca9575 devices gpio/cs5535: Show explicit dependency between gpio_cs5535 and mfd_cs5535
2011-05-27Merge branch 'for_2.6.40/gpio-move' of ↵Grant Likely
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into gpio/next
2011-05-27gpio/pch_gpio: Support new device ML7223Tomoya MORINAGA
Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub). The ML7223 IOH is for MP(Media Phone) use. The ML7223 is companion chip for Intel Atom E6xx series. The ML7223 is completely compatible for Intel EG20T PCH. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-27gpio: make gpio_{request,free}_array gpio array parameter constLars-Peter Clausen
gpio_{request,free}_array should not (and do not) modify the passed gpio array, so make the parameter const. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-27GPIO: OMAP: move to drivers/gpioKevin Hilman
Move OMAP GPIO driver to drivers/gpio. Builds whenever CONFIG_ARCH_OMAP=y. Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-05-27TPS65911: Add support for added GPIO linesJorge Eduardo Candelaria
GPIO 1 to 8 are added for TPS65911 chip version. The gpio driver now handles more than one gpio lines. Subsequent versions of the chip family can add new GPIO lines with minimal driver changes. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-27GPIO: TPS65910: Move driver to drivers/gpio/Jorge Eduardo Candelaria
The GPIO driver should reside in drivers/gpio/ for better organization. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-26gpio: Move the s5pc100 GPIO to drivers/gpioKyungmin Park
Move the Samsung s5pc100 SoC GPIO driver to drivers/gpio Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio: Move the s5pv210 GPIO to drivers/gpioKyungmin Park
Move the Samsung s5pv210 SoC GPIO driver to drivers/gpio Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio: Move the exynos4 GPIO to drivers/gpioKyungmin Park
Move the Samsung Exynos4 series SoCs GPIO driver to drivers/gpio Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio: Move to Samsung common GPIO library to drivers/gpioKyungmin Park
It's common gpiolib for recent Samsung SoCs. Move to drivers/gpio Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio/nomadik: add function to read GPIO pull down statusRickard Andersson
Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-by: Martin Persson <martin.persson@stericsson.com> [Split off from larger patch] Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio/nomadik: show all pins in debugRabin Vincent
Useful to check the status of the runtime pin muxing. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> [Squashed, modified to use chip-internal IRQ trigger state] Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio: move Nomadik GPIO driver to drivers/gpioGrant Likely
This moves the Nomadik GPIO driver out of arch/arm/plat-nomadik and into the desired location indicated by the subsystem maintainer. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [grant.likely: squashed with kconfig fixup] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio: move U300 GPIO driver to drivers/gpioLinus Walleij
This moves the U300 GPIO driver out of arch/arm/mach-u300 and into the desired location indicated by the subsystem maintainer. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26langwell_gpio: add runtime pm supportKristen Carlson Accardi
While this is essentially a no-op for this driver, it has the side effect of letting the PMU driver snoop D3 requests from the PCI core for this driver. This is only for langwell, not for whitney point. Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26gpio/pca953x: Add support for pca9574 and pca9575 devicesHaojian Zhuang
PCA957x is i2c gpio expander, and similar to PCA953x. Although register configurations are different between PCA957x and PCA953x. They can share a lot of components, such as IRQ handling, GPIO IN/OUT. So updating PCA953x driver to support PCA957x chips. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>