diff options
author | Yoichi Yuasa <yyuasa@linux.com> | 2009-06-28 22:11:05 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-07-03 10:45:25 -0400 |
commit | 27fdd325dace4a1ebfa10e93ba6f3d25f25df674 (patch) | |
tree | 8bf75bbbe8110c71e2b61b2669e69fa4da802e98 /arch | |
parent | 69f16c9a8630edc64cb1d6f1bfca4ee7bc16279f (diff) |
MIPS: Update VR41xx GPIO driver to use gpiolib
Signed-off-by: Yoichi Yuasa <yyuasa@linux.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | arch/mips/include/asm/vr41xx/giu.h | 22 |
2 files changed, 4 insertions, 19 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b0e55113633..64891f74019 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -267,6 +267,7 @@ config MACH_VR41XX | |||
267 | select CEVT_R4K | 267 | select CEVT_R4K |
268 | select CSRC_R4K | 268 | select CSRC_R4K |
269 | select SYS_HAS_CPU_VR41XX | 269 | select SYS_HAS_CPU_VR41XX |
270 | select ARCH_REQUIRE_GPIOLIB | ||
270 | 271 | ||
271 | config NXP_STB220 | 272 | config NXP_STB220 |
272 | bool "NXP STB220 board" | 273 | bool "NXP STB220 board" |
diff --git a/arch/mips/include/asm/vr41xx/giu.h b/arch/mips/include/asm/vr41xx/giu.h index 0bcdd3a5c25..b369c091b0e 100644 --- a/arch/mips/include/asm/vr41xx/giu.h +++ b/arch/mips/include/asm/vr41xx/giu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Include file for NEC VR4100 series General-purpose I/O Unit. | 2 | * Include file for NEC VR4100 series General-purpose I/O Unit. |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2005-2009 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -41,7 +41,8 @@ typedef enum { | |||
41 | IRQ_SIGNAL_HOLD, | 41 | IRQ_SIGNAL_HOLD, |
42 | } irq_signal_t; | 42 | } irq_signal_t; |
43 | 43 | ||
44 | extern void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_t signal); | 44 | extern void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, |
45 | irq_signal_t signal); | ||
45 | 46 | ||
46 | typedef enum { | 47 | typedef enum { |
47 | IRQ_LEVEL_LOW, | 48 | IRQ_LEVEL_LOW, |
@@ -51,23 +52,6 @@ typedef enum { | |||
51 | extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level); | 52 | extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level); |
52 | 53 | ||
53 | typedef enum { | 54 | typedef enum { |
54 | GPIO_DATA_LOW, | ||
55 | GPIO_DATA_HIGH, | ||
56 | GPIO_DATA_INVAL, | ||
57 | } gpio_data_t; | ||
58 | |||
59 | extern gpio_data_t vr41xx_gpio_get_pin(unsigned int pin); | ||
60 | extern int vr41xx_gpio_set_pin(unsigned int pin, gpio_data_t data); | ||
61 | |||
62 | typedef enum { | ||
63 | GPIO_INPUT, | ||
64 | GPIO_OUTPUT, | ||
65 | GPIO_OUTPUT_DISABLE, | ||
66 | } gpio_direction_t; | ||
67 | |||
68 | extern int vr41xx_gpio_set_direction(unsigned int pin, gpio_direction_t dir); | ||
69 | |||
70 | typedef enum { | ||
71 | GPIO_PULL_DOWN, | 55 | GPIO_PULL_DOWN, |
72 | GPIO_PULL_UP, | 56 | GPIO_PULL_UP, |
73 | GPIO_PULL_DISABLE, | 57 | GPIO_PULL_DISABLE, |