summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s/button-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/button-imx31.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/button-imx31.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/button-imx31.c b/firmware/target/arm/imx31/gigabeat-s/button-imx31.c
index 7c432450c2..587e66e0bc 100644
--- a/firmware/target/arm/imx31/gigabeat-s/button-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/button-imx31.c
@@ -68,8 +68,6 @@ static __attribute__((interrupt("IRQ"))) void KPP_HANDLER(void)
68 68
69 for (col = 0; col < 3; col++) /* Col */ 69 for (col = 0; col < 3; col++) /* Col */
70 { 70 {
71 int i;
72
73 /* 2. Write 1s to KPDR[10:8] setting column data to 1s */ 71 /* 2. Write 1s to KPDR[10:8] setting column data to 1s */
74 KPP_KPDR |= (0x7 << 8); 72 KPP_KPDR |= (0x7 << 8);
75 73
@@ -78,8 +76,7 @@ static __attribute__((interrupt("IRQ"))) void KPP_HANDLER(void)
78 KPP_KPCR &= ~(0x7 << 8); 76 KPP_KPCR &= ~(0x7 << 8);
79 77
80 /* Give the columns time to discharge */ 78 /* Give the columns time to discharge */
81 for (i = 0; i < 128; i++) /* TODO: find minimum safe delay */ 79 udelay(2);
82 asm volatile ("");
83 80
84 /* 4. Configure columns as open-drain */ 81 /* 4. Configure columns as open-drain */
85 KPP_KPCR |= (0x7 << 8); 82 KPP_KPCR |= (0x7 << 8);
@@ -94,8 +91,7 @@ static __attribute__((interrupt("IRQ"))) void KPP_HANDLER(void)
94 91
95 /* Delay added to avoid propagating the 0 from column to row 92 /* Delay added to avoid propagating the 0 from column to row
96 * when scanning. */ 93 * when scanning. */
97 for (i = 0; i < 128; i++) /* TODO: find minimum safe delay */ 94 udelay(2);
98 asm volatile ("");
99 95
100 /* Read row input */ 96 /* Read row input */
101 button |= (~KPP_KPDR & kms[col].mask) << kms[col].shift; 97 button |= (~KPP_KPDR & kms[col].mask) << kms[col].shift;