Linux Audio

Check our new training course

Loading...
 1/* SPDX-License-Identifier: GPL-2.0
 2 *
 3 *  include/asm-sh/gpio.h
 4 *
 5 * Generic GPIO API and pinmux table support for SuperH.
 6 *
 7 * Copyright (c) 2008 Magnus Damm
 8 */
 9#ifndef __ASM_SH_GPIO_H
10#define __ASM_SH_GPIO_H
11
12#include <linux/kernel.h>
13#include <linux/errno.h>
14
15#if defined(CONFIG_CPU_SH3)
16#include <cpu/gpio.h>
17#endif
18
19#include <asm-generic/gpio.h>
20
21#ifdef CONFIG_GPIOLIB
22
23static inline int gpio_get_value(unsigned gpio)
24{
25	return __gpio_get_value(gpio);
26}
27
28static inline void gpio_set_value(unsigned gpio, int value)
29{
30	__gpio_set_value(gpio, value);
31}
32
33static inline int gpio_cansleep(unsigned gpio)
34{
35	return __gpio_cansleep(gpio);
36}
37
38static inline int gpio_to_irq(unsigned gpio)
39{
40	return __gpio_to_irq(gpio);
41}
42
43static inline int irq_to_gpio(unsigned int irq)
44{
45	return -ENOSYS;
46}
47
48#endif /* CONFIG_GPIOLIB */
49
50#endif /* __ASM_SH_GPIO_H */