aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-loongson
diff options
context:
space:
mode:
authorArnaud Patard <apatard@mandriva.com>2010-04-29 05:58:54 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-05-21 16:31:16 -0400
commitc197da9163a42e6faeb051f331868b9245836eef (patch)
treef0f29266fd2610bb061b9650e851a26cf6548086 /arch/mips/include/asm/mach-loongson
parent96d660c482e03b2d7b6c0245b95a7cce537606c8 (diff)
MIPS: Loongson 2F: Add gpio/gpioilb support
Signed-off-by: Arnaud Patard <apatard@mandriva.com> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/1163/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/mach-loongson')
-rw-r--r--arch/mips/include/asm/mach-loongson/gpio.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-loongson/gpio.h b/arch/mips/include/asm/mach-loongson/gpio.h
new file mode 100644
index 00000000000..e30e73d443d
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/gpio.h
@@ -0,0 +1,35 @@
1/*
2 * STLS2F GPIO Support
3 *
4 * Copyright (c) 2008 Richard Liu, STMicroelectronics <richard.liu@st.com>
5 * Copyright (c) 2008-2010 Arnaud Patard <apatard@mandriva.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef __STLS2F_GPIO_H
14#define __STLS2F_GPIO_H
15
16#include <asm-generic/gpio.h>
17
18extern void gpio_set_value(unsigned gpio, int value);
19extern int gpio_get_value(unsigned gpio);
20extern int gpio_cansleep(unsigned gpio);
21
22/* The chip can do interrupt
23 * but it has not been tested and doc not clear
24 */
25static inline int gpio_to_irq(int gpio)
26{
27 return -EINVAL;
28}
29
30static inline int irq_to_gpio(int gpio)
31{
32 return -EINVAL;
33}
34
35#endif /* __STLS2F_GPIO_H */