Skip to content

Commit

Permalink
[AVR32] add multidrive support for pio driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matteo Vit authored and Haavard Skinnemoen committed Oct 11, 2007
1 parent d938b89 commit 7808fa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/avr32/mach-at32ap/pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions include/asm-avr32/arch-at32ap/portmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7808fa4

Please sign in to comment.