Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
[cris-mirror.git] / arch / arm / mach-shmobile / include / mach / gpio.h
blob2b1bb9e43ddadc8b83505b021c5ca7ae4f4704c5
1 /*
2 * Generic GPIO API and pinmux table support
4 * Copyright (c) 2008 Magnus Damm
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10 #ifndef __ASM_ARCH_GPIO_H
11 #define __ASM_ARCH_GPIO_H
13 #include <linux/kernel.h>
14 #include <linux/errno.h>
16 #define ARCH_NR_GPIOS 1024
17 #include <linux/sh_pfc.h>
19 #ifdef CONFIG_GPIOLIB
21 static inline int gpio_get_value(unsigned gpio)
23 return __gpio_get_value(gpio);
26 static inline void gpio_set_value(unsigned gpio, int value)
28 __gpio_set_value(gpio, value);
31 static inline int gpio_cansleep(unsigned gpio)
33 return __gpio_cansleep(gpio);
36 static inline int gpio_to_irq(unsigned gpio)
38 return __gpio_to_irq(gpio);
41 static inline int irq_to_gpio(unsigned int irq)
43 return -ENOSYS;
46 #endif /* CONFIG_GPIOLIB */
48 #endif /* __ASM_ARCH_GPIO_H */