Skip to contentSkip to conversation

gpio: tegra: Parameterize the number of banks

PATCH New Stephen Warren 1 participant 1 message Jan 19, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
This patch depends on:
http://ftp.arm.linux.org.uk/pub/armlinux/kernel/git-cur/linux-2.6-arm.git
devel-stable 44986ab056076e9dc9fb9f8b4729afef7fa72616

This is a replacement for:
http://patchwork.ozlabs.org/patch/134321/

v2: Determine # banks by the number of interrupt properties rather than adding a custom property for this.

---
 .../devicetree/bindings/gpio/gpio_nvidia.txt       |    8 ++-
 drivers/gpio/gpio-tegra.c                          |   42 +++++++++++++++----
 2 files changed, 38 insertions(+), 12 deletions(-)
Documentation/devicetree/bindings/gpio/gpio_nvidia.txt +5 -3
index d114e19..023c952 100644
@@ -1,9 +1,11 @@
-NVIDIA Tegra 2 GPIO controller
+NVIDIA Tegra GPIO controller
 
 Required properties:
-- compatible : "nvidia,tegra20-gpio"
+- compatible : "nvidia,tegra<chip>-gpio"
 - reg : Physical base address and length of the controller's registers.
-- interrupts : The interrupt outputs from the controller.
+- interrupts : The interrupt outputs from the controller. For Tegra20,
+  there should be 7 interrupts specified, and for Tegra30, there should
+  be 8 interrupts specified.
 - #gpio-cells : Should be two. The first cell is the pin number and the
   second cell is used to specify optional parameters:
   - bit 0 specifies polarity (0 for normal, 1 for inverted)
drivers/gpio/gpio-tegra.c +33 -9

91 lines not on this page · raw message

Signature · 1 line
1.7.0.4