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 #define ARCH_NR_GPIOS 512
20 #include <asm-generic/gpio.h>
24 static inline int gpio_get_value(unsigned gpio
)
26 return __gpio_get_value(gpio
);
29 static inline void gpio_set_value(unsigned gpio
, int value
)
31 __gpio_set_value(gpio
, value
);
34 static inline int gpio_cansleep(unsigned gpio
)
36 return __gpio_cansleep(gpio
);
39 static inline int gpio_to_irq(unsigned gpio
)
41 return __gpio_to_irq(gpio
);
44 static inline int irq_to_gpio(unsigned int irq
)
49 #endif /* CONFIG_GPIOLIB */
51 #endif /* __ASM_SH_GPIO_H */