aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2011-05-02 12:42:41 +0800
committerAndy Green <andy.green@linaro.org>2011-05-02 12:42:41 +0800
commitfce4114144db86c450a63386233b34570b72479b (patch)
tree8f14d15ff8556d1243e52c51bfb4bc39dc180b95 /include
parent4820d766c93b2dce5477f6fe0f934dba945d9f13 (diff)
wl12xx: Handle platforms without level trigger interrupts
Some platforms are incapable of triggering on level interrupts. Add a platform quirks member in the platform data structure, as well as an edge interrupt quirk which can be set on such platforms. When the interrupt is requested with IRQF_TRIGGER_RISING, IRQF_ONESHOT cannot be used, as we might miss interrupts that occur after the FW status is cleared and before the threaded interrupt handler exits. Moreover, when IRQF_ONESHOT is not set, iterating more than once in the threaded interrupt handler introduces a few race conditions between this handler and the hardirq handler. Currently this is worked around by limiting the loop to one iteration only. This workaround has an impact on performance. To remove to this restriction, the race conditions will need to be addressed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/wl12xx.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
index c1a743ea747..4b697395326 100644
--- a/include/linux/wl12xx.h
+++ b/include/linux/wl12xx.h
@@ -53,8 +53,12 @@ struct wl12xx_platform_data {
bool use_eeprom;
int board_ref_clock;
int board_tcxo_clock;
+ unsigned long platform_quirks;
};
+/* Platform does not support level trigger interrupts */
+#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
+
#ifdef CONFIG_WL12XX_PLATFORM_DATA
int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);