From bb8985586b7a906e116db835c64773b7a7d51663 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 17 Aug 2008 21:05:42 -0400 Subject: x86, um: ... and asm-x86 move Signed-off-by: Al Viro Signed-off-by: H. Peter Anvin --- arch/x86/include/asm/gpio.h | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 arch/x86/include/asm/gpio.h (limited to 'arch/x86/include/asm/gpio.h') diff --git a/arch/x86/include/asm/gpio.h b/arch/x86/include/asm/gpio.h new file mode 100644 index 00000000000..497fb980d96 --- /dev/null +++ b/arch/x86/include/asm/gpio.h @@ -0,0 +1,56 @@ +/* + * Generic GPIO API implementation for x86. + * + * Derived from the generic GPIO API for powerpc: + * + * Copyright (c) 2007-2008 MontaVista Software, Inc. + * + * Author: Anton Vorontsov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef _ASM_I386_GPIO_H +#define _ASM_I386_GPIO_H + +#include + +#ifdef CONFIG_GPIOLIB + +/* + * Just call gpiolib. + */ +static inline int gpio_get_value(unsigned int gpio) +{ + return __gpio_get_value(gpio); +} + +static inline void gpio_set_value(unsigned int gpio, int value) +{ + __gpio_set_value(gpio, value); +} + +static inline int gpio_cansleep(unsigned int gpio) +{ + return __gpio_cansleep(gpio); +} + +/* + * Not implemented, yet. + */ +static inline int gpio_to_irq(unsigned int gpio) +{ + return -ENOSYS; +} + +static inline int irq_to_gpio(unsigned int irq) +{ + return -EINVAL; +} + +#endif /* CONFIG_GPIOLIB */ + +#endif /* ASM_X86__GPIO_H */ -- cgit v1.2.3 From 1965aae3c98397aad957412413c07e97b1bd4e64 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 22 Oct 2008 22:26:29 -0700 Subject: x86: Fix ASM_X86__ header guards Change header guards named "ASM_X86__*" to "_ASM_X86_*" since: a. the double underscore is ugly and pointless. b. no leading underscore violates namespace constraints. Signed-off-by: H. Peter Anvin --- arch/x86/include/asm/gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/x86/include/asm/gpio.h') diff --git a/arch/x86/include/asm/gpio.h b/arch/x86/include/asm/gpio.h index 497fb980d96..1c07aad9624 100644 --- a/arch/x86/include/asm/gpio.h +++ b/arch/x86/include/asm/gpio.h @@ -53,4 +53,4 @@ static inline int irq_to_gpio(unsigned int irq) #endif /* CONFIG_GPIOLIB */ -#endif /* ASM_X86__GPIO_H */ +#endif /* _ASM_X86_GPIO_H */ -- cgit v1.2.3 From 5e1b00758b5a8bee9d42515bffdaf305a32f1b04 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 23 Oct 2008 00:20:33 -0700 Subject: x86: canonicalize remaining header guards Canonicalize a few remaining header guards, with the exception for those which are still in subarchitecture directories. Signed-off-by: H. Peter Anvin --- arch/x86/include/asm/gpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/x86/include/asm/gpio.h') diff --git a/arch/x86/include/asm/gpio.h b/arch/x86/include/asm/gpio.h index 1c07aad9624..49dbfdfa50f 100644 --- a/arch/x86/include/asm/gpio.h +++ b/arch/x86/include/asm/gpio.h @@ -13,8 +13,8 @@ * (at your option) any later version. */ -#ifndef _ASM_I386_GPIO_H -#define _ASM_I386_GPIO_H +#ifndef _ASM_X86_GPIO_H +#define _ASM_X86_GPIO_H #include -- cgit v1.2.3