9
0
Fork 0

gpio: add static inlines for gpio_request/gpio_free

Some drivers use gpio_request/gpio_free. Currently no architecture
has code behind these functions. Provide static inline functions
for these and remvoe the at91 specific inline functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-06-30 18:12:56 +02:00
parent d5a90dbcbc
commit 47548c90b1
3 changed files with 14 additions and 10 deletions

View File

@ -248,15 +248,6 @@ struct at91_gpio_bank {
extern int at91_gpio_init(struct at91_gpio_bank *data, int nr_banks);
static inline int gpio_request(unsigned gpio, const char *label)
{
return 0;
}
static inline void gpio_free(unsigned gpio)
{
}
extern int gpio_direction_input(unsigned gpio);
extern int gpio_direction_output(unsigned gpio, int value);
#define gpio_get_value at91_get_gpio_value

View File

@ -21,6 +21,7 @@
#include <usb/ch9.h>
#include <usb/gadget.h>
#include <poller.h>
#include <gpio.h>
#include <linux/list.h>
#include <linux/clk.h>
@ -32,7 +33,6 @@
#include <mach/io.h>
#include <mach/board.h>
#include <mach/cpu.h>
#include <mach/gpio.h>
#include <mach/at91sam9261_matrix.h>
#include "at91_udc.h"

View File

@ -1 +1,14 @@
#ifndef __GPIO_H
#define __GPIO_H
#include <asm/gpio.h>
static inline int gpio_request(unsigned gpio, const char *label)
{
return 0;
}
static inline void gpio_free(unsigned gpio)
{
}
#endif /* __GPIO_H */