Thread (41 messages) 41 messages, 5 authors, 2014-11-18

request an irq without enabling? [Was: Re: [PATCH] gpio: mxs: implement get_direction callback]

From: Uwe Kleine-König <hidden>
Date: 2014-11-17 09:52:00
Also in: linux-gpio, linux-serial

Hello,

Sorry for the just sent unfinished mail. I pressed "send" instead of
"reedit" after adding tglx to the recipients. Apart from the topic
handled in this mail it's complete though.

On Mon, Nov 17, 2014 at 10:11:25AM +0100, Janusz U?ycki wrote:
W dniu 2014-11-17 o 09:28, Uwe Kleine-K?nig pisze:
quoted
I think mctrl_gpio_init should request the needed irqs, but not enable
them. Not sure there is a corresponding request_irq variant for that.
What would you propose?
Thomas: Is there something available among the irq functions for that.
The use case is that when probing an uart driver the modem control irqs
should only be enabled when the enable_ms callback is called by the
tty/serial framework. So we'd like to have something like
request_irq_noenable. This way the enable_ms callback would just need
to call enable_irq without first checking if the handler is already
setup.

The less nice alternatives are:

 - use request_irq(..); disable_irq(); and handle the short window where
   irqs are on but not yet desired.
 - only request_irq in the enable_ms callback, and free_irq in
   disable_ms.

Any ideas?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help