summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.18/pio-deglitch.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-11-29 13:46:08 +0000
committerKoen Kooi <koen@openembedded.org>2007-11-29 13:46:08 +0000
commitfb66e592cba4e91fdb85570cfb51e4110ea75b28 (patch)
tree018f99af09b92a1ec7734192984798db855ccac7 /packages/linux/linux-2.6.18/pio-deglitch.patch
parent82ef14e73032b4364c7ef2b372f9868f5ceed793 (diff)
parent8c1a5e33bf439c0274b795cc580a30c5de951df7 (diff)
propagate from branch 'org.openembedded.dev' (head 0238eff8862126ac83c3f05d7a6fb094feff89e9)
to branch 'org.openembedded.dev.avr32' (head afeaa97ba6962d277699aab10b0b6a8089342824)
Diffstat (limited to 'packages/linux/linux-2.6.18/pio-deglitch.patch')
-rw-r--r--packages/linux/linux-2.6.18/pio-deglitch.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/linux/linux-2.6.18/pio-deglitch.patch b/packages/linux/linux-2.6.18/pio-deglitch.patch
new file mode 100644
index 0000000000..3fe9231861
--- /dev/null
+++ b/packages/linux/linux-2.6.18/pio-deglitch.patch
@@ -0,0 +1,40 @@
+---
+ arch/avr32/mach-at32ap/pio.c | 12 ++++++++++++
+ include/asm-avr32/arch-at32ap/gpio.h | 1 +
+ 2 files changed, 13 insertions(+)
+
+Index: linux-2.6.18-avr32/arch/avr32/mach-at32ap/pio.c
+===================================================================
+--- linux-2.6.18-avr32.orig/arch/avr32/mach-at32ap/pio.c 2006-11-30 11:55:02.000000000 +0100
++++ linux-2.6.18-avr32/arch/avr32/mach-at32ap/pio.c 2006-11-30 11:57:52.000000000 +0100
+@@ -122,6 +122,18 @@ fail:
+ dump_stack();
+ }
+
++void at32_set_deglitch(unsigned int pin, int enable)
++{
++ struct pio_device *pio;
++ u32 mask = 1 << (pin & 0x1f);
++
++ pio = gpio_to_pio(pin);
++ if (enable)
++ pio_writel(pio, IFER, mask);
++ else
++ pio_writel(pio, IFDR, mask);
++}
++
+ static unsigned int pio_id(struct pio_device *pio)
+ {
+ return pio - pio_dev;
+Index: linux-2.6.18-avr32/include/asm-avr32/arch-at32ap/gpio.h
+===================================================================
+--- linux-2.6.18-avr32.orig/include/asm-avr32/arch-at32ap/gpio.h 2006-11-30 11:54:56.000000000 +0100
++++ linux-2.6.18-avr32/include/asm-avr32/arch-at32ap/gpio.h 2006-11-30 11:55:56.000000000 +0100
+@@ -16,6 +16,7 @@
+ void at32_select_periph(unsigned int pin, unsigned int periph,
+ unsigned long flags);
+ void at32_select_gpio(unsigned int pin, unsigned long flags);
++void at32_set_deglitch(unsigned int pin, int enable);
+
+ /* Arch-neutral GPIO API */
+ int __must_check gpio_request(unsigned int gpio, const char *label);