[ARM] 5373/2: Add gpiolib support to AT91
Add support for gpiolib, including debugfs output, to the AT91 family. The at91_get/set_gpio_value calls still exist since they are used by the atmel serial driver. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
这个提交包含在:
@@ -213,32 +213,12 @@ extern void at91_gpio_resume(void);
|
||||
*/
|
||||
|
||||
#include <asm/errno.h>
|
||||
|
||||
static inline int gpio_request(unsigned gpio, const char *label)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void gpio_free(unsigned gpio)
|
||||
{
|
||||
might_sleep();
|
||||
}
|
||||
|
||||
extern int gpio_direction_input(unsigned gpio);
|
||||
extern int gpio_direction_output(unsigned gpio, int value);
|
||||
|
||||
static inline int gpio_get_value(unsigned gpio)
|
||||
{
|
||||
return at91_get_gpio_value(gpio);
|
||||
}
|
||||
|
||||
static inline void gpio_set_value(unsigned gpio, int value)
|
||||
{
|
||||
at91_set_gpio_value(gpio, 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
|
||||
|
||||
static inline int gpio_to_irq(unsigned gpio)
|
||||
{
|
||||
return gpio;
|
||||
|
在新工单中引用
屏蔽一个用户