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
10 #ifndef __ASM_ARCH_GPIO_H
11 #define __ASM_ARCH_GPIO_H
13 #include <linux/kernel.h>
14 #include <linux/errno.h>
15 #include <linux/sh_pfc.h>
20 static inline int irq_to_gpio(unsigned int irq)
27 #define __ARM_GPIOLIB_COMPLEX
29 #endif /* CONFIG_GPIOLIB */
34 * current gpio frame work doesn't have
35 * the method to control only pull up/down/free.
36 * this function should be replaced by correct gpio function
38 static inline void __init gpio_direction_none(u32 addr)
40 __raw_writeb(0x00, addr);
43 static inline void __init gpio_request_pullup(u32 addr)
45 u8 data = __raw_readb(addr);
49 __raw_writeb(data, addr);
52 static inline void __init gpio_request_pulldown(u32 addr)
54 u8 data = __raw_readb(addr);
59 __raw_writeb(data, addr);
62 #endif /* __ASM_ARCH_GPIO_H */