History log of /drivers/gpio/gpio-tegra.c
Revision Date Author Comments
4a3398ee9d7d8008ee9bfc8a600b734a1b22af23 17-Mar-2012 Stephen Warren <swarren@nvidia.com> gpio: tegra: Iterate over the correct number of banks

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 <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
5c1e2c9dc684f26fcc78ff4ef15dc97ed0244303 17-Mar-2012 Stephen Warren <swarren@nvidia.com> gpio: tegra: fix register address calculations for Tegra30

Tegra20 and Tegra30 share the same register layout within registers, but
the addresses of the registers is a little different. Fix the driver to
cope with this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
b0092f2665be3dd04f923d09a6a0deeddb4e96ec 19-Mar-2012 Stephen Warren <swarren@wwwdotorg.org> gpio: tegra: tegra_gpio_config shouldn't be __init

This function is called from non-__init context, just like
tegra_gpio_enable()/disable(). Remove the __init annotation to avoid
section mismatch warnings during compile.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
691e06c0ff2cd0cfe79db5c52baac4fe18ca55af 02-Mar-2012 Arnd Bergmann <arnd@arndb.de> ARM: tegra: export tegra_gpio_{en,dis}able

These two functions are used in drivers that can be
modules, so they need to be exported.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
bdc93a77da75ee421125896ce4bbd91afff63809 14-Feb-2012 Stephen Warren <swarren@nvidia.com> gpio: tegra: Fix build issue due to irq_domain rework.

Commit 7da5a66 "irq_domain: Remove 'new' irq_domain in favour of the
ppc one" changed the set of available irq domain APIs. Update the Tegra
GPIO driver to account for those changes, to solve a build break.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
3391811c4294da42e412ec5f83a251caf05869a4 19-Jan-2012 Stephen Warren <swarren@nvidia.com> gpio: tegra: Parameterize the number of banks

Tegra20's GPIO controller has 7 banks, and Tegra30's controller has 8
banks. Allow the number of banks to be configured at run-time by the
device tree.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Olof Johansson <olof@lixom.net>
6f74dc9bc8de41f3de474a7269a70921e773c40f 04-Jan-2012 Stephen Warren <swarren@nvidia.com> gpio: tegra: Dynamically allocate IRQ base, and support DT

Enhance the driver to dynamically allocate the base IRQ number, and
create an IRQ domain for itself. The use of an IRQ domain ensures that
any device tree node interrupts properties are correctly parsed.

Describe interrupt-related properties in the device tree binding docs,
and the contents of "child" node interrupts property.

Update tegra*.dtsi to specify the required interrupt-related properties.

Finally, remove the definition of TEGRA_GPIO_TO_IRQ; this macro no longer
gives correct results since the IRQ numbers for GPIOs are dynamically
allocated.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Olof Johansson <olof@lixom.net>
aedd4fdf69293fc5379129294239b09da2a7c3ec 27-Dec-2011 Julia Lawall <julia@diku.dk> drivers/gpio/gpio-tegra.c: use devm_request_and_ioremap

Reimplement a call to devm_request_mem_region followed by a call to ioremap
or ioremap_nocache by a call to devm_request_and_ioremap.

The semantic patch that makes this transformation is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@nm@
expression myname;
identifier i;
@@

struct platform_driver i = { .driver = { .name = myname } };

@@
expression dev,res,size;
expression nm.myname;
@@

-if (!devm_request_mem_region(dev, res->start, size,
- \(res->name\|dev_name(dev)\|myname\))) {
- ...
- return ...;
-}
... when != res->start
(
-devm_ioremap(dev,res->start,size)
+devm_request_and_ioremap(dev,res)
|
-devm_ioremap_nocache(dev,res->start,size)
+devm_request_and_ioremap(dev,res)
)
... when any
when != res->start
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
88d8951e5896da908d31bc24735efae801566066 12-Oct-2011 Stephen Warren <swarren@nvidia.com> gpio/tegra: Convert to a platform device

v3: Make regs variable static. Remove empty init of tegra_gpio_banks.

v2: Retrieve IRQ and memory addresses from resources instead of hard-
coding them. Add back initialization of tegra_gpio_chip.of_node.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
[olof: switched probe routine to __devinit]
Signed-off-by: Olof Johansson <olof@lixom.net>
ea5abbd215b749b2ff14397a47a5e65741c67bf4 26-Sep-2011 Stephen Warren <swarren@nvidia.com> ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>

This will eventually allow <mach/gpio.h> to be deleted. This mirrors
LinusW's recent equivalent work on various other ARM platforms.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
438a99c078b1bc3c9aebd92e7928f2477311d3e5 23-Aug-2011 Stephen Warren <swarren@nvidia.com> ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irq

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
470080015c1f8bbd15ba1486d5c4bd8a3e7fa79a 23-Aug-2011 Stephen Warren <swarren@nvidia.com> ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpio

irq_to_gpio is being removed. Replace the only use of that API by
the ARM Tegra sub-architecture.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
f7f678a06326ebafe9005203c0b2fa06885fd12c 05-Jul-2011 Stephen Warren <swarren@nvidia.com> gpio/tegra: Use engineering names in DT compatible property

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>
df2212270ce94f12e9caed6ca04c7077672d588e 15-Jun-2011 Grant Likely <grant.likely@secretlab.ca> gpio/tegra: add devicetree support

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>
ea5a9607cb2a3c7e5e9fcb1b3d75b8f88eca5766 15-Jun-2011 Grant Likely <grant.likely@secretlab.ca> gpio/tegra: Move Tegra gpio driver to drivers/gpio

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>