aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)AuthorFilesLines
2012-05-12Merge tag 'ux500-gpio-pins-for-3.5' of ↵Olof Johansson2-1307/+0
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/pinctrl ux500 GPIO and pinctrl changes for kernel 3.5 * tag 'ux500-gpio-pins-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: ux500: switch MSP to using pinctrl for pins ARM: ux500: alter MSP registration to return a device pointer ARM: ux500: switch to using pinctrl for uart0 ARM: ux500: delete custom pin control system ARM: ux500: switch over to Nomadik pinctrl driver pinctrl: add sleep state definition pinctrl/nomadik: implement pin configuration pinctrl/nomadik: implement pin multiplexing pinctrl/nomadik: reuse GPIO debug function for pins pinctrl/nomadik: break out single GPIO debug function pinctrl/nomadik: basic Nomadik pinctrl interface pinctrl/nomadik: !CONFIG_OF build error gpio: move the Nomadik GPIO driver to pinctrl Context conflicts resolved in drivers/pinctrl/Kconfig and drivers/pinctrl/Makefile. Signed-off-by: Olof Johansson <[email protected]>
2012-05-11Merge branch 'imx/pinctrl/for-3.5' of ↵Olof Johansson1-2/+19
git://git.linaro.org/people/shawnguo/linux-2.6 into next/pinctrl * 'imx/pinctrl/for-3.5' of git://git.linaro.org/people/shawnguo/linux-2.6: (290 commits) ARM: mxs: enable pinctrl support video: mxsfb: adopt pinctrl support ASoC: mxs-saif: adopt pinctrl support i2c: mxs: adopt pinctrl support mtd: nand: gpmi: adopt pinctrl support mmc: mxs-mmc: adopt pinctrl support serial: mxs-auart: adopt pinctrl support serial: amba-pl011: adopt pinctrl support spi/imx: adopt pinctrl support i2c: imx: adopt pinctrl support can: flexcan: adopt pinctrl support net: fec: adopt pinctrl support tty: serial: imx: adopt pinctrl support mmc: sdhci-imx-esdhc: adopt pinctrl support ARM: imx6q: switch to use pinctrl subsystem ARM: mxs: enable pinctrl dummy states ARM: imx: enable pinctrl dummy states +3.4-rc5 update
2012-05-12gpio/mxs: add device tree probeShawn Guo1-4/+32
It adds device tree probe for gpio-mxs driver. Signed-off-by: Shawn Guo <[email protected]> Acked-by: Linus Walleij <[email protected]>
2012-05-12gpio/mxs: get rid of the use of cpu_is_xxxShawn Guo1-22/+52
It removes the use of cpu_is_xxx from gpio-mxs driver and instead use platform_device_id to identify the device. Accordingly, mxs platform code is changed to register gpio device with different names, and the registeration are done in soc specific initialization functions now, so postcore_initcall(mxs_add_mxs_gpio) gets removed. Signed-off-by: Shawn Guo <[email protected]> Acked-by: Linus Walleij <[email protected]>
2012-05-12gpio/mxs: use devm_* helpers to make error handling simpleShawn Guo1-39/+13
It uses devm_* helpers to make the error handling of probe clean and simple. Signed-off-by: Shawn Guo <[email protected]> Acked-by: Linus Walleij <[email protected]>
2012-05-11Merge branch 'for_3.5/gpio/cleanup' of ↵Grant Likely1-86/+26
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into gpio/next
2012-05-11gpio/exynos: Fix compiler warnings when non-exynos machines are selectedSachin Kamat1-6/+12
Fixes the following compiler warnings: drivers/gpio/gpio-samsung.c: In function ‘samsung_gpiolib_init’: drivers/gpio/gpio-samsung.c:2980:1: warning: label ‘err_ioremap1’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2978:1: warning: label ‘err_ioremap2’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2976:1: warning: label ‘err_ioremap3’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2974:1: warning: label ‘err_ioremap4’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2722:55: warning: unused variable ‘gpio_base4’ [-Wunused-variable] drivers/gpio/gpio-samsung.c:455:32: warning: ‘exynos_gpio_cfg’ defined but not used [-Wunused-variable] drivers/gpio/gpio-samsung.c:2126:33: warning: ‘exynos4_gpios_1’ defined but not used [-Wunused-variable] drivers/gpio/gpio-samsung.c:2228:33: warning: ‘exynos4_gpios_2’ defined but not used [-Wunused-variable] drivers/gpio/gpio-samsung.c:2373:33: warning: ‘exynos4_gpios_3’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-11gpio: pch9: Use proper flow type handlersThomas Gleixner1-29/+28
Jean-Francois Dagenais reported: Configuring a gpio pin with the gpio-pch driver with "IRQF_TRIGGER_LOW | IRQF_ONESHOT" generates an interrupt storm for threaded ISR until the ISR thread actually gets to physically clear the interrupt on the triggering chip!! The immediate observable symptom is the high CPU usage for my ISR thread task and the interrupt count in /proc/interrupts incrementing radically. The driver is wrong in several ways: 1) Using handle_simple_irq() does not provide proper flow control handling. In the case of oneshot threaded handlers for the demultiplexed interrupts this results in an interrupt storm because the simple handler does not deal with masking/unmasking. Even without threaded oneshot handlers an interrupt storm for level type interrupts can easily be triggered when the interrupt is disabled and the interrupt line is activated from the device. 2) Acknowlegding the demultiplexed interrupt before calling the handler is wrong for level type interrupts. 3) The set_type function unconditionally enables the interrupt. It's supposed to set the type and nothing else. The unmasking is done by the core code. Move the acknowledge code into a separate function and add it to the demux irqchip callbacks. Remove the unconditional enabling from the set_type() callback and set the proper flow handlers depending on the selected type (level/edge). Reported-and-tested-by: Jean-Francois Dagenais <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-11gpio/omap: fix missing check in *_runtime_suspend()Tarun Kanti DebBarma1-5/+8
We do checking for bank->enabled_non_wakeup_gpios in order to skip redundant operations. Somehow, the check got missed while doing the cleanup series. Just to make sure that we do context restore correctly in *_runtime_resume(), the bank->workaround_enabled check is moved after context restore. Otherwise, it would prevent context restore when bank->enabled_non_wakeup_gpios is 0. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume()Tarun Kanti DebBarma1-2/+2
Add register offsets for GPIO_IRQSTATUS_RAW_0, GPIO_IRQSTATUS_RAW_0 which are present on OMAP4+ processors. Now we can distinguish conditions applicable to OMAP4,5 and those specific to OMAP24xx and OMAP3xxx. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpio/omap: remove suspend/resume callbacksTarun Kanti DebBarma1-47/+0
Both omap_gpio_suspend() and omap_gpio_resume() does programming of wakeup_en register. _gpio_rmw(base, bank->regs->wkup_en, 0xffffffff, 0); _gpio_rmw(base, bank->regs->wkup_en, bank->context.wake_en, 1); This is redundant in omap_gpio_suspend() because wakeup_en register automatically gets initialized in _set_gpio_wakeup() and set_gpio_trigger() while being called either from chip.irq_set_wake() or chip.irq_set_type(). This is also redundant in omap_gpio_resume() because wakeup_en register is programmed in omap_gpio_restore_context() called which is called from runtime resume callback. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpio/omap: remove retrigger variable in gpio_irq_handlerTarun Kanti DebBarma1-3/+0
commit 672e302e3c (ARM: OMAP: use edge/level handlers from generic IRQ framework) removed retrigger support in favor of using generic IRQ framework. This patch cleans up some unused remnants of that removal. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Acked-by: Felipe Balbi <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpio/omap: remove saved_wakeup field from struct gpio_bankTarun Kanti DebBarma1-9/+3
There is no more need to have saved_wakeup because bank->context.wake_en already holds that value. So getting rid of read/write operation associated with this field. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Acked-by: Felipe Balbi <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpio/omap: remove suspend_wakeup field from struct gpio_bankTarun Kanti DebBarma1-7/+6
Since we already have bank->context.wake_en to keep track of gpios which are wakeup enabled, there is no need to have this field any more. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Acked-by: Felipe Balbi <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpio/omap: remove saved_fallingdetect, saved_risingdetectTarun Kanti DebBarma1-11/+8
Since we already have context.fallingdetect and context.risingdetect there is no more need to have these additional fields. Also, getting rid of extra reads associated with them. Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Cousson, Benoit <[email protected]> Cc: Grant Likely <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Acked-by: Felipe Balbi <[email protected]> Tested-by: Govindraj.R <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-11gpiolib/arches: Centralise bolierplate asm/gpio.hMark Brown1-0/+8
Rather than requiring architectures that use gpiolib but don't have any need to define anything custom to copy an asm/gpio.h provide a Kconfig symbol which architectures must select in order to include gpio.h and for other architectures just provide the trivial implementation directly. This makes it much easier to do gpiolib updates and is also a step towards making gpiolib APIs available on every architecture. For architectures with existing boilerplate code leave a stub header in place which warns on direct inclusion of asm/gpio.h and includes linux/gpio.h to catch code that's doing this. Direct inclusion of asm/gpio.h has long been deprecated. Signed-off-by: Mark Brown <[email protected]> Acked-by: Jonas Bonn <[email protected]> Acked-by: Tony Luck <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-11gpio: add MSIC gpio driverMathias Nyman3-0/+348
Add gpio support for Intel MSIC chips found in Intel Medfield platforms. MSIC supports totally 24 GPIOs with 16 low voltage and 8 high voltage pins. Driver uses MSIC mfd interface for MSIC access. (Updated comment to indicate why locking is actually safe) Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-11gpio: samsung: refactor gpiolib init for exynos4/5Olof Johansson1-188/+215
Only code move, no functional change. Main reason to do this was to get rid of the warnings: drivers/gpio/gpio-samsung.c: In function 'samsung_gpiolib_init': drivers/gpio/gpio-samsung.c:2974:1: warning: label 'err_ioremap4' defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2722:47: warning: unused variable 'gpio_base4' [-Wunused-variable] without adding more ifdef mess. I think this whole file would do well being coverted over to a platform driver and moving most of the tables out to SoC code and/or device trees, but since that changes init ordering it needs to be done with some care, i.e. not at this time. Signed-off-by: Olof Johansson <[email protected]> Acked-by: Kukjin Kim <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-11gpio: move the Nomadik GPIO driver to pinctrlLinus Walleij2-1307/+0
I'm moving this driver over to the pinctrl subsystem to convert the custom pin mux/config scheme over to use pinctrl. Acked-by: Stephen Warren <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-05-10gpio/langwell: re-read the IRQ status register after each iterationMika Westerberg1-3/+1
The IRQ status register should be re-read after each iteration. Otherwise the loop misses the interrupt if it gets raised immediately after handled. Reported-by: Grant Likely <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-10gpio/omap: fix incorrect initialization of omap_gpio_mod_initTarun Kanti DebBarma1-6/+3
Initialization of irqenable, irqstatus registers is the common operation done in this function for all OMAP platforms, viz. OMAP1, OMAP2+. The latter _gpio_rmw()'s which supposedly got introduced wrongly to take care of OMAP2+ platforms were overwriting initially programmed OMAP1 value breaking functionality on OMAP1. Somehow incorrect assumption was made that each _gpio_rmw()'s were mutually exclusive. On close observation it is found that the first _gpio_rmw() which is supposedly done to take care of OMAP1 platform is generic enough and takes care of OMAP2+ platform as well. Therefore remove the latter _gpio_rmw() to irqenable as they are redundant now. Writing to ctrl and debounce_en registers for OMAP2+ platforms are modified to match the original(pre-cleanup) code where the registers are initialized with 0. In the cleanup series since we are using _gpio_rmw(reg, 0, 1), instead of __raw_writel(), we are just reading and writing the same values to ctrl and debounce_en. This is not an issue for debounce_en register because it has 0x0 as the default value. But in the case of ctrl register the default value is 0x2 (GATINGRATIO = 0x1) so that we end up writing 0x2 instead of intended 0 value. Therefore changing back to __raw_writel() as this is sufficient for this case besides simpler to understand. Also, change irqstatus initalization logic that avoids comparison with bool, besides making it fit in a single line. Cc: [email protected] Cc: Tony Lindgren <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Santosh Shilimkar <[email protected]> Cc: Grant Likely <[email protected]> Reported-by: Janusz Krzysztofik <[email protected]> Tested-by: Janusz Krzysztofik <[email protected]> Signed-off-by: Tarun Kanti DebBarma <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2012-05-09Merge branch 'for-3.5/dt' of ↵Olof Johansson1-18/+21
git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/dt2 By Stephen Warren (29) and others via Stephen Warren * 'for-3.5/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (43 commits) ARM: dt: tegra trimslice: add support for audio ARM: dt: tegra trimslice: enable SDHCI1 controller ARM: dt: tegra trimslice: add RTC I2C device ARM: dt: tegra seaboard: add i2c devices ARM: dt: tegra seaboard: configure I2C2 pinmux ARM: dt: tegra seaboard: fix I2C2 SCL rate ARM: dt: tegra: enable als and proximity sensor + pinctrl mergebase branch The pinctrl mergebase branch merge conflicts in drivers/pinctrl/core.c that were resolved. Signed-off-by: Olof Johansson <[email protected]>
2012-05-09Merge branch 'for-3.5/gpio-pinmux' of ↵Olof Johansson1-18/+21
git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/pinctrl By Stephen Warren via Stephen Warren * 'for-3.5/gpio-pinmux' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: pinctrl: tegra: error reporting cleanup pinctrl: tegra: debugfs enhancements pinctrl: tegra: refactor probe handling ARM: dt: tegra20: add pinmux to device tree ARM: dt: tegra cardhu: add pinmux to device tree ARM: tegra: Remove pre-pinctrl pinmux driver ARM: tegra: Switch to new pinctrl driver gpio: tegra: Hide tegra_gpio_enable/disable() ARM: tegra: seaboard: Don't gpio_request() ISL29018_IRQ gpio: tegra: configure pins during irq_set_type ARM: tegra: Remove VBUS_GPIO handling from board files usb: ehci-tegra: Add vbus_gpio to platform data
2012-05-09gpio: Add STA2X11 GPIO blockAlessandro Rubini3-0/+444
This introduces 128 gpio bits (for each PCI device installed) with working interrupt support. Signed-off-by: Alessandro Rubini <[email protected]> Acked-by: Giancarlo Asnaghi <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-05-08gpio/langwell: convert to use irq_domainMika Westerberg2-21/+30
irq_domain already provides a facility to translate from hardware IRQ numbers to Linux IRQ numbers so use that instead of open-coding the logic in the driver. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-08Merge tag 'v3.4-rc6' into gpio/nextGrant Likely7-41/+84
Linux 3.4-rc6
2012-05-05gpio: pxa: parse gpio from DTS fileHaojian Zhuang1-18/+98
Parse GPIO numbers from DTS file. Allocate interrupt according to GPIO numbers. Signed-off-by: Haojian Zhuang <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2012-05-04gpiolib: Convert to devres_release()Mark Brown1-2/+1
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-01gpio: Add support for Intel ICHx/3100/Series[56] GPIOPeter Tyser3-0/+433
This driver works on many Intel chipsets, including the ICH6, ICH7, ICH8, ICH9, ICH10, 3100, Series 5/3400 (Ibex Peak), Series 6/C200 (Cougar Point), and NM10 (Tiger Point). Additional Intel chipsets should be easily supported if needed, eg the ICH1-5, EP80579, etc. Tested on QM67 (Cougar Point), QM57 (Ibex Peak), 3100 (Whitmore Lake), and NM10 (Tiger Point). Includes work from Jean Delvare: - Resource leak removal during module load/unload - GPIO API bit value enforcement Also includes code cleanup from Guenter Roeck and Grant Likely. Signed-off-by: Peter Tyser <[email protected]> Signed-off-by: Aaron Sierra <[email protected]> Acked-by: Grant Likely <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2012-04-27ARM: pxa: fix gpio wakeup settingRobert Jarzmik1-2/+19
In 3.3, gpio wakeup setting was broken. The call enable_irq_wake() didn't set up the PXA gpio registers (PWER, ...) anymore. Fix it at least for pxa27x. The driver doesn't seem to be used in pxa25x (weird ...), and the fix doesn't extend to pxa3xx and pxa95x (which don't have a gpio_set_wake() available). Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Haojian Zhuang <[email protected]>
2012-04-24drivers/gpio: gpio-nomadik: Add support for irqdomainsLee Jones1-48/+58
Add irq domain support to the gpio-nomadik GPIO driver. This enables its users to support dynamic IRQ assignment, which is requried by Device Tree. Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-04-24drivers/gpio: gpio-nomadik: Apply Device Tree bindingsLee Jones1-3/+38
This creates Device Tree bindings for the Nomadik GPIO driver. Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-04-24gpio/nomadik: use ioremap() instead of static mappingsLinus Walleij1-4/+11
We were using a custom io_p2v() (physical-to-virtual) translation macro, but it's fully possible to just ioremap() this memory now, so skip use of static addresses altogether. Signed-off-by: Linus Walleij <[email protected]>
2012-04-23gpio/nomadik: support low EMI modeRabin Vincent1-0/+25
Low EMI (Electro-Magnetic Interference) mode means lower slew rate on the signals. The Nomadik GPIO controller supports this so create an interface to enable it. Signed-off-by: Rabin Vincent <[email protected]> Reviewed-by: Srinidhi Kasagar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-04-23gpio/nomadik: fix spurious interrupts with SKERabin Vincent1-0/+39
If the pin is switching to altfunc, and there was an interrupt installed on it which has been lazy disabled, actually mask the interrupt to prevent spurious interrupts that would occur while the pin is under control of the peripheral. Only SKE does this. Signed-off-by: Rabin Vincent <[email protected]> Reviewed-by: Srinidhi Kasagar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-04-23gpio/nomadik: cache [rf]w?imscRabin Vincent1-16/+26
Cache two more registers in the GPIO controller. Signed-off-by: Rabin Vincent <[email protected]> Reviewed-by: Srinidhi KASAGAR <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-04-23gpio/nomadik: don't set SLPM to 1 for non-wakeup pinsRabin Vincent1-14/+7
Setting GPIOs' SLPM value to 1 (WAKEUP_DISABLE) is seen to cause increased power consumption in sleep/deep-sleep. So remove the code which disables SLPM based on the wakeup settings and only ensure it is on as needed. Signed-off-by: Rabin Vincent <[email protected]> Reviewed-by: Srinidhi Kasagar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-04-18gpio: tegra: Hide tegra_gpio_enable/disable()Stephen Warren1-18/+18
Recent pinctrl discussions concluded that gpiolib APIs should in fact do whatever is required to mux a GPIO onto pins, by calling pinctrl APIs if required. This change implements this for the Tegra GPIO driver, and removes calls to the Tegra-specific APIs from drivers and board files. Cc: Chris Ball <[email protected]> Cc: [email protected] Signed-off-by: Stephen Warren <[email protected]> Acked-by: Chris Ball <[email protected]> # for sdhci-tegra.c Acked-by: Linus Walleij <[email protected]> Acked-by: Olof Johansson <[email protected]>
2012-04-18gpio: tegra: configure pins during irq_set_typeStephen Warren1-0/+3
When a Tegra GPIO is used as an IRQ, it should be enabled as a GPIO (so the pinmux module isn't driving it as an output) and configured as a GPIO input (so the GPIO module isn't driving it as an output). Set this up automatically whenever an IRQ is requested, so that users of IRQs don't need to do this. Signed-off-by: Stephen Warren <[email protected]> Acked-by: Olof Johansson <[email protected]>
2012-04-10gpio/exynos: Fix compiler warning in gpio-samsung.c fileSachin Kamat1-8/+8
Fixes the following warning when "SAMSUNG EXYNOS5" is not selected: warning: ‘exynos5_gpios_1’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_2’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_3’ defined but not used [-Wunused-variable] warning: ‘exynos5_gpios_4’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-10gpio: Fix uninitialized variable bit in adp5588_irq_handlerAxel Lin1-1/+1
The variable 'bit' is uninitialized in the first iteration of for loop. Fix it. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-10gpio/sodaville: Convert sodaville driver to new irqdomain APIGrant Likely2-14/+11
The irqdomain api changed significantly in v3.4 which caused a build failure for this driver. Signed-off-by: Grant Likely <[email protected]> Acked-by: Sebastian Andrzej Siewior <[email protected]> Cc: Hans J. Koch <[email protected]> Cc: Torben Hohn <[email protected]>
2012-04-07gpio: Move DT support code into drivers/gpioGrant Likely3-0/+245
The code in drivers/of/gpio.c isn't shared by any other subsystem since it is all gpiolib specific. drivers/gpio is a better place to maintain these functions. Signed-off-by: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Linus Walleij <[email protected]>
2012-04-07gpio: Convert drivers to use module_pci_driver()Axel Lin4-44/+4
This patch converts the drivers in drivers/gpio/* to use module_pci_driver() macro which makes the code smaller and a bit simpler by having less boilerplate. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-06gpio/pca953x: Update GPIO_PCA953X Kconfig entry to include more supported ↵Axel Lin1-4/+5
devices The Kconfig description and help text doesn't list all of the devices supported by this driver. This patch adds the PCA957x devices. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-05gpio/langwell: clear IRQ edge detect registers at initMika Westerberg1-0/+21
The boot firmware might leave the registers configured causing interrupts to happen even when no handler for them is yet registered. Fix this by clearing the IRQ edge detect registers at init. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-05gpio/langwell: allocate IRQ descriptors dynamically for SPARSE_IRQMika Westerberg1-3/+13
Since x86 is using SPARSE_IRQ by default nowadays it means that we need to allocate IRQ descriptors dynamically using irq_alloc_descs() otherwise the genirq code fails to convert our irq numbers to suitable descriptors. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-05gpio/langwell: use devm_* helpers to simplify probeMika Westerberg1-11/+7
Use devm_* helper functions where possible to make the error handling in the probe function simpler. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-05gpio: add flags to export GPIOs when requestingWolfram Sang1-1/+11
Introduce new flags to automatically export GPIOs when using the convenience functions gpio_request_one() or gpio_request_array(). This eases support for custom boards where lots of GPIOs need to be exported for customer applications. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-04-04gpio: tegra: Iterate over the correct number of banksStephen Warren1-2/+2
When Tegra30 support was added to the Tegra GPIO driver, a few places which iterated over all banks were not converted to use the variable tegra_gpio_bank_count rather than hard-coding the bank count. Fix this. Signed-off-by: Stephen Warren <[email protected]> Acked-by: Olof Johansson <[email protected]>