Skip to contentSkip to conversation

ARM: sa1100: remove complex GPIO interface

PATCH New Linus Walleij 2 participants 3 messages Sep 24, 2013

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

PATCH 1/1 ARM: sa1100: remove complex GPIO interface

The SA1100 was implementing its own variants of gpio_get_value() and gpio_set_value() and only selectively falling back to gpiolib for extended (EGPIO) handling. However the driver in gpio/gpio-sa1100.c already handles the same functionality for these lines, yet remain unused.

The only upside would be things like a timing-critical hotpath on bit-banged GPIO, but that kind of things does not seem to happen on these GPIOs, so it is not worth having the extra complexity.

Tested with some buttons on the Compaq iPAQ H3630.

Cc Russell King <[email protected]>
Cc Kristoffer Ericson <[email protected]>
---
 arch/arm/Kconfig                          |  1 -
 arch/arm/mach-sa1100/include/mach/gpio.h  | 55 -------------------------------
 arch/arm/mach-sa1100/include/mach/h3xxx.h |  2 ++
 drivers/gpio/gpio-sa1100.c                |  2 +-
 4 files changed, 3 insertions(+), 57 deletions(-)
 delete mode 100644 arch/arm/mach-sa1100/include/mach/gpio.h
arch/arm/Kconfig +0 -1
index 3f7714d..74bf29f 100644
@@ -692,7 +692,6 @@ config ARCH_SA1100
 	select GENERIC_CLOCKEVENTS
 	select HAVE_IDE
 	select ISA
-	select NEED_MACH_GPIO_H
 	select NEED_MACH_MEMORY_H
 	select SPARSE_IRQ
 	help
arch/arm/mach-sa1100/include/mach/gpio.h deleted +0 -55

55 lines not on this page · raw message

arch/arm/mach-sa1100/include/mach/h3xxx.h +2 -0
index 7d9df16..c810620 100644
@@ -13,6 +13,8 @@
 #ifndef _INCLUDE_H3XXX_H_
 #define _INCLUDE_H3XXX_H_
 
+#include "hardware.h" /* Gives GPIO_MAX */
+
 /* Physical memory regions corresponding to chip selects */
 #define H3600_EGPIO_PHYS	(SA1100_CS5_PHYS + 0x01000000)
 #define H3600_BANK_2_PHYS	SA1100_CS2_PHYS
drivers/gpio/gpio-sa1100.c +1 -1
index 8ea3b33..5c94a53 100644
@@ -10,7 +10,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/module.h>
-
+#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 ARM: sa1100: remove complex GPIO interface

drivers/gpio/gpio-sa1100.c line 13

Quoted 10 lines · Linus Walleij
drivers/gpio/gpio-sa1100.c +1 -1
index 8ea3b33..5c94a53 100644
@@ -10,7 +10,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/module.h>
-
+#include <asm/io.h>

How many more times does it need to be said... I've been saying the same thing for near on five years now and still this happens...

#2 lore raw

PATCH 1/1 ARM: sa1100: remove complex GPIO interface

Quoted 14 lines · Russell King - ARM Linux

drivers/gpio/gpio-sa1100.c line 13

Quoted 10 lines · Linus Walleij
drivers/gpio/gpio-sa1100.c +1 -1
index 8ea3b33..5c94a53 100644
@@ -10,7 +10,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/module.h>
-
+#include <asm/io.h>

How many more times does it need to be said... I've been saying the same thing for near on five years now and still this happens...

Argh I see it, sorry... will repost.

Yours,
Linus Walleij