summaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)AuthorFilesLines
2012-10-02Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-0/+21
Pull ARM soc driver specific changes from Olof Johansson: - A long-coming conversion of various platforms to a common LED infrastructure - AT91 is moved over to use the newer MCI driver for MMC - Pincontrol conversions for samsung platforms - DT bindings for gscaler on samsung - i2c driver fixes for tegra, acked by i2c maintainer Fix up conflicts as per Olof. * tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits) drivers: bus: omap_l3: use resources instead of hardcoded irqs pinctrl: exynos: Fix wakeup IRQ domain registration check pinctrl: samsung: Uninline samsung_pinctrl_get_soc_data pinctrl: exynos: Correct the detection of wakeup-eint node pinctrl: exynos: Mark exynos_irq_demux_eint as inline pinctrl: exynos: Handle only unmasked wakeup interrupts pinctrl: exynos: Fix typos in gpio/wkup _irq_mask pinctrl: exynos: Set pin function to EINT in irq_set_type of GPIO EINTa drivers: bus: Move the OMAP interconnect driver to drivers/bus/ i2c: tegra: dynamically control fast clk i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20 ARM: tegra: clock: remove unused clock entry for i2c ARM: tegra: clock: add connection name in i2c clock entry i2c: tegra: pass proper name for getting clock ARM: tegra: clock: add i2c fast clock entry in clock table ARM: EXYNOS: Adds G-Scaler device from Device Tree ARM: EXYNOS: Add clock support for G-Scaler ARM: EXYNOS: Enable pinctrl driver support for EXYNOS4 device tree enabled platform ARM: dts: Add pinctrl node entries for SAMSUNG EXYNOS4210 SoC ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used ...
2012-10-02Merge tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-18/+30
Pull ARM soc-specific updates, take 2 from Olof Johansson: "This branch converts the MXS Freescale platform to use irqdomains and sparse IRQ, in preparation for DT probing and multiplatform kernels." * tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: mxs: remove mach/irqs.h ARM: mxs: select SPARSE_IRQ ARM: mxs: adopt irq_domain support for icoll driver ARM: mxs: select MULTI_IRQ_HANDLER ARM: mxs: retrieve timer irq from device tree gpio/mxs: adopt irq_domain support for mxs gpio driver
2012-10-02Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds6-79/+461
Pull ARM soc device tree updates from Olof Johansson: "Device tree conversion and enablement branch. Mostly a bunch of new bindings and setup for various platforms, but the Via/Winchip VT8500 platform is also converted over from being 100% legacy to now use device tree for probing. More of that will come for 3.8." Trivial conflicts due to removal of vt8500 files, and one documentation file that was added with slightly different contents both here and in the USb tree. * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (212 commits) arm: vt8500: Fixup for missing gpio.h ARM: LPC32xx: LED fix in PHY3250 DTS file ARM: dt: mmp-dma: add binding file arm: vt8500: Update arch-vt8500 to devicetree support. arm: vt8500: gpio: Devicetree support for arch-vt8500 arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices arm: vt8500: clk: Add Common Clock Framework support video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb serial: vt8500: Add devicetree support for vt8500-serial rtc: vt8500: Add devicetree support for vt8500-rtc arm: vt8500: Add device tree files for VIA/Wondermedia SoC's ARM: tegra: Add Avionic Design Tamonten Evaluation Carrier support ARM: tegra: Add Avionic Design Medcom-Wide support ARM: tegra: Add Avionic Design Plutux support ARM: tegra: Add Avionic Design Tamonten support ARM: tegra: dts: Add pwm label ARM: ux500: Fix SSP register address format ARM: ux500: Apply tc3589x's GPIO/IRQ properties to HREF's DT ARM: ux500: Remove redundant #gpio-cell properties from Snowball DT ARM: ux500: Add all encompassing sound node to the HREF Device Tree ...
2012-10-02Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds4-55/+18
Pull ARM soc general cleanups from Olof Johansson: "This is a large branch that contains a handful of different cleanups: - Fixing up the I/O space remapping on PCI on ARM. This is a series from Rob Herring that restructures how all pci devices allocate I/O space, and it's part of the work to allow multiplatform kernels. - A number of cleanup series for OMAP, moving and removing some headers, sparse irq rework and in general preparation for multiplatform. - Final removal of all non-DT boards for Tegra, it is now device-tree-only! - Removal of a stale platform, nxp4008. It's an old mobile chipset that is no longer in use, and was very likely never really used with a mainline kernel. We have not been able to find anyone interested in keeping it around in the kernel. - Removal of the legacy dmaengine driver on tegra + A handful of other things that I haven't described above." Fix up some conflicts with the staging tree (and because nxp4008 was removed) * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits) ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6 ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus ARM: mmp: using for_each_set_bit to simplify the code ARM: tegra: harmony: fix ldo7 regulator-name ARM: OMAP2+: Make omap4-keypad.h local ARM: OMAP2+: Make l4_3xxx.h local ARM: OMAP2+: Make l4_2xxx.h local ARM: OMAP2+: Make l3_3xxx.h local ARM: OMAP2+: Make l3_2xxx.h local ARM: OMAP1: Move irda.h from plat to mach ARM: OMAP2+: Make hdq1w.h local ARM: OMAP2+: Make gpmc-smsc911x.h local ARM: OMAP2+: Make gpmc-smc91x.h local ARM: OMAP1: Move flash.h from plat to mach ARM: OMAP2+: Make debug-devices.h local ARM: OMAP1: Move board-voiceblue.h from plat to mach ARM: OMAP1: Move board-sx1.h from plat to mach ARM: OMAP2+: Make omap-wakeupgen.h local ARM: OMAP2+: Make omap-secure.h local ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local ...
2012-10-02Merge tag 'fixes-non-critical' of ↵Linus Torvalds2-5/+5
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull non-critical ARM soc bug fixes from Olof Johansson: "These were submitted as bug fixes before v3.6 but not considered important enough to be included in it. Some of them cross over to cleanup territory as well, and aren't strictly bugfixes." * tag 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits) ARM: nomadik: remove NAND_NO_READRDY use ARM: pxa: fix return value check in pxa2xx_drv_pcmcia_probe() ARM: SAMSUNG: Add missing variable declaration in s3c64xx_spi1_set_platdata() ARM: S3C24XX: removes unnecessary semicolon ARM: S3C24xx: delete double assignment ARM: EXYNOS: fix address for EXYNOS4 MDMA1 ARM: EXYNOS: fixed SYSMMU setup definition to mate parameter name ARM: ep93xx: Move ts72xx.h out of include/mach ARM: ep93xx: use __iomem pointers for MMIO ARM: msm: Fix early debug uart mapping on some memory configs ARM: msm: io: Change the default static iomappings to be shared ARM: msm: io: Remove 7x30 iomap region from 7x00 ARM: msm: Remove call to missing FPGA init on 8660 ARM: OMAP4: wakeupgen: remove duplicate AUXCOREBOOT* read/write ARM: OMAP4: wakeupgen: Fix the typo in AUXCOREBOOT register save dma: tegra: make data used as *of_device_id.data const can: mpc5xxx_can: make data used as *of_device_id.data const macintosh/mediabay: make data used as *of_device_id.data const i2c/mpc: make data used as *of_device_id.data const mfd/da9052: make i2c_device_id array const ...
2012-09-24gpio-lpc32xx: Fix value handling of gpio_direction_output()Roland Stigge1-0/+5
For GPIOs of gpio-lpc32xx, gpio_direction_output() ignores the value argument (initial value of output). This patch fixes this by setting the level accordingly. Cc: stable@kernel.org Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-24Merge tag 'vt8500-for-next' of git://git.code.sf.net/p/linuxwmt/code into ↵Olof Johansson3-0/+323
next/dt From Tony Prisk: Update arch-vt8500 and drivers to device tree and remove existing non-dt code. * tag 'vt8500-for-next' of git://git.code.sf.net/p/linuxwmt/code: arm: vt8500: Update arch-vt8500 to devicetree support. arm: vt8500: gpio: Devicetree support for arch-vt8500 arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices arm: vt8500: clk: Add Common Clock Framework support video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb serial: vt8500: Add devicetree support for vt8500-serial rtc: vt8500: Add devicetree support for vt8500-rtc arm: vt8500: Add device tree files for VIA/Wondermedia SoC's Resolved add/change conflict in drivers/clk/Makefile. Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-21arm: vt8500: gpio: Devicetree support for arch-vt8500Tony Prisk3-0/+323
Converted the existing arch-vt8500 gpio to a platform_device. Added support for WM8505 and WM8650 GPIO controllers. Replaced existing readl/writel calls with _relaxed variants. Replaced existing unsigned variables with u32 to match register size. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-21Merge branch 'next/gpio-samsung' of ↵Olof Johansson1-0/+63
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt From Kukjin Kim: Since there are many changes for gpio-samsung in my tree, this has been included in my tree with Linus' agreement. * 'next/gpio-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: gpio: samsung: add devicetree init for s3c24xx arches
2012-09-21Merge branch 'samsung/cleanup' into next/cleanupOlof Johansson1-40/+0
From Kukjin Kim: Here, there are cleanup patches for Samsung v3.7 and most of them are related to cleanup Samsung specific gpio API. * samsung/cleanup: gpio: samsung: Update documentation ARM: S3C24XX: Use module_platform_driver macro in mach-osiris-dvs.c ARM: S3C24XX: Use module_platform_driver macro in h1940-bluetooth.c gpio-samsung: Remove now unused s3c2410_gpio* API ARM: S3C24XX: Remove obsolete GPIO API declarations ARM: S3C24XX: Convert users of s3c2410_gpio_setpin to gpiolib API ARM: EXYNOS: cleanup unused code related to GPS
2012-09-21Merge tag 'omap-devel-dt-merged-for-v3.7' of ↵Olof Johansson6-40/+74
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Device tree related changes for omaps. Note that this branch is based on omap-cleanup-sparseirq-for-v3.7 to avoid merge conflicts with the sparseirq changes for gpio-twl4030 driver. * tag 'omap-devel-dt-merged-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: arm/dts: Mux uart pins for omap4-sdp ARM: OMAP2+: select PINCTRL in Kconfig arm/dts: Add pinctrl driver entries for omap2/3/4 arm/dts: Add omap36xx.dtsi file and rename omap3-beagle to omap3-beagle-xm ARM: dts: omap3-overo: Add support for the blue LED Documentation: dt: Update the OMAP documentation with Overo/Toby ARM: dts: OMAP3: Add support for Gumstix Overo with Tobi expansion board ARM: dts: OMAP4: Add reg and interrupts for every nodes ARM: dts: AM33XX: Specify reg and interrupt property for all nodes ARM: dts: AM33XX: Convert all hex numbers to lower-case ARM: dts: omap3-beagle: Enable audio support ARM: dts: omap5: Add McPDM and DMIC section to the dtsi file ARM: dts: omap5: Add McBSP entries ARM: dts: omap4: Add reg-names for McPDM and DMIC ARM: dts: omap4: Add McBSP entries ARM: dts: omap3: Add McBSP entries ARM: dts: omap2420-h4: Include omap2420.dtsi file instead the common omap2 ARM: dts: omap2: Add McBSP entries for OMAP2420 and OMAP2430 SoC ARM: dts: omap3-beagle: Add heartbeat and mmc LEDs support ARM: dts: omap3: Add gpio-twl4030 properties for BeagleBoard and omap3-EVM ...
2012-09-17Merge tag 'omap-cleanup-sparseirq-for-v3.7' of ↵Olof Johansson2-12/+18
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup From Tony Lindgren: This branch contains changes needed to make omap2+ work properly with sparse IRQ. It also removes dependencies to mach/hardware.h. These help moving things towards ARM single zImage support. This branch is based on a commit in tty-next branch with omap-devel-gpmc-fixed-for-v3.7 and cleanup-omap-tags-for-v3.7 merged in to keep things compiling and sort out some merge conflicts. * tag 'omap-cleanup-sparseirq-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: Move SoC specific headers from plat to mach for omap1 ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2 ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+ ARM: OMAP: Remove unused old gpio-switch.h ARM: OMAP1: Move plat/irqs.h to mach/irqs.h ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ ARM: OMAP2+: Prepare for irqs.h removal W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h Input: omap-keypad: Remove dependencies to mach includes ARM: OMAP: Move gpio.h to include/linux/platform_data ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end ARM: OMAP2+: Remove unused nand_irq for GPMC ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c ARM: OMAP1: Define OMAP1_INT_I2C locally ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
2012-09-17Merge tag 'cleanup-omap-tags-for-v3.7' of ↵Olof Johansson4-4/+5
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup From Tony Lindgren: Remove the ancient omap specific atags that are no longer needed. At some point we were planning to pass the bootloader information with custom atags that did not work out too well. There's no need for these any longer as the kernel has been booting fine without them for quite some time. And Now we have device tree support that can be used instead. * tag 'cleanup-omap-tags-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: remove plat/board.h file ARM: OMAP: move debug_card_init() function ARM: OMAP1: move lcd pdata out of arch/arm/* ARM: OMAP1: move omap1_bl pdata out of arch/arm/* ARM: OMAP: remove the omap custom tags ARM: OMAP1: remove the crystal type tag parsing ARM: OMAP: remove the sti console workaround ARM: OMAP: omap3evm: cleanup revision bits ARM: OMAP: cleanup struct omap_board_config_kernel + sync to 3.6-rc5
2012-09-17Merge tag 'omap-cleanup-sparseirq-for-v3.7' into devel-dtTony Lindgren6-18/+24
This branch contains changes needed to make omap2+ work properly with sparse IRQ. It also removes dependencies to mach/hardware.h. These help moving things towards ARM single zImage support. This branch is based on a commit in tty-next branch with omap-devel-gpmc-fixed-for-v3.7 and cleanup-omap-tags-for-v3.7 merged in to keep things compiling and sort out some merge conflicts. Conflicts: arch/arm/mach-omap2/omap4-common.c drivers/gpio/gpio-twl4030.c
2012-09-13Merge branch 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux into ↵Olof Johansson2-5/+5
next/fixes-non-critical From "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>: this is the 2nd version of this series whose goal is to make struct of_device_id.data const. Conceptually a driver must not modify the data contained there so making it const is the right thing. v1 of this series was sent with Message-id: 1342182734-321-1-git-send-email-y. Changes since then are: - powerpc fixes - several new consts that were found by Arnd that are possible after patch 19. Arnd suggested to take this series via arm-soc late for 3.6 in one go because patch 19 depends on the former patches but is a precondition to the latter and it fixes a few warnings. So getting it in via the respective maintainer trees would need a much bigger coordination effort. That means I prefer getting Acks over you taking the patch. Vinod Koul already took dmaengine: at_hdmac: add a few const qualifiers that is in next-20120723 as 7fd63ccdad72 now. Vinod, I don't follow your pull requests, but assuming you didn't let it already pull for 3.6 I suggest you drop it from your queue and I just take your Ack. This series was build tested for arm (all defconfigs) and powerpc (all defconfigs and an allyesconfig) and grep didn't find more issues. As before it introduces a warning in drivers/regulator/twl-regulator.c. This driver does modify its .of_match_table when a device is bound which doesn't fits the concept of independant devices. Arnd noticed another new warning in drivers/scsi/qlogicpti.c that isn't that easy to resolve, because the pointer to (now) const data is passed as first argument to scsi_host_alloc. To fix that properly struct Scsi_Host.hostt needs to get a const, too. Alternatively I could introduce a cast removing the const, but I don't like that. * 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux: (25 commits) dma: tegra: make data used as *of_device_id.data const can: mpc5xxx_can: make data used as *of_device_id.data const macintosh/mediabay: make data used as *of_device_id.data const i2c/mpc: make data used as *of_device_id.data const mfd/da9052: make i2c_device_id array const powerpc/fsl_msi: drop unneeded cast to non-const pointer gpio/gpio-omap: make platformdata used as *of_device_id.data const of: add const to struct *of_device_id.data dma: tegra: make tegra_dma.chip_data a pointer to const data watchdog/mpc8xxx: add a const qualifier powerpc/celleb_pci: add a const qualifier powerpc/fsl_msi: add a const qualifier powerpc/83xx: add a const qualifier macintosh/mediabay: add a const qualifier mmc/omap_hsmmc: add a const qualifier i2c/mpc: add a const qualifier i2c/i2c-omap: add a const qualifier gpio/mpc8xxx: add a const qualifier gpio/gpio-omap.c: add a const qualifier misc/atmel_tc: make atmel_tc.tcb_config member point to const data Signed-off-by: Arnd Bergmann <arnd@arndb.de> [olof: repulled a v3 version of the branch that rebased to add some more acked-bys and added one more patch on top for tegra] Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-13ARM: OMAP: Move gpio.h to include/linux/platform_dataTony Lindgren1-7/+8
This way we can remove includes of plat/gpio.h which won't work with the single zImage support. Note that we also remove the cpu_class_is_omap2() check in gpio-omap.c as the drivers should not call it as we need to make it local to arch/arm/mach-omap2 for single zImage support. While at it, arrange the related includes in the standard way. Cc: Grant Likely <grant.likely@secretlab.ca> Cc: linux-mtd@lists.infradead.org Cc: alsa-devel@alsa-project.org Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-13ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_endTony Lindgren1-5/+10
We can't use hardcoded interrupts for SPARSE_IRQ, and can replace the hardcoded gpio_base with twl_gpiochip.base after it's been allocated. Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-11gpio/gpio-omap: make platformdata used as *of_device_id.data constUwe Kleine-König1-3/+3
Since of_device_id.data is declared as a pointer to const data a few more consts can be added in this driver. Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-09-11gpio/mpc8xxx: add a const qualifierUwe Kleine-König1-1/+1
This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_add_controller': drivers/gpio/gpio-mpc8xxx.c:360:30: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-09-11gpio/gpio-omap.c: add a const qualifierUwe Kleine-König1-1/+1
This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/gpio/gpio-omap.c: In function 'omap_gpio_probe': drivers/gpio/gpio-omap.c:1060: warning: assignment discards qualifiers from pointer target type Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-09-07gpio/twl4030: get platform data from device treeFlorian Vaussard1-27/+55
Adds a number of missing device tree properties for twl4030/gpio, and update bindings: - "ti,use-leds" -> .use_leds - "ti,debounce" -> .debounce - "ti,mmc-cd" -> .mmc_cd - "ti,pullups" -> .pullups - "ti,pulldowns" -> .pulldowns Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> [b-cousson@ti.com: Fix some checkpatch CHECK issues] Signed-off-by: Benoit Cousson <b-cousson@ti.com>
2012-09-07gpio: samsung: add devicetree init for s3c24xx archesHeiko Stuebner1-0/+63
Until now the EXYNOS-SoC was the only Samsung-SoC supporting the GPIOs via the device tree. This patch implements dt-support for the s3c24xx arches. The controllers contain only 3 cells, as the underlying gpio controller does not support controlling the drive strength on a gpio level. Tested with the gpio-keys driver on a s3c2416 based machine. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> [kgene.kim@samsung.com: fixed build error] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-09-07gpio: exynos4: skip gpiolib registration if pinctrl driver is usedThomas Abraham1-0/+21
Pinctrl driver, when enabled, registers all the gpio pins and hence the registration of gpio pins by this driver can be skipped. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-09-06gpio: tegra: remove useless includes of <mach/*.h>Stephen Warren1-3/+0
Nothing from these files is needed, so remove the includes. This helps single zImage work by reducing use of the mach-tegra/include/mach/ directory. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-06Merge branch 'soc-core' of ↵Olof Johansson7-17/+46
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt * 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: mach-shmobile: Add compilation support for dtbs using 'make dtbs' + sync to 3.6-rc3
2012-09-03gpio/mxs: adopt irq_domain support for mxs gpio driverShawn Guo1-18/+30
Remove irq_domain_add_legacy call from mach-mxs.c and have the gpio driver adopt irqdomain support, so that we can have the mapping between gpio and irq number available without using virtual_irq_start and MXS_GPIO_IRQ_START. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-01gpio: rdc321x: Prevent removal of modules exporting active GPIOsAxel Lin1-0/+1
This driver can be built as a module, set the missing owner field of struct gpio_chip to prevent removal of modules exporting active GPIOs. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-01gpio: em: Fix checking return value of irq_alloc_descsAxel Lin1-2/+2
irq_alloc_descs() returns negative error code on failure. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-01gpio: mc9s08dz60: Fix build error if I2C=mAxel Lin1-1/+1
Make GPIO_MC9S08DZ60 depend on I2C=y, this fixes below build error: LD init/built-in.o drivers/built-in.o: In function `mc9s08dz60_get_value': clk-fixed-factor.c:(.text+0x7214): undefined reference to `i2c_smbus_read_byte_data' drivers/built-in.o: In function `mc9s08dz60_set': clk-fixed-factor.c:(.text+0x727c): undefined reference to `i2c_smbus_read_byte_data' clk-fixed-factor.c:(.text+0x72bc): undefined reference to `i2c_smbus_write_byte_data' drivers/built-in.o: In function `mc9s08dz60_i2c_driver_init': clk-fixed-factor.c:(.init.text+0x290): undefined reference to `i2c_register_driver' drivers/built-in.o: In function `mc9s08dz60_i2c_driver_exit': clk-fixed-factor.c:(.exit.text+0x2c): undefined reference to `i2c_del_driver' make: *** [vmlinux] Error 1 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-28gpio-samsung: Remove now unused s3c2410_gpio* APISylwester Nawrocki1-40/+0
There is no more users of s3c2410_gpio_pullup(), s3c2410_gpio_setpin() and s3c2410_gpio_getpin() so remove theese functions. Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-08-17gpio: Fix debug message in of_get_named_gpio_flags()Thierry Reding1-1/+1
This was probably missed in the conversion done in commit 3d0f7cf ("gpio: Adjust of_xlate API to support multiple GPIO chips"). Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-16gpio: pxa: add chain_eneter and chain_exit for irq handlerChao Xie1-0/+7
Signed-off-by: Chao Xie <xiechao.mail@gmail.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-08-16GPIO: gpio-pxa: simplify pxa_gpio_to_irq() and pxa_irq_to_chip()Daniel Mack1-54/+16
Simplify the code in gpio-pxa.c and make them based on irq_base. When not probed from devicetree, initialize irq_base from PXA_GPIO_TO_IRQ() or MMP_GPIO_TO_IRQ(), respectively, so the non-DT case still works. Only tested on PXA3xx. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-08-14GPIO: gpio-pxa: fix building without CONFIG_OFArnd Bergmann1-2/+2
Commit 7212157267 ("GPIO: gpio-pxa: fix devicetree functions") added an "xlate" function pointer to the irq_domain_ops, but this function is nor declared or defined anywhere when CONFIG_OF is disabled, causing the build error: drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function) Extending the DT-only code section to cover the irq_domain_ops and the pxa_gpio_dt_ids solves this problem and makes it clearer which code is actually used without DT. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-08-12Merge tag 'gpio-fixes-v3.6-rc1' of ↵Linus Torvalds6-14/+43
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull gpio fixes from Linus Walleij: - Fix a resource leak in the SCH driver - Fix the register address calculation in the MSIC driver - Fix the PXA driver's devicetree functions - Delete redundant shadow variable leftovers in the MXC driver - Specify the GPIO base for the device tree probe in the MXC driver - Add a modalias for the i.MX driver - Fix off-by-one bug in the Samsung driver - Fix erroneous errorpath in the Langwell driver * tag 'gpio-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: drivers/gpio/gpio-langwell.c: fix error return code gpio: samsung: Fix off-by-one bug in gpio addresses ARM: dts: imx: add alias for gpio gpio/mxc: specify gpio base for device tree probe gpio/mxc: remove redundant shadow variables initialization GPIO: gpio-pxa: fix devicetree functions gpio: msic: Fix calculating register address in msic_gpio_to_oreg() gpio-sch: Fix leak of resource
2012-08-10gpio: em: do not discard em_gio_irq_domain_cleanupArnd Bergmann1-1/+1
The newly added gpio-em driver marks its em_gio_irq_domain_cleanup function as __devexit, which would lead to that function being discarded in case CONFIG_HOTPLUG is disabled. However, the function is also called by the error handling logic em_gio_probe, which would cause a jump into a NULL pointer if it was removed from the kernel or module. Without this patch, building kzm9d_defconfig results in: WARNING: drivers/gpio/built-in.o(.devinit.text+0x330): Section mismatch in reference from the function em_gio_probe() to the function .devexit.text:em_gio_irq_domain_cleanup() The function __devinit em_gio_probe() references a function __devexit em_gio_irq_domain_cleanup(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of em_gio_irq_domain_cleanup() so it may be used outside an exit section. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Magnus Damm <damm@opensource.se> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Rafael J. Wysocki <rjw@sisk.pl>
2012-08-07drivers/gpio/gpio-langwell.c: fix error return codeJulia Lawall1-2/+5
Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; } | ret = 0 ) ... when != ret = e1 *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...); ... when != x = e2 when != ret = e3 *if (x == NULL || ...) { ... when != ret = e4 * return ret; } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-07gpio: samsung: Fix off-by-one bug in gpio addressesSean Paul1-7/+7
Move gpc4 to the end of the automatically processed gpio controllers so we don't taint the automatic offset calculation. This bug caused all controllers coming after gpc4 to map to the incorrect address. The result is <&gpd1 0 0 0 0> would actually map to GPIO 0 in gpd0. Signed-off-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Doug Anderson <dianders@chromium.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-07gpio/mxc: specify gpio base for device tree probeShawn Guo1-1/+2
Currently, unlike the non-DT probe where the gpio base is specified with pdev->id, the DT probe uses the base dynamically allocated by gpio core, which uses a completely different numbering scheme. This causes two issues to user space applications which access sysfs entry /sys/class/gpio/gpioN. * It breaks the compatibility with user space applications between non-DT and DT kernels. * It's not intuitive and sometimes hard for users to map the Linux gpio number to the actual hardware pin. Use alias to identify the gpio port/bank, and then the gpio base can be specified with port id to solve above issues. If alias is not defined in device tree, the base number dynamically allocated by gpio core will be used. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-07gpio/mxc: remove redundant shadow variables initializationShawn Guo1-2/+0
With commit 3e11f7b (gpio/generic: initialize basic_mmio_gpio shadow variables properly) in place, the shadow variables initialization is being done in generic driver bgpio_init call. Remove the redundant shadow variables initialization from gpio-mxc driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-05GPIO: gpio-pxa: fix devicetree functionsDaniel Mack1-0/+26
Provide an of_xlate function for the PXA GPIO chips and make it work for devicetree environments. Successfully tested on a PXA3xx board. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-05gpio: msic: Fix calculating register address in msic_gpio_to_oreg()Axel Lin1-1/+1
In the case offset is 20 ... 23, the equation to get the register should be: INTEL_MSIC_GPIO1HV0CTLO - offset + 20 With above equation, we can get below mapping between offset and the register: offset is 20: INTEL_MSIC_GPIO1HV0CTLO offset is 21: INTEL_MSIC_GPIO1HV1CTLO offset is 22: INTEL_MSIC_GPIO1HV2CTLO offset is 23: INTEL_MSIC_GPIO1HV3CTLO Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-05gpio-sch: Fix leak of resourceAlan Cox1-1/+2
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-30Merge tag 'mfd-3.6-1' of ↵Linus Torvalds3-0/+166
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFD bits from Samuel Ortiz: "We have support for a few new drivers: - Samsung s2mps11 - Wolfson Microelectronics wm5102 and wm5110 - Marvell 88PM800 and 88PM805 - TI twl6041 We also have our regular driver improvements: - Device tree and IRQ domain support for STE AB8500 - Regmap and devm_* API conversion for TI tps6586x - Device tree support for Samsung max77686 - devm_* API conversion for STE AB3100 Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910, tps65090, da9052 and twl-core." Fix up mostly trivial conflicts, with the exception of drivers/usb/host/ehci-omap.c in particular, which had some re-organization of the reset sequence (commit 1a49e2ac9651: "EHCI: centralize controller initialization") that clashed with commit 2761a6394516 ("mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues"). In particular, commit 2761a6394516 moved the usb_add_hcd() to the *middle* of the reset sequence, which clashes fairly badly with the reset sequence re-organization (although it could have been done inside the new omap_ehci_init() function). I left that part of commit 2761a6394516 just undone. * tag 'mfd-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (110 commits) mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core mfd: Arizone core should select MFD_CORE mfd: Fix arizona-irq.c build by selecting REGMAP_IRQ mfd: Add debug trace on entering and leaving arizone runtime suspend mfd: Correct tps65090 cell names mfd: Remove gpio support from tps6586x core driver ARM: tegra: defconfig: Enable tps6586x gpio gpio: tps6586x: Add gpio support through platform driver mfd: Cache tps6586x register through regmap mfd: Use regmap for tps6586x register access. mfd: Use devm managed resources for tps6586x input: Add onkey support for 88PM80X PMIC mfd: Add support for twl6041 mfd: Fix twl6040 revision information mfd: Matches should be NULL when populate anatop child devices input: ab8500-ponkey: Create AB8500 domain IRQ mapping mfd: Add missing out of memory check for pcf50633 Documentation: Describe the AB8500 Device Tree bindings mfd: Add tps65910 32-kHz-crystal-input init mfd: Drop modifying mc13xxx driver's id_table in probe ...
2012-07-27Merge tag 'gpio-for-v3.6' of ↵Linus Torvalds13-138/+639
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO changes from Linus Walleij: - New driver for AMD-8111 southbridge GPIOs - New driver for Wolfson Micro Arizona devices - Propagate device tree parse errors - Probe deferral finalizations - all expected calls to GPIO will now hopefully request deferral where apropriate - Misc updates to TCA6424, WM8994, LPC32xx, PCF857x, Samsung MXC, OMAP and PCA953X drivers. Fix up gpio_idx conflicts in drivers/gpio/gpio-mxc.c * tag 'gpio-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: of_get_named_gpio_flags() return -EPROBE_DEFER if GPIO not yet available gpiolib: Defer failed gpio requests by default MAINTAINERS: add entry OMAP GPIO driver gpio/pca953x: increase variables size to support 24 bit of data GPIO: PCA953X: Increase size of invert variable to support 24 bit gpio/omap: move bank->dbck initialization to omap_gpio_mod_init() gpio/mxc: use the edge_sel feature if available gpio: propagate of_parse_phandle_with_args errors gpio: samsung: add flags specifier to device-tree binding gpiolib: Add support for Wolfson Microelectronics Arizona class devices gpio: gpio-lpc32xx: Add gpio_to_irq mapping gpio: pcf857x: share 8/16 bit access functions gpio: LPC32xx: Driver cleanup MAINTAINERS: Add Wolfson gpiolib drivers to the Wolfson entry gpiolib: wm8994: Convert to devm_kzalloc() gpiolib: wm8994: Use irq_domain mappings for gpios gpio: add a driver for GPIO pins found on AMD-8111 south bridge chips gpio/tca6424: merge I2C transactions, remove cast gpio/of: fix a typo of comment message
2012-07-25gpio: tps6586x: Add gpio support through platform driverLaxman Dewangan3-0/+166
Converting the gpio driver of tps6586x to a platform driver in place of registering the gpio through core driver. The motivation of the change is: - This is inline with the mfd drivers implementation. - This will move the related gpio support to gpio driver folder where all gpio related drivers are available. This will be easy the maintenance and enhancement is anything done for gpio. - The gpio functionality can be selected through config variable. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-24Merge tag 'irq' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-24/+32
Pull arm-soc sparse IRQ conversion from Arnd Bergmann: "The I.MX platform is getting converted to use sparse IRQs. We are doing this for all platforms over time, because this is one of the requirements for building a multiplatform kernel, and generally a good idea." * tag 'irq' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: imx: select USE_OF ARM: imx: Fix build error due to missing irqs.h include ARM: imx: enable SPARSE_IRQ for imx platform ARM: fiq: change FIQ_START to a variable tty: serial: imx: remove the use of MXC_INTERNAL_IRQS ARM: imx: remove unneeded mach/irq.h inclusion i2c: imx: remove unneeded mach/irqs.h inclusion ARM: imx: add a legacy irqdomain for mx31ads ARM: imx: add a legacy irqdomain for 3ds_debugboard ARM: imx: pass gpio than irq number into mxc_expio_init ARM: imx: leave irq_base of wm8350_platform_data uninitialized dma: ipu: remove the use of ipu_platform_data ARM: imx: move irq_domain_add_legacy call into avic driver ARM: imx: move irq_domain_add_legacy call into tzic driver gpio/mxc: move irq_domain_add_legacy call into gpio driver ARM: imx: eliminate macro IRQ_GPIOx() ARM: imx: eliminate macro IOMUX_TO_IRQ() ARM: imx: eliminate macro IMX_GPIO_TO_IRQ()
2012-07-17gpio: of_get_named_gpio_flags() return -EPROBE_DEFER if GPIO not yet availableRoland Stigge1-1/+4
of_get_named_gpio_flags() and of_get_named_gpio() return -EPROBE_DEFER if the respective GPIO is not (yet) available. This is useful if driver's probe() functions try to get a GPIO whose controller isn't probed yet. Thus, the driver can be probed again later on. The function still returns -EINVAL on other errors (parse error or node doesn't exist). This way, the case of an optional/intentionally missing GPIO is handled appropriately. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-17gpiolib: Defer failed gpio requests by defaultMark Brown1-1/+1
Since users must be explicitly provided with a GPIO number in order to request one the overwhelmingly common case for failing to request will be that the required GPIO driver has not yet registered and we should therefore defer until it has registered. In order to avoid having to code this logic in individual drivers have gpio_request() return -EPROBE_DEFER when failing to look up the GPIO. Drivers which don't want this behaviour can override it if they desire. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-17gpio/pca953x: increase variables size to support 24 bit of dataLeed Aguilar1-14/+14
Increase variable size from u16 to u32 to allocate 24 bit of data required for the TCA6424 I/O expander device type. Signed-off-by: Leed Aguilar <leed.aguilar@ti.com> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>