mirror of
https://github.com/hardkernel/linux.git
synced 2026-05-31 08:16:39 +09:00
[ARM] 4988/1: Add GPIO lib support to the EP93xx
Adds support for the generic GPIO lib to the EP93xx family. The gpio handling code has been moved from core.c to a new file called gpio.c. The GPIO based IRQ code has not been changed. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
05dda977f2
commit
b685004f8d
@@ -101,30 +101,17 @@
|
||||
|
||||
/* new generic GPIO API - see Documentation/gpio.txt */
|
||||
|
||||
static inline int gpio_request(unsigned gpio, const char *label)
|
||||
{
|
||||
if (gpio > EP93XX_GPIO_LINE_MAX)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
static inline void gpio_free(unsigned gpio)
|
||||
{
|
||||
}
|
||||
|
||||
int gpio_direction_input(unsigned gpio);
|
||||
int gpio_direction_output(unsigned gpio, int value);
|
||||
int gpio_get_value(unsigned gpio);
|
||||
void gpio_set_value(unsigned gpio, int value);
|
||||
|
||||
#include <asm-generic/gpio.h> /* cansleep wrappers */
|
||||
#define gpio_get_value __gpio_get_value
|
||||
#define gpio_set_value __gpio_set_value
|
||||
#define gpio_cansleep __gpio_cansleep
|
||||
|
||||
/*
|
||||
* Map GPIO A0..A7 (0..7) to irq 64..71,
|
||||
* B0..B7 (7..15) to irq 72..79, and
|
||||
* F0..F7 (16..24) to irq 80..87.
|
||||
*/
|
||||
|
||||
static inline int gpio_to_irq(unsigned gpio)
|
||||
{
|
||||
if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ)
|
||||
|
||||
Reference in New Issue
Block a user