mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sdio: add interface for host side SDIO interrupt reporting
Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
112c9db91e
commit
17b759aff9
3 changed files with 18 additions and 1 deletions
|
@ -70,7 +70,8 @@ static int sdio_irq_thread(void *_host)
|
|||
* asynchronous notification of pending SDIO card interrupts
|
||||
* hence we poll for them in that case.
|
||||
*/
|
||||
period = msecs_to_jiffies(10);
|
||||
period = (host->caps & MMC_CAP_SDIO_IRQ) ?
|
||||
MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(10);
|
||||
|
||||
pr_debug("%s: IRQ thread started (poll period = %lu jiffies)\n",
|
||||
mmc_hostname(host), period);
|
||||
|
@ -104,11 +105,16 @@ static int sdio_irq_thread(void *_host)
|
|||
ssleep(1);
|
||||
|
||||
set_task_state(current, TASK_INTERRUPTIBLE);
|
||||
if (host->caps & MMC_CAP_SDIO_IRQ)
|
||||
host->ops->enable_sdio_irq(host, 1);
|
||||
if (!kthread_should_stop())
|
||||
schedule_timeout(period);
|
||||
set_task_state(current, TASK_RUNNING);
|
||||
} while (!kthread_should_stop());
|
||||
|
||||
if (host->caps & MMC_CAP_SDIO_IRQ)
|
||||
host->ops->enable_sdio_irq(host, 0);
|
||||
|
||||
pr_debug("%s: IRQ thread exiting with code %d\n",
|
||||
mmc_hostname(host), ret);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue