request an irq without enabling? [Was: Re: [PATCH] gpio: mxs: implement get_direction callback]
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Mon Nov 17 01:51:54 PST 2014
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:
> >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/ |
More information about the linux-arm-kernel
mailing list