Merge branch 'akpm'
[linux-2.6/next.git] / arch / sh / include / asm / gpio.h
blob04f53d31489f2cc142f804bd444593305db27c01
1 /*
2 * include/asm-sh/gpio.h
4 * Generic GPIO API and pinmux table support for SuperH.
6 * Copyright (c) 2008 Magnus Damm
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
12 #ifndef __ASM_SH_GPIO_H
13 #define __ASM_SH_GPIO_H
15 #include <linux/kernel.h>
16 #include <linux/errno.h>
18 #if defined(CONFIG_CPU_SH3)
19 #include <cpu/gpio.h>
20 #endif
22 #define ARCH_NR_GPIOS 512
23 #include <linux/sh_pfc.h>
25 #ifdef CONFIG_GPIOLIB
27 static inline int gpio_get_value(unsigned gpio)
29 return __gpio_get_value(gpio);
32 static inline void gpio_set_value(unsigned gpio, int value)
34 __gpio_set_value(gpio, value);
37 static inline int gpio_cansleep(unsigned gpio)
39 return __gpio_cansleep(gpio);
42 static inline int gpio_to_irq(unsigned gpio)
44 return __gpio_to_irq(gpio);
47 static inline int irq_to_gpio(unsigned int irq)
49 return -ENOSYS;
52 #endif /* CONFIG_GPIOLIB */
54 #endif /* __ASM_SH_GPIO_H */