mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
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>
This commit is contained in:
parent
d2f4d47d84
commit
341b7cde6c
5 changed files with 32 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue