]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[AVR32] add multidrive support for pio driver
authorMatteo Vit <matteo.vit@dave.eu>
Thu, 9 Aug 2007 12:55:34 +0000 (14:55 +0200)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 11 Oct 2007 09:38:41 +0000 (11:38 +0200)
This patch add multidrive support for pio driver

Signed-off-by: Matteo Vit - Dave S.r.l. <matteo.vit@dave.eu>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/mach-at32ap/pio.c
include/asm-avr32/arch-at32ap/portmux.h

index 1eb99b814f5bcaf021f06ef46ea26c3cc96fa67f..d61a02da898cd68bd08316474ee2c2762dfd8036 100644 (file)
@@ -110,6 +110,10 @@ void __init at32_select_gpio(unsigned int pin, unsigned long flags)
                        pio_writel(pio, SODR, mask);
                else
                        pio_writel(pio, CODR, mask);
+               if (flags & AT32_GPIOF_MULTIDRV)
+                       pio_writel(pio, MDER, mask);
+               else
+                       pio_writel(pio, MDDR, mask);
                pio_writel(pio, PUDR, mask);
                pio_writel(pio, OER, mask);
        } else {
index 9930871decde1e61bbb522b9d9243759263f773c..b1abe6b4e4efef469f8098dd2d1ebb04873d937d 100644 (file)
@@ -19,6 +19,7 @@
 #define AT32_GPIOF_OUTPUT      0x00000002      /* (OUT) Enable output driver */
 #define AT32_GPIOF_HIGH                0x00000004      /* (OUT) Set output high */
 #define AT32_GPIOF_DEGLITCH    0x00000008      /* (IN) Filter glitches */
+#define AT32_GPIOF_MULTIDRV    0x00000010      /* Enable multidriver option */
 
 void at32_select_periph(unsigned int pin, unsigned int periph,
                        unsigned long flags);