summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.18/pio-deglitch.patch
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-01-28 08:06:48 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-01-28 08:06:48 +0000
commitb7546e3f46c52c23ab2cfbf0a0b1e13597cd20ef (patch)
tree1a90eec6d43d7bf4b7f12f2d3de3e8de24097152 /packages/linux/linux-2.6.18/pio-deglitch.patch
parent937675435a1f0e44511bdc8ff6ef1d5d4029d5b8 (diff)
parent2c7c8e8d65c63b9492ccc6f754fed2a4307908cd (diff)
merge of '36133f7d8e7f5d20b7036c64abff8ec2452f0282'
and 'cec9ba770f42c95b32a71550f948c06c6fdf7e48'
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);