All of lore.kernel.org
 help / color / mirror / Atom feed
* TWL4030 keypad timeout interrupt
@ 2008-05-13 13:54 Felipe Balbi
  2008-05-13 14:28 ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-05-13 13:54 UTC (permalink / raw)
  To: Linux OMAP Mailing List

Hi all,

I noted whenever we release a key in omap-twl4030.c driver it generates
two interrupts: one for release event and one for a timeout event.

Is that expected or is that a bug somewhere in the driver ?

It's easily noted by cat /proc/interrupts ;-)

-- 
	- Balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TWL4030 keypad timeout interrupt
  2008-05-13 13:54 TWL4030 keypad timeout interrupt Felipe Balbi
@ 2008-05-13 14:28 ` Felipe Balbi
  2008-05-14  5:08   ` Girish
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-05-13 14:28 UTC (permalink / raw)
  To: felipe.balbi; +Cc: Linux OMAP Mailing List



On Tue, 13 May 2008 16:54:17 +0300, Felipe Balbi <felipe.balbi@nokia.com>
wrote:
> Hi all,
> 
> I noted whenever we release a key in omap-twl4030.c driver it generates
> two interrupts: one for release event and one for a timeout event.
> 
> Is that expected or is that a bug somewhere in the driver ?
> 
> It's easily noted by cat /proc/interrupts ;-)

Replying to myself as I found some more clues.

By checking the code I could see that only rising edge of
timeout interrupt is being enabled. Also timeout register
is at 0xd6, but code is writing 0x04...

So if i read it correctly, we might have 0 set as our timeout.

which might explain why we only see the timeout interrupt
when releasing the key.

Am I right ?

I might be completely wrong here, but that extra interrupt
happening all the time is just bugging me :-p

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
me@felipebalbi.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: TWL4030 keypad timeout interrupt
  2008-05-13 14:28 ` Felipe Balbi
@ 2008-05-14  5:08   ` Girish
  2008-05-14  8:16     ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Girish @ 2008-05-14  5:08 UTC (permalink / raw)
  To: 'Felipe Balbi', felipe.balbi; +Cc: 'Linux OMAP Mailing List'

 
>
>
>On Tue, 13 May 2008 16:54:17 +0300, Felipe Balbi 
><felipe.balbi@nokia.com>
>wrote:
>> Hi all,
>> 
>> I noted whenever we release a key in omap-twl4030.c driver it 
>> generates two interrupts: one for release event and one for 
>a timeout event.
>> 
>> Is that expected or is that a bug somewhere in the driver ?
>> 
>> It's easily noted by cat /proc/interrupts ;-)
>
>Replying to myself as I found some more clues.
>
>By checking the code I could see that only rising edge of 
>timeout interrupt is being enabled. Also timeout register is 
>at 0xd6, but code is writing 0x04...
>

No, the code is writing to 0x00D2 + 0x04 (the t2keypad base address: 0x00D2). 

>So if i read it correctly, we might have 0 set as our timeout.
>
>which might explain why we only see the timeout interrupt when 
>releasing the key.
>
>Am I right ?

Well, the timeout is here to help the controller come out of hangs, if any. 

>
>I might be completely wrong here, but that extra interrupt 
>happening all the time is just bugging me :-p




Regards,
Girish



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TWL4030 keypad timeout interrupt
  2008-05-14  5:08   ` Girish
@ 2008-05-14  8:16     ` Felipe Balbi
  2008-05-14  8:57       ` Girish
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-05-14  8:16 UTC (permalink / raw)
  To: ext Girish
  Cc: 'Felipe Balbi', felipe.balbi,
	'Linux OMAP Mailing List'

On Wed, May 14, 2008 at 10:38:09AM +0530, ext Girish wrote:
> 
>  
> >
> >
> >On Tue, 13 May 2008 16:54:17 +0300, Felipe Balbi 
> ><felipe.balbi@nokia.com>
> >wrote:
> >> Hi all,
> >> 
> >> I noted whenever we release a key in omap-twl4030.c driver it 
> >> generates two interrupts: one for release event and one for 
> >a timeout event.
> >> 
> >> Is that expected or is that a bug somewhere in the driver ?
> >> 
> >> It's easily noted by cat /proc/interrupts ;-)
> >
> >Replying to myself as I found some more clues.
> >
> >By checking the code I could see that only rising edge of 
> >timeout interrupt is being enabled. Also timeout register is 
> >at 0xd6, but code is writing 0x04...
> >
> 
> No, the code is writing to 0x00D2 + 0x04 (the t2keypad base address: 0x00D2). 

Ok, good :-)
thanks

> 
> >So if i read it correctly, we might have 0 set as our timeout.
> >
> >which might explain why we only see the timeout interrupt when 
> >releasing the key.
> >
> >Am I right ?
> 
> Well, the timeout is here to help the controller come out of hangs, if any. 

But is it possible that whenever we release a key we get a timeout? I
think something is wrong there.

-- 
	- Balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: TWL4030 keypad timeout interrupt
  2008-05-14  8:16     ` Felipe Balbi
@ 2008-05-14  8:57       ` Girish
  2008-05-14  9:52         ` Gopinath, Thara
  0 siblings, 1 reply; 7+ messages in thread
From: Girish @ 2008-05-14  8:57 UTC (permalink / raw)
  To: felipe.balbi; +Cc: 'Felipe Balbi', 'Linux OMAP Mailing List'

 

