1 /* SPDX-License-Identifier: GPL-2.0
3 * include/asm-sh/gpio.h
5 * Generic GPIO API and pinmux table support for SuperH.
7 * Copyright (c) 2008 Magnus Damm
9 #ifndef __ASM_SH_GPIO_H
10 #define __ASM_SH_GPIO_H
12 #include <linux/kernel.h>
13 #include <linux/errno.h>
15 #if defined(CONFIG_CPU_SH3)
19 #include <asm-generic/gpio.h>
23 static inline int gpio_get_value(unsigned gpio)
25 return __gpio_get_value(gpio);
28 static inline void gpio_set_value(unsigned gpio, int value)
30 __gpio_set_value(gpio, value);
33 static inline int gpio_cansleep(unsigned gpio)
35 return __gpio_cansleep(gpio);
38 static inline int gpio_to_irq(unsigned gpio)
40 return __gpio_to_irq(gpio);
43 static inline int irq_to_gpio(unsigned int irq)
48 #endif /* CONFIG_GPIOLIB */
50 #endif /* __ASM_SH_GPIO_H */