Re: [PATCH] Input: gpio-keys: Support for one-directional interrupts

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

 



On Wed, Dec 09, 2009 at 08:15:26AM -0800, Cory Maccarrone wrote:
> On Wed, Dec 9, 2009 at 3:32 AM, Ferenc Wagner <wferi@xxxxxxx> wrote:
> > Cory Maccarrone <darkstar6262@xxxxxxxxx> writes:
> >
> > Interesting.  Btw. I'd like to convert gpio-keys from edge-triggered to
> > level-triggered interrupts.  Would that work for your hardware?
> 
> I'm fairly certain it wouldn't.  Each of the interrupts on my hardware
> has a corresponding bit in a control register that determines if it's
> rising or falling-edge triggered -- thus the need for my patch.  To
> capture both directions, it's necessary to modify the control register
> when a falling edge is detected, so that the corresponding rising edge
> can be collected afterward.

This kind of ugliness should be hidden in irqchip driver. See
mfd/asic3.c for an example.

> May I ask why you're thinking of
> converting to level-triggering?
> 
> Perhaps it would be better to provide an option in the platform_device
> structure to set edge- or level-triggering, similar to the change I'm
> proposing for interrupts that can only signal one way at a time.
> 

Yes, we need a way fro platform code to specify desired interrupt flags
but I don't believe we should be reconfiguring them on the fly.

-- 
Dmitry
--
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