• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/sh/include/asm/
1/*
2 *  include/asm-sh/gpio.h
3 *
4 * Generic GPIO API and pinmux table support for SuperH.
5 *
6 * Copyright (c) 2008 Magnus Damm
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License.  See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#ifndef __ASM_SH_GPIO_H
13#define __ASM_SH_GPIO_H
14
15#include <linux/kernel.h>
16#include <linux/errno.h>
17
18#if defined(CONFIG_CPU_SH3)
19#include <cpu/gpio.h>
20#endif
21
22#define ARCH_NR_GPIOS 512
23#include <linux/sh_pfc.h>
24
25#ifdef CONFIG_GPIOLIB
26
27static inline int gpio_get_value(unsigned gpio)
28{
29	return __gpio_get_value(gpio);
30}
31
32static inline void gpio_set_value(unsigned gpio, int value)
33{
34	__gpio_set_value(gpio, value);
35}
36
37static inline int gpio_cansleep(unsigned gpio)
38{
39	return __gpio_cansleep(gpio);
40}
41
42static inline int gpio_to_irq(unsigned gpio)
43{
44	WARN_ON(1);
45	return -ENOSYS;
46}
47
48static inline int irq_to_gpio(unsigned int irq)
49{
50	WARN_ON(1);
51	return -EINVAL;
52}
53
54#endif /* CONFIG_GPIOLIB */
55
56#endif /* __ASM_SH_GPIO_H */
57