diff options
Diffstat (limited to 'include/linux/scx200_gpio.h')
| -rw-r--r-- | include/linux/scx200_gpio.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 30cdd648ba79..1a82d30c4b17 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | #include <linux/spinlock.h> | 1 | #include <linux/spinlock.h> |
| 2 | 2 | ||
| 3 | u32 scx200_gpio_configure(int index, u32 set, u32 clear); | 3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
| 4 | 4 | ||
| 5 | extern unsigned scx200_gpio_base; | 5 | extern unsigned scx200_gpio_base; |
| 6 | extern long scx200_gpio_shadow[2]; | 6 | extern long scx200_gpio_shadow[2]; |
| 7 | extern struct nsc_gpio_ops scx200_gpio_ops; | ||
| 7 | 8 | ||
| 8 | #define scx200_gpio_present() (scx200_gpio_base!=0) | 9 | #define scx200_gpio_present() (scx200_gpio_base!=0) |
| 9 | 10 | ||
| @@ -17,7 +18,7 @@ extern long scx200_gpio_shadow[2]; | |||
| 17 | 18 | ||
| 18 | /* returns the value of the GPIO pin */ | 19 | /* returns the value of the GPIO pin */ |
| 19 | 20 | ||
| 20 | static inline int scx200_gpio_get(int index) { | 21 | static inline int scx200_gpio_get(unsigned index) { |
| 21 | __SCx200_GPIO_BANK; | 22 | __SCx200_GPIO_BANK; |
| 22 | __SCx200_GPIO_IOADDR + 0x04; | 23 | __SCx200_GPIO_IOADDR + 0x04; |
| 23 | __SCx200_GPIO_INDEX; | 24 | __SCx200_GPIO_INDEX; |
| @@ -29,7 +30,7 @@ static inline int scx200_gpio_get(int index) { | |||
| 29 | driven if the GPIO is configured as an output, it might not be the | 30 | driven if the GPIO is configured as an output, it might not be the |
| 30 | state of the GPIO right now if the GPIO is configured as an input) */ | 31 | state of the GPIO right now if the GPIO is configured as an input) */ |
| 31 | 32 | ||
| 32 | static inline int scx200_gpio_current(int index) { | 33 | static inline int scx200_gpio_current(unsigned index) { |
| 33 | __SCx200_GPIO_BANK; | 34 | __SCx200_GPIO_BANK; |
| 34 | __SCx200_GPIO_INDEX; | 35 | __SCx200_GPIO_INDEX; |
| 35 | 36 | ||
| @@ -38,7 +39,7 @@ static inline int scx200_gpio_current(int index) { | |||
| 38 | 39 | ||
| 39 | /* drive the GPIO signal high */ | 40 | /* drive the GPIO signal high */ |
| 40 | 41 | ||
| 41 | static inline void scx200_gpio_set_high(int index) { | 42 | static inline void scx200_gpio_set_high(unsigned index) { |
| 42 | __SCx200_GPIO_BANK; | 43 | __SCx200_GPIO_BANK; |
| 43 | __SCx200_GPIO_IOADDR; | 44 | __SCx200_GPIO_IOADDR; |
| 44 | __SCx200_GPIO_SHADOW; | 45 | __SCx200_GPIO_SHADOW; |
| @@ -49,7 +50,7 @@ static inline void scx200_gpio_set_high(int index) { | |||
| 49 | 50 | ||
| 50 | /* drive the GPIO signal low */ | 51 | /* drive the GPIO signal low */ |
| 51 | 52 | ||
| 52 | static inline void scx200_gpio_set_low(int index) { | 53 | static inline void scx200_gpio_set_low(unsigned index) { |
| 53 | __SCx200_GPIO_BANK; | 54 | __SCx200_GPIO_BANK; |
| 54 | __SCx200_GPIO_IOADDR; | 55 | __SCx200_GPIO_IOADDR; |
| 55 | __SCx200_GPIO_SHADOW; | 56 | __SCx200_GPIO_SHADOW; |
| @@ -60,7 +61,7 @@ static inline void scx200_gpio_set_low(int index) { | |||
| 60 | 61 | ||
| 61 | /* drive the GPIO signal to state */ | 62 | /* drive the GPIO signal to state */ |
| 62 | 63 | ||
| 63 | static inline void scx200_gpio_set(int index, int state) { | 64 | static inline void scx200_gpio_set(unsigned index, int state) { |
| 64 | __SCx200_GPIO_BANK; | 65 | __SCx200_GPIO_BANK; |
| 65 | __SCx200_GPIO_IOADDR; | 66 | __SCx200_GPIO_IOADDR; |
| 66 | __SCx200_GPIO_SHADOW; | 67 | __SCx200_GPIO_SHADOW; |
| @@ -73,7 +74,7 @@ static inline void scx200_gpio_set(int index, int state) { | |||
| 73 | } | 74 | } |
| 74 | 75 | ||
| 75 | /* toggle the GPIO signal */ | 76 | /* toggle the GPIO signal */ |
| 76 | static inline void scx200_gpio_change(int index) { | 77 | static inline void scx200_gpio_change(unsigned index) { |
| 77 | __SCx200_GPIO_BANK; | 78 | __SCx200_GPIO_BANK; |
| 78 | __SCx200_GPIO_IOADDR; | 79 | __SCx200_GPIO_IOADDR; |
| 79 | __SCx200_GPIO_SHADOW; | 80 | __SCx200_GPIO_SHADOW; |
| @@ -87,10 +88,3 @@ static inline void scx200_gpio_change(int index) { | |||
| 87 | #undef __SCx200_GPIO_SHADOW | 88 | #undef __SCx200_GPIO_SHADOW |
| 88 | #undef __SCx200_GPIO_INDEX | 89 | #undef __SCx200_GPIO_INDEX |
| 89 | #undef __SCx200_GPIO_OUT | 90 | #undef __SCx200_GPIO_OUT |
| 90 | |||
| 91 | /* | ||
| 92 | Local variables: | ||
| 93 | compile-command: "make -C ../.. bzImage modules" | ||
| 94 | c-basic-offset: 8 | ||
| 95 | End: | ||
| 96 | */ | ||
