Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f3c4537 authored by Russell King's avatar Russell King
Browse files

ARM: gpio: make trivial GPIOLIB implementation the default



Rather than marking the mach/gpio.h header files which want to use the
trivial GPIOLIB implementation, mark those which do not want to use it
instead.  This means that by default, you get the trivial implementation
and only have to do something extra if you need to.  This should
encourage the use of the trivial default implementation.

As an additional bonus, several gpio.h header files become empty.

Acked-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: default avatarJamie Iles <jamie@jamieiles.com>
Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 01e7dc89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
/* not all ARM platforms necessarily support this API ... */
#include <mach/gpio.h>

#ifdef __ARM_GPIOLIB_TRIVIAL
#ifndef __ARM_GPIOLIB_COMPLEX
/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
#include <asm-generic/gpio.h>

+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include <mach/hardware.h>
#include <asm-generic/gpio.h>

#define __ARM_GPIOLIB_COMPLEX

#define IOP3XX_N_GPIOS	8

static inline int gpio_get_value(unsigned gpio)
+0 −2
Original line number Diff line number Diff line
@@ -215,8 +215,6 @@ extern void at91_gpio_resume(void);

#include <asm/errno.h>

#define __ARM_GPIOLIB_TRIVIAL

#define gpio_to_irq(gpio) (gpio)
#define irq_to_gpio(irq)  (irq)

+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
#include <mach/irqs.h>
#include <mach/common.h>

#define __ARM_GPIOLIB_COMPLEX

#define DAVINCI_GPIO_BASE 0x01C67000

enum davinci_gpio_type {
+0 −3
Original line number Diff line number Diff line
@@ -99,9 +99,6 @@
/* maximum value for irq capable line identifiers */
#define EP93XX_GPIO_LINE_MAX_IRQ	EP93XX_GPIO_LINE_F(7)

/* new generic GPIO API - see Documentation/gpio.txt */
#define __ARM_GPIOLIB_TRIVIAL

/*
 * Map GPIO A0..A7  (0..7)  to irq 64..71,
 *          B0..B7  (7..15) to irq 72..79, and
Loading