linux-omap 2.6.37: replace various patch with upstream versions and rediff
[openembedded.git] / recipes / linux / linux-2.6.18 / fix-gpio-prototypes.patch
blob2b5a09620b88ceb2b51c3cd95283c9cf0f5972c2
1 ---
2 arch/avr32/mach-at32ap/pio.c | 15 +++++++++------
3 include/asm-avr32/arch-at32ap/gpio.h | 6 +++---
4 2 files changed, 12 insertions(+), 9 deletions(-)
6 Index: linux-2.6.18-avr32/arch/avr32/mach-at32ap/pio.c
7 ===================================================================
8 --- linux-2.6.18-avr32.orig/arch/avr32/mach-at32ap/pio.c 2006-11-29 18:14:54.000000000 +0100
9 +++ linux-2.6.18-avr32/arch/avr32/mach-at32ap/pio.c 2006-11-29 18:17:15.000000000 +0100
10 @@ -49,7 +49,7 @@ static struct pio_device *gpio_to_pio(un
11 /* Pin multiplexing API */
13 void __init at32_select_periph(unsigned int pin, unsigned int periph,
14 - int use_pullup)
15 + unsigned long flags)
17 struct pio_device *pio;
18 unsigned int pin_index = pin & 0x1f;
19 @@ -73,7 +73,7 @@ void __init at32_select_periph(unsigned
20 pio_writel(pio, ASR, mask);
22 pio_writel(pio, PDR, mask);
23 - if (!use_pullup)
24 + if (!(flags & AT32_GPIOF_PULLUP))
25 pio_writel(pio, PUDR, mask);
27 return;
28 @@ -82,8 +82,7 @@ fail:
29 dump_stack();
32 -void __init at32_select_gpio(unsigned int pin, int enable_output,
33 - int use_pullup)
34 +void __init at32_select_gpio(unsigned int pin, unsigned long flags)
36 struct pio_device *pio;
37 unsigned int pin_index = pin & 0x1f;
38 @@ -101,13 +100,17 @@ void __init at32_select_gpio(unsigned in
41 pio_writel(pio, PUER, mask);
42 - if (enable_output)
43 + if (flags & AT32_GPIOF_HIGH)
44 + pio_writel(pio, SODR, mask);
45 + else
46 + pio_writel(pio, CODR, mask);
47 + if (flags & AT32_GPIOF_OUTPUT)
48 pio_writel(pio, OER, mask);
49 else
50 pio_writel(pio, ODR, mask);
52 pio_writel(pio, PER, mask);
53 - if (!use_pullup)
54 + if (!(flags & AT32_GPIOF_PULLUP))
55 pio_writel(pio, PUDR, mask);
57 /* It's now allowed to use request_gpio on this pin */
58 Index: linux-2.6.18-avr32/include/asm-avr32/arch-at32ap/gpio.h
59 ===================================================================
60 --- linux-2.6.18-avr32.orig/include/asm-avr32/arch-at32ap/gpio.h 2006-11-29 18:14:37.000000000 +0100
61 +++ linux-2.6.18-avr32/include/asm-avr32/arch-at32ap/gpio.h 2006-11-29 18:15:06.000000000 +0100
62 @@ -1,5 +1,5 @@
63 -#ifndef __ASM_AVR32_GPIO_H
64 -#define __ASM_AVR32_GPIO_H
65 +#ifndef __ASM_AVR32_ARCH_GPIO_H
66 +#define __ASM_AVR32_ARCH_GPIO_H
68 #include <linux/compiler.h>
69 #include <asm/irq.h>
70 @@ -36,4 +36,4 @@ static inline int irq_to_gpio(unsigned i
71 return irq - GPIO_IRQ_BASE;
74 -#endif /* __ASM_AVR32_GPIO_H */
75 +#endif /* __ASM_AVR32_ARCH_GPIO_H */