mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 13:34:38 +08:00
2ae795b02a
The AVR32 <asm/gpio.h> was missing the gpio_*_cansleep() calls, breaking compilation for some code using them. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
30 lines
701 B
C
30 lines
701 B
C
#ifndef __ASM_AVR32_ARCH_GPIO_H
|
|
#define __ASM_AVR32_ARCH_GPIO_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <asm/irq.h>
|
|
|
|
|
|
/* Arch-neutral GPIO API */
|
|
int __must_check gpio_request(unsigned int gpio, const char *label);
|
|
void gpio_free(unsigned int gpio);
|
|
|
|
int gpio_direction_input(unsigned int gpio);
|
|
int gpio_direction_output(unsigned int gpio, int value);
|
|
int gpio_get_value(unsigned int gpio);
|
|
void gpio_set_value(unsigned int gpio, int value);
|
|
|
|
#include <asm-generic/gpio.h> /* cansleep wrappers */
|
|
|
|
static inline int gpio_to_irq(unsigned int gpio)
|
|
{
|
|
return gpio + GPIO_IRQ_BASE;
|
|
}
|
|
|
|
static inline int irq_to_gpio(unsigned int irq)
|
|
{
|
|
return irq - GPIO_IRQ_BASE;
|
|
}
|
|
|
|
#endif /* __ASM_AVR32_ARCH_GPIO_H */
|