aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2007-02-20 16:58:20 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-20 20:10:16 -0500
commitadff264fe66d78a166dc887f861e7273d0cb1654 (patch)
tree5cd2d29ec1584d8c77bdaa01de9e769ab9de264c /include/asm-arm
parentd23c6c21af5624c774adb6fa7155000bfd75ba40 (diff)
[PATCH] GPIO API: S3C2410 wrapper cleanup
this one adds an #include <asm/arch/regs-gpio.h>. Tested by Roman Moravcik on s3c2440. Based on the discussion last december (http://lkml.org/lkml/2006/12/20/243), this patch - fixes comment and includes in gpio.h - adds the gpio_to_irq definition for S3C2400 - includes asm/arch/regs-gpio.h for pin direction definitions Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-s3c2410/gpio.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h
index 67b8b9ab22e9..d47ae453f8ca 100644
--- a/include/asm-arm/arch-s3c2410/gpio.h
+++ b/include/asm-arm/arch-s3c2410/gpio.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-pxa/gpio.h 2 * linux/include/asm-arm/arch-s3c2410/gpio.h
3 * 3 *
4 * S3C2400 GPIO wrappers for arch-neutral GPIO calls 4 * S3C2410 GPIO wrappers for arch-neutral GPIO calls
5 * 5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com> 6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 * 7 *
@@ -21,14 +21,12 @@
21 * 21 *
22 */ 22 */
23 23
24#ifndef __ASM_ARCH_PXA_GPIO_H 24#ifndef __ASM_ARCH_S3C2410_GPIO_H
25#define __ASM_ARCH_PXA_GPIO_H 25#define __ASM_ARCH_S3C2410_GPIO_H
26 26
27#include <asm/arch/pxa-regs.h> 27#include <asm/irq.h>
28#include <asm/arch/irqs.h> 28#include <asm/hardware.h>
29#include <asm/arch/hardware.h> 29#include <asm/arch/regs-gpio.h>
30
31#include <asm/errno.h>
32 30
33static inline int gpio_request(unsigned gpio, const char *label) 31static inline int gpio_request(unsigned gpio, const char *label)
34{ 32{
@@ -57,8 +55,11 @@ static inline int gpio_direction_output(unsigned gpio)
57 55
58#include <asm-generic/gpio.h> /* cansleep wrappers */ 56#include <asm-generic/gpio.h> /* cansleep wrappers */
59 57
60/* FIXME or maybe s3c2400_gpio_getirq() ... */ 58#ifdef CONFIG_CPU_S3C2400
59#define gpio_to_irq(gpio) s3c2400_gpio_getirq(gpio)
60#else
61#define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) 61#define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio)
62#endif
62 63
63/* FIXME implement irq_to_gpio() */ 64/* FIXME implement irq_to_gpio() */
64 65