summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-tegra.c
AgeCommit message (Collapse)Author
2012-05-03gpio: tegra: implement gpio_request and gpio_free.Laxman Dewangan
Recent pinctrl discussions concluded that gpiolib APIs should in fact do whatever is required to mux a GPIO onto pins. This change is based on the work done by Stephen Warren in mainline kernel. ----- commit 3e215d0a19c2a0c389bd9117573b6dd8e46f96a8 gpio: tegra: Hide tegra_gpio_enable/disable() 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. ---- Change-Id: I482ea5c177cf2ee6fa06ddac48b556f1508efacb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/98466 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-02-15ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpioStephen Warren
irq_to_gpio is being removed. Replace the only use of that API by the ARM Tegra sub-architecture. Upstream v3.2 commit 470080015c1f8bbd15ba1486d5c4bd8a3e7fa79a Change-Id: I9ba3ed66cc6262f14f1fdcfbb6eee78cfe818f7e Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83537 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-02-15ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irqStephen Warren
Upstream v3.2 commit 438a99c078b1bc3c9aebd92e7928f2477311d3e5 Change-Id: I00f9df65565c3b086438818ea29d2337871655a8 Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83536 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-02-14gpio: tegra: FIx build warningLaxman Dewangan
Fixing build warning as kernel/drivers/gpio/gpio-tegra.c:217: warning: initialization from incompatible pointer type Change-Id: Ic03c1711cf93b4ada80adaf1589c6080e6166e90 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/83409
2012-01-19gpio: tegra: add stub set_debounce callbackVarun Wadekar
gpiolib spits out error messages if the underlying driver does not implement the set_debounce api. Add stub api since Tegra does not support gpio debounce in hardware. Bug 924471 Change-Id: Iadd4ddb41a3a028edf7d55fccf100c8d4bcb5fa2 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75639 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-21ARM: tegra: gpio: export gpio enable/disable api'sVarun Wadekar
Export tegra_gpio_enable/disable api's to make them available to loadable kernel modules. Bug 845065 Change-Id: Ib17bd895fe03ffbf98fbf5e7e5d79dc3ec5f9235 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-11-30HACK merge fixups for compileDan Willemsen
Rebase-Id: Rbc628711479b187a90437bea94776066c7a58b54
2011-11-30arm: tegra: power: lp0 wake enable modifiedBitan Biswas
GPIO based lp0 wakeup needed to support search for its irq as well as GPIO bank irq in table. This is implemented in this change. lp0 wakeup irq enable using enable_irq_wake needs to be called in specific drivers. Additionally, in some cases wake irq needs to be updated in tegra wakeup table. bug 890309 bug 902114 Change-Id: I983318172ffb020f565763cfe2bb29018223dcd0 Reviewed-on: http://git-master/r/64395 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rffcadeee341a73f2ea6d62e31d507e9a8dce5a0e
2011-11-30ARM: tegra: gpio: Add range check for gpio enable/disableChaitanya Bandi
Added the range check into tegra_gpio_enable and tegra_gpio_disable Bug 897387 Reviewed-on: http://git-master/r/62641 (cherry picked from commit 091b3906b2dd64cd58221e7e61a24a57dabad16c) Change-Id: I9be8129397a1dccbea4a04f6b6ed7d4529bf45c3 Reviewed-on: http://git-master/r/63174 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rfaf0efdbc60208a56e4e4f073e3661ad1511694c
2011-11-30ARM: tegra: gpio: Set a gpio to tristate or normalChaitanya Bandi
Create mapping from gpio to pingroup and set gpio to normal or tristate Bug 866633 Reviewed-on: http://git-master/r/56557 (cherry picked from commit 321ded98d41170b9e32d60177c6808492ccdf115) Change-Id: I3d1b979717f1c6b208af3df0a7dfe603e5272d21 Reviewed-on: http://git-master/r/61120 Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R5991c2cbc11aa35345fde7f08c0bfeb306e85e1e
2011-11-30ARM tegra: gpio: Correct gpio interrupt init sequenceDaehyoung Ko
It is possible for GPIO interrupt to occur when registering handler since set_irq_chained_handler enables GPIO interrupt. Thus all relevant variables are required to be initialized before calling set_irq_chained_handler. Also add initialization of interrupt status register. Bug 884569 Reviewed-on: http://git-master/r/58218 (cherry picked from commit e03fe4cc1bf06fa6c32c0520e2ba31f009f9301d) Change-Id: Ic76f95215b61d6e091ae1cfa11522f8af9c3eecd Reviewed-on: http://git-master/r/60475 Reviewed-by: Daehyoung Ko <dko@nvidia.com> Tested-by: Daehyoung Ko <dko@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R5340918dccc1a8b1d95c5b629cc985f44d45fb67
2011-11-30arm: tegra: gpio: API to configure pins as gpio with init valueLaxman Dewangan
Adding api to configure pins in gpio mode with init value before gpio library is up. This will provide to configure the pins in initial state and avoid any glitch in pins. bug 876305 Reviewed-on: http://git-master/r/56630 (cherry picked from commit 9e357b69d25f96c13acb660860bcdf8e0ab0a1ef) Change-Id: Ia14721c0bf96e1a45561139fdbbf2d995b9a4963 Reviewed-on: http://git-master/r/57265 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rc775d23898a6275d633e4474e6cf9b10395697e2
2011-11-30arm: tegra: gpio_get_value can read output gpioSeongho Joo
gpio_get_value only supports input pin. extend the usage for output pin. Bug 839772 Original-Change-Id: I5a8f5572148afde23e082af18f2e37377ae50bd1 Reviewed-on: http://git-master/r/36758 Tested-by: Seongho Joo <sjoo@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R021e8ff272e4cecd855a574b008dbf8663378970
2011-11-30ARM: tegra: power: Use CONFIG_PM_SLEEP instead of CONFIG_PMScott Williams
For Linux 2.6.39, CONFIG_PM_SLEEP is the proper kernel configuration parameter to use on Tegra for power management, and not CONFIG_PM. CONFIG_PM does not have the required dependency on CONFIG_SUSPEND necessary to pull in the CPU suspend/resume functionality used by Tegra. Also fixes compilation errors when CONFIG_PM and by implication CONFIG_PM_SLEEP are not configured. Change-Id: I8bb380ae7c6b22759bfbc223febc28f585111aad Reviewed-on: http://git-master/r/40458 Tested-by: Daniel Willemsen <dwillemsen@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: R61d656cd67439aa9f466c381845d7a4685fc8648
2011-11-30arm: tegra: Clean up SOC conditionalsScott Williams
Change SOC conditionals to make them more forward-looking. Original-Change-Id: Ib60db4e690c2f396afdec962616d735548b5a8a9 Reviewed-on: http://git-master/r/32706 Reviewed-by: Niket Sirsi <nsirsi@nvidia.com> Tested-by: Niket Sirsi <nsirsi@nvidia.com> Rebase-Id: R77c675a1995116098b58f1f775bc7c3cc8722998
2011-11-30arm: tegra: gpio: Removing fixed number of gpio bank.Laxman Dewangan
The number of gpio bank varies from arch to arch and in this case, the gpio bank count should not fix to single arch. Making the gpio bank count based on number of gpio bank available in a corresponding architecture. Original-Change-Id: I16ece8945db519d73c702c8bb832b42cc0bf35fc Reviewed-on: http://git-master/r/29625 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R31dcbc6e0511c4ace85979f059dabdb5b62d4270
2011-11-30[ARM/tegra] Add Tegra3 supportScott Williams
Bug 764354 Original-Change-Id: I8a390eb4dae87dceacb97461f23d13554868b046 Reviewed-on: http://git-master/r/12228 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Tested-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I8e6b8303898796419fb5a759cd16edff9aeac081 Rebase-Id: R2866240384c6c24f46bd7ef54bc3dc9140d9e96b
2011-11-30ARM: tegra: gpio: remove manual acks in irq handlerColin Cross
The interrupt will be acked by the generic irq handler, there is no need to ack it manually. Change-Id: I48ffc78d90f7951afcfde849300fcbc0673a876a Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30ARM: tegra: gpio: Convert suspend/resume to syscoreColin Cross
Signed-off-by: Colin Cross <ccross@android.com> Change-Id: I5cd5b83eb0a760826fc7443f06cd1e94bba359db
2011-11-30ARM: tegra: gpio: Add support for waking from suspendColin Cross
Change-Id: Ifd11daa6eac4ca747aba4a4d98f41270b7055bbb Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30ARM: tegra: remove unused mach/suspend.hColin Cross
mach/suspend.h is not used yet, and its functions will be replaced with syscore ops. Delete it. Change-Id: I7b32d3514e7f4427c7d5faa97c1954a7a2cc286c Signed-off-by: Colin Cross <ccross@android.com>
2011-07-05gpio/tegra: Use engineering names in DT compatible propertyStephen Warren
Engineering names are more stable than marketing names. Hence, use them for Device Tree compatible properties instead. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-15gpio/tegra: add devicetree supportGrant Likely
Add support for decoding gpios from the device tree Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Olof Johansson <olof@lixom.net>
2011-06-15gpio/tegra: Move Tegra gpio driver to drivers/gpioGrant Likely
As part of the gpio driver consolidation, this patch moves the Tegra driver into drivers/gpio Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Colin Cross <ccross@android.com>