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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Fri, Sep 25, 2009 at 19:51:28, Miguel Aguilar wrote:
> > Nori, Sekhar wrote:
> > > On Thu, Sep 24, 2009 at 22:23:22, miguel.aguilar@xxxxxxxxxxxx wrote:
> > >> From: Miguel Aguilar <miguel.aguilar@xxxxxxxxxxxx>
> > >>
> > >> 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@xxxxxxxxxxxx>
> > >> ---
> > >
> > > [...]
> > >
> > >> +
> > >> +/* 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.
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

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux