Title: [9055] trunk: [#6140] ADP5589 Linux Driver Support
- Revision
- 9055
- Author
- hennerich
- Date
- 2010-08-05 04:39:34 -0400 (Thu, 05 Aug 2010)
Log Message
[#6140] ADP5589 Linux Driver Support
Add support for unlock timer and debounce disable
Modified Paths
Diff
Modified: trunk/drivers/input/keyboard/adp5589-keys.c (9054 => 9055)
--- trunk/drivers/input/keyboard/adp5589-keys.c 2010-08-05 07:58:15 UTC (rev 9054)
+++ trunk/drivers/input/keyboard/adp5589-keys.c 2010-08-05 08:39:34 UTC (rev 9055)
@@ -59,6 +59,7 @@
#define LOCK_EN (1 << 0)
#define PTIME_MASK 0x3
+#define LTIME_MASK 0x3
/* Key Event Register xy */
#define KEY_EV_PRESSED (1 << 7)
@@ -363,6 +364,8 @@
pdata->unlock_key1);
ret |= adp5589_write(client, ADP5589_UNLOCK2,
pdata->unlock_key2);
+ ret |= adp5589_write(client, ADP5589_UNLOCK_TIMERS,
+ pdata->unlock_timer & LTIME_MASK);
ret |= adp5589_write(client, ADP5589_LOCK_CFG, LOCK_EN);
}
@@ -413,6 +416,10 @@
}
}
+ for (i = 0; i <= ADP_BANK(MAXGPIO); i++)
+ ret |= adp5589_write(client, ADP5589_DEBOUNCE_DIS_A + i,
+ pdata->debounce_dis_mask >> (i * 8));
+
ret |= adp5589_write(client, ADP5589_POLL_PTIME_CFG,
pdata->scan_cycle_time & PTIME_MASK);
ret |= adp5589_write(client, ADP5589_INT_STATUS, LOGIC2_INT |
Modified: trunk/include/linux/input/adp5589.h (9054 => 9055)
--- trunk/include/linux/input/adp5589.h 2010-08-05 07:58:15 UTC (rev 9054)
+++ trunk/include/linux/input/adp5589.h 2010-08-05 08:39:34 UTC (rev 9055)
@@ -145,9 +145,11 @@
unsigned short keymapsize; /* Keymap size */
unsigned repeat:1; /* Enable key repeat */
unsigned en_keylock:1; /* Enable key lock feature */
- unsigned short unlock_key1; /* Unlock Key 1 */
- unsigned short unlock_key2; /* Unlock Key 2 */
- unsigned short scan_cycle_time; /* Time between consecutive scan cycles */
+ unsigned char unlock_key1; /* Unlock Key 1 */
+ unsigned char unlock_key2; /* Unlock Key 2 */
+ unsigned char unlock_timer; /* Time in seconds [0..7] between the two unlock keys 0=disable */
+ unsigned char scan_cycle_time; /* Time between consecutive scan cycles */
+ unsigned debounce_dis_mask; /* Disable debounce mask */
unsigned pull_dis_mask; /* Disable all pull resistors mask */
unsigned pullup_en_100k; /* Pull-Up 100k Enable Mask */
unsigned pullup_en_300k; /* Pull-Up 300k Enable Mask */
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits