diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/plat-nomadik/gpio.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index 5a6ef252c38b..13cdbbdc08ca 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c | |||
@@ -266,16 +266,6 @@ static int nmk_gpio_make_input(struct gpio_chip *chip, unsigned offset) | |||
266 | return 0; | 266 | return 0; |
267 | } | 267 | } |
268 | 268 | ||
269 | static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset, | ||
270 | int val) | ||
271 | { | ||
272 | struct nmk_gpio_chip *nmk_chip = | ||
273 | container_of(chip, struct nmk_gpio_chip, chip); | ||
274 | |||
275 | writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS); | ||
276 | return 0; | ||
277 | } | ||
278 | |||
279 | static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset) | 269 | static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset) |
280 | { | 270 | { |
281 | struct nmk_gpio_chip *nmk_chip = | 271 | struct nmk_gpio_chip *nmk_chip = |
@@ -298,6 +288,18 @@ static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned offset, | |||
298 | writel(bit, nmk_chip->addr + NMK_GPIO_DATC); | 288 | writel(bit, nmk_chip->addr + NMK_GPIO_DATC); |
299 | } | 289 | } |
300 | 290 | ||
291 | static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset, | ||
292 | int val) | ||
293 | { | ||
294 | struct nmk_gpio_chip *nmk_chip = | ||
295 | container_of(chip, struct nmk_gpio_chip, chip); | ||
296 | |||
297 | writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS); | ||
298 | nmk_gpio_set_output(chip, offset, val); | ||
299 | |||
300 | return 0; | ||
301 | } | ||
302 | |||
301 | /* This structure is replicated for each GPIO block allocated at probe time */ | 303 | /* This structure is replicated for each GPIO block allocated at probe time */ |
302 | static struct gpio_chip nmk_gpio_template = { | 304 | static struct gpio_chip nmk_gpio_template = { |
303 | .direction_input = nmk_gpio_make_input, | 305 | .direction_input = nmk_gpio_make_input, |