diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2013-11-26 05:11:21 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-02-12 05:36:04 -0500 |
commit | 75916d5549e4c134f69068de175c90c170c17a7a (patch) | |
tree | e3e34c912c30c5596a34d96153b9943fc960d3b2 | |
parent | eb02313d2c96e1793cf37693d432fd2c129ae170 (diff) |
ARM: 7903/1: sa1100: h3xxx: drop hand-coded gpio_request_array analogue
h3xxx_init_gpio() behaves alsmost like gpio_request_array. Also after
all GPIO refactoring it is unused. Drop it now.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-sa1100/h3xxx.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/h3xxx.h | 11 |
2 files changed, 0 insertions, 42 deletions
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c index 82e87024b1a6..c79bf467fb7f 100644 --- a/arch/arm/mach-sa1100/h3xxx.c +++ b/arch/arm/mach-sa1100/h3xxx.c | |||
@@ -28,37 +28,6 @@ | |||
28 | 28 | ||
29 | #include "generic.h" | 29 | #include "generic.h" |
30 | 30 | ||
31 | void h3xxx_init_gpio(struct gpio_default_state *s, size_t n) | ||
32 | { | ||
33 | while (n--) { | ||
34 | const char *name = s->name; | ||
35 | int err; | ||
36 | |||
37 | if (!name) | ||
38 | name = "[init]"; | ||
39 | err = gpio_request(s->gpio, name); | ||
40 | if (err) { | ||
41 | printk(KERN_ERR "gpio%u: unable to request: %d\n", | ||
42 | s->gpio, err); | ||
43 | continue; | ||
44 | } | ||
45 | if (s->mode >= 0) { | ||
46 | err = gpio_direction_output(s->gpio, s->mode); | ||
47 | } else { | ||
48 | err = gpio_direction_input(s->gpio); | ||
49 | } | ||
50 | if (err) { | ||
51 | printk(KERN_ERR "gpio%u: unable to set direction: %d\n", | ||
52 | s->gpio, err); | ||
53 | continue; | ||
54 | } | ||
55 | if (!s->name) | ||
56 | gpio_free(s->gpio); | ||
57 | s++; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | |||
62 | /* | 31 | /* |
63 | * H3xxx flash support | 32 | * H3xxx flash support |
64 | */ | 33 | */ |
diff --git a/arch/arm/mach-sa1100/include/mach/h3xxx.h b/arch/arm/mach-sa1100/include/mach/h3xxx.h index c810620db53d..603d4343f7f6 100644 --- a/arch/arm/mach-sa1100/include/mach/h3xxx.h +++ b/arch/arm/mach-sa1100/include/mach/h3xxx.h | |||
@@ -79,17 +79,6 @@ | |||
79 | #define H3600_EGPIO_LCD_5V_ON (H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */ | 79 | #define H3600_EGPIO_LCD_5V_ON (H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */ |
80 | #define H3600_EGPIO_LVDD_ON (H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */ | 80 | #define H3600_EGPIO_LVDD_ON (H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */ |
81 | 81 | ||
82 | struct gpio_default_state { | ||
83 | int gpio; | ||
84 | int mode; | ||
85 | const char *name; | ||
86 | }; | ||
87 | |||
88 | #define GPIO_MODE_IN -1 | ||
89 | #define GPIO_MODE_OUT0 0 | ||
90 | #define GPIO_MODE_OUT1 1 | ||
91 | |||
92 | void h3xxx_init_gpio(struct gpio_default_state *s, size_t n); | ||
93 | void __init h3xxx_map_io(void); | 82 | void __init h3xxx_map_io(void); |
94 | void __init h3xxx_mach_init(void); | 83 | void __init h3xxx_mach_init(void); |
95 | 84 | ||