ar71xx: move irq_to_gpio and gpio_to_irq into gpio.c
SVN-Revision: 29713
This commit is contained in:
		
							parent
							
								
									034b7f0ef5
								
							
						
					
					
						commit
						fbf81c8e79
					
				@ -288,3 +288,15 @@ void __init ar71xx_gpio_init(void)
 | 
			
		||||
	if (err)
 | 
			
		||||
		panic("cannot add AR71xx GPIO chip, error=%d", err);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int gpio_to_irq(unsigned gpio)
 | 
			
		||||
{
 | 
			
		||||
	return AR71XX_GPIO_IRQ(gpio);
 | 
			
		||||
}
 | 
			
		||||
EXPORT_SYMBOL(gpio_to_irq);
 | 
			
		||||
 | 
			
		||||
int irq_to_gpio(unsigned irq)
 | 
			
		||||
{
 | 
			
		||||
	return irq - AR71XX_GPIO_IRQ_BASE;
 | 
			
		||||
}
 | 
			
		||||
EXPORT_SYMBOL(irq_to_gpio);
 | 
			
		||||
 | 
			
		||||
@ -16,21 +16,11 @@
 | 
			
		||||
#define ARCH_NR_GPIOS	64
 | 
			
		||||
#include <asm-generic/gpio.h>
 | 
			
		||||
 | 
			
		||||
#include <asm/mach-ar71xx/ar71xx.h>
 | 
			
		||||
 | 
			
		||||
extern unsigned long ar71xx_gpio_count;
 | 
			
		||||
extern void __ar71xx_gpio_set_value(unsigned gpio, int value);
 | 
			
		||||
extern int __ar71xx_gpio_get_value(unsigned gpio);
 | 
			
		||||
 | 
			
		||||
static inline int gpio_to_irq(unsigned gpio)
 | 
			
		||||
{
 | 
			
		||||
	return AR71XX_GPIO_IRQ(gpio);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static inline int irq_to_gpio(unsigned irq)
 | 
			
		||||
{
 | 
			
		||||
	return irq - AR71XX_GPIO_IRQ_BASE;
 | 
			
		||||
}
 | 
			
		||||
int gpio_to_irq(unsigned gpio);
 | 
			
		||||
int irq_to_gpio(unsigned gpio);
 | 
			
		||||
 | 
			
		||||
static inline int gpio_get_value(unsigned gpio)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user