* [PATCH] mfd: mt6397: Use set_irq_flags only on ARM
@ 2015-03-04 7:24 Sascha Hauer
2015-03-04 7:59 ` Uwe Kleine-König
2015-03-04 8:01 ` Lee Jones
0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-03-04 7:24 UTC (permalink / raw)
To: linux-arm-kernel
Continue the common pattern in MFD drivers and use set_irq_flags on ARM
and irq_set_noprobe on other architectures. This fixes compilation on
non ARM architecures.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Lee, feel free to squash this into the patch adding mt6397 core support.
Alternatively I could also add some Kconfig dependency to compile this
on ARM only if you are more comfortable with that.
drivers/mfd/mt6397-core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index b61c4eb..09bc780 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -121,7 +121,11 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_set_chip_data(irq, mt6397);
irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq);
irq_set_nested_thread(irq, 1);
+#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID);
+#else
+ irq_set_noprobe(irq);
+#endif
return 0;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mfd: mt6397: Use set_irq_flags only on ARM
2015-03-04 7:24 [PATCH] mfd: mt6397: Use set_irq_flags only on ARM Sascha Hauer
@ 2015-03-04 7:59 ` Uwe Kleine-König
2015-03-09 16:23 ` Russell King - ARM Linux
2015-03-04 8:01 ` Lee Jones
1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2015-03-04 7:59 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
[Cc += tglx, rmk]
On Wed, Mar 04, 2015 at 08:24:29AM +0100, Sascha Hauer wrote:
> Continue the common pattern in MFD drivers and use set_irq_flags on ARM
> and irq_set_noprobe on other architectures. This fixes compilation on
> non ARM architecures.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> Lee, feel free to squash this into the patch adding mt6397 core support.
> Alternatively I could also add some Kconfig dependency to compile this
> on ARM only if you are more comfortable with that.
>
> drivers/mfd/mt6397-core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index b61c4eb..09bc780 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -121,7 +121,11 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
> irq_set_chip_data(irq, mt6397);
> irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq);
> irq_set_nested_thread(irq, 1);
> +#ifdef CONFIG_ARM
> set_irq_flags(irq, IRQF_VALID);
> +#else
> + irq_set_noprobe(irq);
> +#endif
While this is what everyone does, I wonder why ARM is special here.
Has this only historic reasons and needs refurbishment?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mfd: mt6397: Use set_irq_flags only on ARM
2015-03-04 7:59 ` Uwe Kleine-König
@ 2015-03-09 16:23 ` Russell King - ARM Linux
0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2015-03-09 16:23 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 04, 2015 at 08:59:07AM +0100, Uwe Kleine-K?nig wrote:
> While this is what everyone does, I wonder why ARM is special here.
> Has this only historic reasons and needs refurbishment?
We have platforms where we need to ensure that certain interrupts can't
be requested.
Unfortunately, that was never properly dealt with when genirq came
along, and we're pretty much stuck with this situation: going through
and working out what the restrictions were is a much bigger problem
than it was when genirq first happened. I don't see how we could
sanely fix this now.
What we should probably at least do is work out a way that we can kill
that ifdef, so we don't have the same hack appearing in many drivers.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mfd: mt6397: Use set_irq_flags only on ARM
2015-03-04 7:24 [PATCH] mfd: mt6397: Use set_irq_flags only on ARM Sascha Hauer
2015-03-04 7:59 ` Uwe Kleine-König
@ 2015-03-04 8:01 ` Lee Jones
1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2015-03-04 8:01 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 04 Mar 2015, Sascha Hauer wrote:
> Continue the common pattern in MFD drivers and use set_irq_flags on ARM
> and irq_set_noprobe on other architectures. This fixes compilation on
> non ARM architecures.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> Lee, feel free to squash this into the patch adding mt6397 core support.
> Alternatively I could also add some Kconfig dependency to compile this
> on ARM only if you are more comfortable with that.
This solution is fine. I'm going to squash this patch.
Thanks for fixing.
> drivers/mfd/mt6397-core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index b61c4eb..09bc780 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -121,7 +121,11 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
> irq_set_chip_data(irq, mt6397);
> irq_set_chip_and_handler(irq, &mt6397_irq_chip, handle_level_irq);
> irq_set_nested_thread(irq, 1);
> +#ifdef CONFIG_ARM
> set_irq_flags(irq, IRQF_VALID);
> +#else
> + irq_set_noprobe(irq);
> +#endif
>
> return 0;
> }
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-09 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 7:24 [PATCH] mfd: mt6397: Use set_irq_flags only on ARM Sascha Hauer
2015-03-04 7:59 ` Uwe Kleine-König
2015-03-09 16:23 ` Russell King - ARM Linux
2015-03-04 8:01 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).