Re: [PATCH/RFC] hardware irq debouncing support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Thursday, October 9, 2008 - 2:34 am

On Wednesday 08 October 2008, Haavard Skinnemoen wrote:

The specific QOS achieved is system-specific; the term for
that kind of mechanism is "hinting".  It's very clearly defined
what the hint means .. but a given system might not use it.

The madvise(2) system call is a userspace example of hinting.

 

That is, "On the other hand, 'later' is not yet..." ?

Are you suggesting that debouncing support shouldn't
be provided without QOS query/update support?



Done:  "as close to 1 msec as hardware allows".  (I think less
than that is probably too little, and more would likely be OK.)

 

Note by the way what I think is a problematic assumption there:
that this *exact* debounce period matters.  It seems to be more
usual that it just fit into a range of reasonable values; a bit
more or less won't matter, almost by definition.

(And also, that routine is less functional than request_irq ...)



I'm not sure which sentence you refer too, but the first
"perhaps" above is yours!  :)



OK..

 

What I like about the flag is that it's really simple, a
"fire and forget" model.  Easy for drivers to use.  And it
need not be incompatible with a fancier interface...

The debounce() method might usefully be changed to take the
requested delay in microseconds, instead of a boolean.  And
to return the actual delay.  That would make it easier to
support fancier calls later, maybe just exposing the raw
irq_chip call like

	usecs = set_irq_debounce(irq, range_spec);

The notion of a request_debounced_irq() needs more cooking
yet though, IMO.



But how important *is* that detail to most drivers?  In practice.
I susct pethey pick numbers today since they have to debounce with
software timers, which require numbers.



I think irq_chip calls should be limited to hardware support.
Keep them really simple; put layers on top of them if needed.



I can't see it working otherwise.  Of course, maybe there should
just be generic ranges rather than expecting drivers to understand
how springy contacts might be on a given board, or how dirty they
may be to cause other kinds of chatter.

- Dave

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH/RFC] hardware irq debouncing support, David Brownell, (Wed Sep 24, 12:51 pm)
Re: [PATCH/RFC] hardware irq debouncing support, Tony Lindgren, (Fri Oct 3, 12:38 am)
Re: [PATCH/RFC] hardware irq debouncing support, David Brownell, (Fri Oct 3, 1:45 am)
Re: [PATCH/RFC] hardware irq debouncing support, Haavard Skinnemoen, (Fri Oct 3, 2:22 am)
Re: [PATCH/RFC] hardware irq debouncing support, Tony Lindgren, (Fri Oct 3, 6:06 am)
Re: [PATCH/RFC] hardware irq debouncing support, Pavel Machek, (Mon Oct 6, 8:10 am)
Re: [PATCH/RFC] hardware irq debouncing support, David Brownell, (Tue Oct 7, 10:19 am)
Re: [PATCH/RFC] hardware irq debouncing support, David Brownell, (Tue Oct 7, 11:14 am)
Re: [PATCH/RFC] hardware irq debouncing support, Haavard Skinnemoen, (Wed Oct 8, 12:48 am)
Re: [PATCH/RFC] hardware irq debouncing support, David Brownell, (Thu Oct 9, 2:34 am)
Re: [PATCH/RFC] hardware irq debouncing support, Haavard Skinnemoen, (Thu Oct 9, 3:30 am)
Re: [PATCH/RFC] hardware irq debouncing support, Pavel Machek, (Sat Oct 11, 7:36 am)
Re: [PATCH/RFC] hardware irq debouncing support, David Brownell, (Sat Oct 11, 11:01 am)
Re: [PATCH/RFC] hardware irq debouncing support, Haavard Skinnemoen, (Sun Oct 12, 5:46 am)
Re: [PATCH/RFC] hardware irq debouncing support, David Brownell, (Fri Nov 7, 3:56 pm)