ARM: mach-shmobile: sh7367 and G3EVM pinmux support
[linux-2.6-block.git] / arch / arm / mach-shmobile / include / mach / gpio.h
CommitLineData
7fdda678
MD
1/*
2 * Generic GPIO API and pinmux table support
3 *
4 * Copyright (c) 2008 Magnus Damm
5 *
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
12
13#include <linux/kernel.h>
14#include <linux/errno.h>
15
16#define ARCH_NR_GPIOS 1024
17#include <linux/sh_pfc.h>
18
19#ifdef CONFIG_GPIOLIB
20
21static inline int gpio_get_value(unsigned gpio)
22{
23 return __gpio_get_value(gpio);
24}
25
26static inline void gpio_set_value(unsigned gpio, int value)
27{
28 __gpio_set_value(gpio, value);
29}
30
31static inline int gpio_cansleep(unsigned gpio)
32{
33 return __gpio_cansleep(gpio);
34}
35
36static inline int gpio_to_irq(unsigned gpio)
37{
38 return -ENOSYS;
39}
40
41static inline int irq_to_gpio(unsigned int irq)
42{
43 return -EINVAL;
44}
45
46#endif /* CONFIG_GPIOLIB */
47
48#endif /* __ASM_ARCH_GPIO_H */