Thread (8 messages) 8 messages, 3 authors, 2009-09-28

RE: [PATCH 1/3] Input: DaVinci Key Scan Driver

From: Nori, Sekhar <hidden>
Date: 2009-09-25 14:31:28

On Fri, Sep 25, 2009 at 19:51:28, Miguel Aguilar wrote:
Nori, Sekhar wrote:
quoted
On Thu, Sep 24, 2009 at 22:23:22, miguel.aguilar@ridgerun.com wrote:
quoted
From: Miguel Aguilar <redacted>

Adds the driver for enabling key scan support for DaVinci platforms.

DM365 is the only platform that uses this driver at the moment.

Signed-off-by: Miguel Aguilar <redacted>
---
[...]
quoted
+
+/* Initializing the kp Module */
+static void davinci_ks_initialize(struct davinci_ks *davinci_ks)
+{
+     u32 strobe = davinci_ks->pdata->strobe;
+     u32 interval = davinci_ks->pdata->interval;
+
+     /* Enable all interrupts */
+     davinci_ks_write(davinci_ks, DAVINCI_KEYSCAN_INT_ALL, DAVINCI_KEYSCAN_INTENA);
+
+     /* Clear interrupts if any */
+     davinci_ks_write(davinci_ks, DAVINCI_KEYSCAN_INT_ALL, DAVINCI_KEYSCAN_INTCLR);
+
+     /* Setup the scan period = strobe + interval */
+     davinci_ks_write(davinci_ks, strobe, DAVINCI_KEYSCAN_STRBWIDTH);
+     davinci_ks_write(davinci_ks, interval, DAVINCI_KEYSCAN_INTERVAL);
+     davinci_ks_write(davinci_ks, 0x01, DAVINCI_KEYSCAN_CONTTIME);
+
+     /* Enable Keyscan module and enable */
+     davinci_ks_write(davinci_ks, DAVINCI_KEYSCAN_AUTODET | DAVINCI_KEYSCAN_KEYEN,
+                     DAVINCI_KEYSCAN_KEYCTRL);
We seem to be hardcoded to the 4x4 matrix type here.
Some DM365 boards could use 5x3 matrix.

Thanks,
Sekhar
[MA] I will add a platform option for matrix type to choose 4x4 or 5x3 matrix.
What do think about this?
Sounds good. I am not sure if any other piece of code
needs to change though.

Thanks,
Sekhar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help