>-----Original Message-----
>From: Felipe Balbi [mailto:felipe.balbi@nokia.com] 
>Sent: Wednesday, May 14, 2008 1:46 PM
>To: ext Girish
>Cc: 'Felipe Balbi'; felipe.balbi@nokia.com; 'Linux OMAP Mailing List'
>Subject: Re: TWL4030 keypad timeout interrupt
>
>Ok, good :-)
>thanks
>
>> 
>> >So if i read it correctly, we might have 0 set as our timeout.
>> >
>> >which might explain why we only see the timeout interrupt when 
>> >releasing the key.
>> >
>> >Am I right ?
>> 
>> Well, the timeout is here to help the controller come out of 
>hangs, if any. 
>
>But is it possible that whenever we release a key we get a 
>timeout? I think something is wrong there.

No, it's an empty timeout feature, an interrupt is generated if no key is pressed
during that period of time.


Regards,
Girish


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: TWL4030 keypad timeout interrupt
  2008-05-14  8:57       ` Girish
@ 2008-05-14  9:52         ` Gopinath, Thara
  2008-05-14 10:08           ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Gopinath, Thara @ 2008-05-14  9:52 UTC (permalink / raw)
  To: Ghongadematt, Girish, felipe.balbi@nokia.com
  Cc: 'Felipe Balbi', 'Linux OMAP Mailing List'



> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Girish
> Sent: Wednesday, May 14, 2008 2:27 PM
> To: felipe.balbi@nokia.com
> Cc: 'Felipe Balbi'; 'Linux OMAP Mailing List'
> Subject: RE: TWL4030 keypad timeout interrupt
>
>
>
> >-----Original Message-----
> >From: Felipe Balbi [mailto:felipe.balbi@nokia.com]
> >Sent: Wednesday, May 14, 2008 1:46 PM
> >To: ext Girish
> >Cc: 'Felipe Balbi'; felipe.balbi@nokia.com; 'Linux OMAP Mailing List'
> >Subject: Re: TWL4030 keypad timeout interrupt
> >
> >Ok, good :-)
> >thanks
> >
> >>
> >> >So if i read it correctly, we might have 0 set as our timeout.
> >> >
> >> >which might explain why we only see the timeout interrupt when
> >> >releasing the key.
> >> >
> >> >Am I right ?
> >>
> >> Well, the timeout is here to help the controller come out of
> >hangs, if any.
> >
> >But is it possible that whenever we release a key we get a
> timeout? I
> >think something is wrong there.
>
> No, it's an empty timeout feature, an interrupt is generated
> if no key is pressed during that period of time.
>
>
> Regards,
> Girish

This feature allows the TWL4030 keypad internal sequencer to go to idle state if no keypresses are made for the period of time programmed in the timeout register.The reason why you are seeing this only after a release is because this timeout feature is activated only after a release event.Thus when a key is release you see a keyreleased event interrupt and after the programmed timeout interval is over a timeout event interrupt.This timeout interrupt does nothing but tell you that the keypad internal sequencer is going to idle state.
This is not a must to have feature but there is nothing wrong with having it also.

Regards
Thara

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TWL4030 keypad timeout interrupt
  2008-05-14  9:52         ` Gopinath, Thara
@ 2008-05-14 10:08           ` Felipe Balbi
  0 siblings, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2008-05-14 10:08 UTC (permalink / raw)
  To: ext Gopinath, Thara
  Cc: Ghongadematt, Girish, felipe.balbi@nokia.com,
	'Felipe Balbi', 'Linux OMAP Mailing List'

On Wed, May 14, 2008 at 03:22:56PM +0530, ext Gopinath, Thara wrote:
> 
> 
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org
> > [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Girish
> > Sent: Wednesday, May 14, 2008 2:27 PM
> > To: felipe.balbi@nokia.com
> > Cc: 'Felipe Balbi'; 'Linux OMAP Mailing List'
> > Subject: RE: TWL4030 keypad timeout interrupt
> >
> >
> >
> > >-----Original Message-----
> > >From: Felipe Balbi [mailto:felipe.balbi@nokia.com]
> > >Sent: Wednesday, May 14, 2008 1:46 PM
> > >To: ext Girish
> > >Cc: 'Felipe Balbi'; felipe.balbi@nokia.com; 'Linux OMAP Mailing List'
> > >Subject: Re: TWL4030 keypad timeout interrupt
> > >
> > >Ok, good :-)
> > >thanks
> > >
> > >>
> > >> >So if i read it correctly, we might have 0 set as our timeout.
> > >> >
> > >> >which might explain why we only see the timeout interrupt when
> > >> >releasing the key.
> > >> >
> > >> >Am I right ?
> > >>
> > >> Well, the timeout is here to help the controller come out of
> > >hangs, if any.
> > >
> > >But is it possible that whenever we release a key we get a
> > timeout? I
> > >think something is wrong there.
> >
> > No, it's an empty timeout feature, an interrupt is generated
> > if no key is pressed during that period of time.
> >
> >
> > Regards,
> > Girish
> 
> This feature allows the TWL4030 keypad internal sequencer to go to idle state if no keypresses are made for the period of time programmed in the timeout register.The reason why you are seeing this only after a release is because this timeout feature is activated only after a release event.Thus when a key is release you see a keyreleased event interrupt and after the programmed timeout interval is over a timeout event interrupt.This timeout interrupt does nothing but tell you that the keypad internal sequencer is going to idle state.
> This is not a must to have feature but there is nothing wrong with having it also.

Ok, got it. :-)
thanks for the clarification :-)

-- 
	- Balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-14 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 13:54 TWL4030 keypad timeout interrupt Felipe Balbi
2008-05-13 14:28 ` Felipe Balbi
2008-05-14  5:08   ` Girish
2008-05-14  8:16     ` Felipe Balbi
2008-05-14  8:57       ` Girish
2008-05-14  9:52         ` Gopinath, Thara
2008-05-14 10:08           ` Felipe Balbi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.