Thread (1 message) 1 message, 1 author, 2009-09-25

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

From: Paulraj, Sandeep <hidden>
Date: 2009-09-25 14:39:13

Possibly related (same subject, not in this thread)

On Fri, Sep 25, 2009 at 19:51:28, Miguel Aguilar wrote:
quoted
Nori, Sekhar wrote:
quoted
On Thu, Sep 24, 2009 at 22:23:22, miguel.aguilar-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org wrote:
quoted
From: Miguel Aguilar <miguel.aguilar-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org>

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 <miguel.aguilar-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org>
---
[...]
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);
quoted
quoted
quoted
+
+     /* Clear interrupts if any */
+     davinci_ks_write(davinci_ks, DAVINCI_KEYSCAN_INT_ALL,
DAVINCI_KEYSCAN_INTCLR);
quoted
quoted
quoted
+
+     /* Setup the scan period = strobe + interval */
+     davinci_ks_write(davinci_ks, strobe,
DAVINCI_KEYSCAN_STRBWIDTH);
quoted
quoted
quoted
+     davinci_ks_write(davinci_ks, interval,
DAVINCI_KEYSCAN_INTERVAL);
quoted
quoted
quoted
+     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,
quoted
quoted
quoted
+                     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.
quoted
What do think about this?
Sounds good. I am not sure if any other piece of code
needs to change though.
The strobe and interval have to change.  Afcourse that change comes into the picture only when the mode is changed from 4x4 to 5x3.
I can see that there are options given for this in board specific code.
Thanks,
Sekhar
Thanks,
Sandeep
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help