Ulf Hansson
682696605c
mmc: sdio: Add API to manage SDIO IRQs from a workqueue
...
For hosts not supporting MMC_CAP2_SDIO_IRQ_NOTHREAD but MMC_CAP_SDIO_IRQ,
the SDIO IRQs are processed from a dedicated kernel thread. For these
cases, the host calls mmc_signal_sdio_irq() from its ISR to signal a new
SDIO IRQ.
Signaling an SDIO IRQ makes the host's ->enable_sdio_irq() callback to be
invoked to temporary disable the IRQs, before the kernel thread is woken up
to process it. When processing of the IRQs are completed, they are
re-enabled by the kernel thread, again via invoking the host's
->enable_sdio_irq().
The observation from this, is that the execution path is being unnecessary
complex, as the host driver already knows that it needs to temporary
disable the IRQs before signaling a new one. Moreover, replacing the kernel
thread with a work/workqueue would not only greatly simplify the code, but
also make it more robust.
To address the above problems, let's continue to build upon the support for
MMC_CAP2_SDIO_IRQ_NOTHREAD, as it already implements SDIO IRQs to be
processed without using the clumsy kernel thread and without the ping-pong
calls of the host's ->enable_sdio_irq() callback for each processed IRQ.
Therefore, let's add new API sdio_signal_irq(), which enables hosts to
signal/process SDIO IRQs by using a work/workqueue, rather than using the
kernel thread.
Add also a new host callback ->ack_sdio_irq(), which the work invokes when
the SDIO IRQs have been processed. This informs the host about when it
shall re-enable the SDIO IRQs. Potentially, we could re-use the existing
->enable_sdio_irq() callback instead of adding a new one, however it has
turned out that it's more convenient for hosts to get this information via
a separate callback.
Hosts that wants to use this new method to signal/process SDIO IRQs, must
enable MMC_CAP2_SDIO_IRQ_NOTHREAD and implement the ->ack_sdio_irq()
callback.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2017-06-20 10:30:11 +02:00
..
2017-05-04 16:08:52 +05:30
2017-05-08 17:15:13 -07:00
2017-04-25 09:04:29 +02:00
2017-05-23 20:32:10 +02:00
2017-04-12 18:51:01 +02:00
2017-03-23 12:22:32 -07:00
2017-04-08 17:45:28 +02:00
2017-05-22 10:39:11 +02:00
2017-05-02 11:02:41 +02:00
2017-03-13 20:42:34 +00:00
2017-04-05 08:52:33 -07:00
2017-05-24 09:44:07 +02:00
2017-04-21 10:45:01 -04:00
2017-03-28 23:33:30 +05:30
2017-05-08 19:03:25 -07:00
2017-06-04 23:10:05 -04:00
2017-06-01 17:05:04 -04:00
2017-06-20 10:30:11 +02:00
2017-05-11 10:44:22 -07:00
2017-05-15 12:51:38 +02:00
2017-05-16 10:24:27 +02:00
2017-04-11 16:29:54 +01:00
2017-05-22 10:39:10 +02:00
2017-05-11 11:12:26 -07:00
2017-05-01 12:37:29 +02:00
2017-05-04 12:31:02 -04:00
2017-04-30 22:17:36 +09:00
2017-03-28 17:58:07 -07:00
2017-05-08 17:15:15 -07:00
2017-05-10 15:33:45 +02:00
2017-04-26 15:58:22 +01:00
2017-05-16 16:16:30 -04:00
2017-05-23 11:01:28 -04:00
2017-05-09 15:15:47 -07:00
2017-05-09 15:15:47 -07:00
2017-04-28 18:09:59 -04:00
2017-03-30 09:35:54 +02:00
2017-05-02 10:16:05 -04:00
2017-03-02 08:32:46 +01:00
2017-04-20 12:09:55 -06:00
2017-04-20 12:09:55 -06:00
2017-03-03 01:45:23 +01:00
2017-05-01 14:09:21 -07:00
2017-04-08 11:25:38 -06:00
2017-03-29 11:25:48 -06:00
2017-05-22 20:50:11 +02:00
2017-06-14 13:27:50 -06:00
2017-04-11 14:38:43 -04:00
2017-05-11 14:19:00 -04:00
2017-04-11 14:38:43 -04:00
2017-03-13 21:51:49 -07:00
2017-04-26 23:54:06 -04:00
2017-03-30 09:37:20 +02:00
2017-04-05 21:57:07 +08:00
2017-03-21 06:44:32 +01:00
2017-05-17 16:58:32 -04:00
2017-05-24 12:43:30 -04:00
2017-04-02 14:31:49 -06:00
2017-05-01 16:15:18 -07:00
2017-04-20 14:56:58 +02:00
2017-04-18 20:41:12 +02:00
2017-04-20 12:09:55 -06:00
2017-05-03 08:50:52 -07:00
2017-06-11 15:51:56 -07:00
2017-03-01 20:32:25 +01:00
2017-06-12 13:20:20 +02:00
2017-04-18 18:01:52 +02:00
2017-03-16 09:51:10 +01:00
2017-03-02 08:42:40 +01:00
2017-04-17 18:37:27 +02:00
2017-04-11 16:29:54 +01:00
2017-05-08 17:15:11 -07:00
2017-04-11 08:57:54 +09:00
2017-05-08 17:15:11 -07:00
2017-03-02 08:42:31 +01:00
2017-04-10 19:17:27 +08:00
2017-03-24 22:02:56 +08:00
2017-05-13 17:52:16 -07:00
2017-03-02 08:42:24 +01:00
2017-03-07 14:15:27 -08:00
2017-04-08 17:59:23 +02:00
2017-03-03 01:45:28 +01:00
2017-03-06 22:06:59 +01:00
2017-05-05 15:54:45 +08:00
2017-04-12 12:42:14 +09:00
2017-05-05 18:49:20 -07:00
2017-03-16 16:56:19 -07:00
2017-04-26 23:57:53 +02:00
2017-04-20 13:47:46 +05:30
2017-03-17 23:51:36 +05:30
2017-04-18 11:42:36 -07:00
2017-05-30 11:25:45 +02:00
2017-04-20 16:31:06 +02:00
2017-03-02 08:42:38 +01:00
2017-06-15 13:46:00 +02:00
2017-04-10 17:15:02 +02:00
2017-04-05 12:27:25 +02:00
2017-04-05 12:27:28 +02:00
2017-06-06 11:20:47 -06:00
2017-05-08 17:15:11 -07:00
2017-03-02 08:42:36 +01:00
2017-03-21 18:44:17 -07:00
2017-03-12 23:54:07 -07:00
2017-03-09 16:39:58 -08:00
2017-04-04 11:22:42 +09:00
2017-05-03 10:04:56 -07:00
2017-03-03 01:45:28 +01:00
2017-04-27 05:13:04 -04:00
2017-05-25 13:44:28 -04:00
2017-03-29 14:50:21 -06:00
2017-03-01 20:32:25 +01:00
2017-05-12 15:57:15 -07:00
2017-04-30 01:26:34 -04:00
2017-05-04 11:44:37 -04:00
2017-05-04 11:44:41 -04:00
2017-04-10 17:37:36 +02:00
2017-05-08 17:15:13 -07:00
2017-03-29 00:00:29 +02:00
2017-04-21 14:17:27 -06:00
2017-06-02 15:07:37 -07:00
2017-03-21 10:15:47 +02:00
2017-04-08 15:13:36 +01:00
2017-03-25 16:32:24 +00:00
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112', 'for-4.12/hid-core-null-state-handling', 'for-4.12/hiddev', 'for-4.12/i2c-hid', 'for-4.12/innomedia', 'for-4.12/logitech-hidpp-battery-power-supply', 'for-4.12/multitouch', 'for-4.12/nti', 'for-4.12/upstream' and 'for-4.12/wacom' into for-linus
2017-05-02 11:01:10 +02:00
2017-03-21 15:24:01 +01:00
2017-04-05 18:11:48 +02:00
2017-04-14 21:49:56 +02:00
2017-03-09 11:48:47 -08:00
2017-04-02 07:01:53 -07:00
2017-05-04 19:15:35 -07:00
2017-05-03 12:38:20 -07:00
2017-04-20 12:16:10 -06:00
2017-04-28 12:28:45 +02:00
2017-04-27 16:34:29 -04:00
2017-05-24 16:27:14 -04:00
2017-04-04 09:48:23 -06:00
2017-03-28 22:32:42 -07:00
2017-05-03 08:50:52 -07:00
2017-03-24 20:51:49 -04:00
2017-03-22 15:42:17 +01:00
2017-04-18 13:40:00 -05:00
2017-04-19 13:58:51 -05:00
2017-04-25 13:20:46 -07:00
2017-05-04 18:06:17 +02:00
2017-03-23 00:06:17 +01:00
2017-05-08 17:15:12 -07:00
2017-03-22 14:20:54 -07:00
2017-03-06 14:40:04 +00:00
2017-05-03 15:52:09 -07:00
2017-06-02 15:07:37 -07:00
2017-03-07 09:37:28 -08:00
2017-03-31 17:13:30 -07:00
2017-04-23 15:51:26 +09:00
2017-05-02 15:53:46 -07:00
2017-05-08 17:15:11 -07:00
2017-04-04 14:10:11 -07:00
2017-06-09 13:29:48 +10:00
2017-03-02 08:42:28 +01:00
2017-03-22 20:11:35 -06:00
2017-05-17 21:50:27 -04:00
2017-05-08 17:15:14 -07:00
2017-05-03 15:52:10 -07:00
2017-05-10 11:29:23 -07:00
2017-04-19 20:27:50 +02:00
2017-03-08 21:10:01 +01:00
2017-05-04 14:01:24 -07:00
2017-04-16 10:06:25 -06:00
2017-03-09 13:27:17 -08:00
2017-03-08 09:38:43 +01:00
2017-03-16 09:57:07 +01:00
2017-03-02 12:17:22 -08:00
2017-03-28 11:05:14 +11:00
2017-06-02 15:07:38 -07:00
2017-05-03 15:52:11 -07:00
2017-05-03 15:52:10 -07:00
2017-03-03 01:45:25 +01:00
2017-03-13 14:59:22 +01:00
2017-06-19 21:50:20 +08:00
2017-04-13 18:24:21 -07:00
2017-06-02 15:07:38 -07:00
2017-05-23 10:04:41 +02:00
2017-05-03 19:12:27 -07:00
2017-04-04 16:54:21 +01:00
2017-04-24 14:30:46 -04:00
2017-04-21 14:05:36 -04:00
2017-05-10 21:46:22 -07:00
2017-04-17 13:01:48 -04:00
2017-04-14 10:05:36 +02:00
2017-06-14 15:14:51 -04:00
2017-05-03 09:51:24 -04:00
2017-05-10 13:03:38 -07:00
2017-04-26 13:03:04 -04:00
2017-04-21 10:45:01 -04:00
2017-05-08 19:01:06 -04:00
2017-03-03 01:43:38 +01:00
2017-05-20 10:11:34 -06:00
2017-04-04 09:48:23 -06:00
2017-04-21 16:41:47 +02:00
2017-05-09 15:15:47 -07:00
2017-05-09 22:55:58 +10:00
2017-04-07 12:23:29 +02:00
2017-05-11 10:26:22 -05:00
2017-03-24 12:51:04 -07:00
2017-03-14 15:10:11 -05:00
2017-05-22 18:01:46 +02:00
2017-05-05 11:36:44 -07:00
2017-03-02 08:42:29 +01:00
2017-05-08 17:15:10 -07:00
2017-03-28 08:23:27 +02:00
2017-04-28 10:23:19 -05:00
2017-04-18 14:21:04 -05:00
2017-04-11 14:18:36 -05:00
2017-04-11 14:18:37 -05:00
2017-04-11 14:18:37 -05:00
2017-05-26 10:51:18 -07:00
2017-04-04 17:49:49 +01:00
2017-03-22 19:18:43 -07:00
2017-03-16 09:57:08 +01:00
2017-03-30 09:55:35 +02:00
2017-03-02 08:42:36 +01:00
2017-04-26 22:39:08 -04:00
2017-03-02 08:42:38 +01:00
2017-05-09 10:01:15 -07:00
2017-03-03 00:43:11 +01:00
2017-05-05 22:54:28 +02:00
2017-04-25 13:20:46 -07:00
2017-04-17 12:52:22 -04:00
2017-04-14 21:49:54 +02:00
2017-04-14 21:49:56 +02:00
2017-03-03 01:43:47 +01:00
2017-05-08 17:15:11 -07:00
2017-05-08 17:15:12 -07:00
2017-03-29 00:00:29 +02:00
2017-03-07 14:01:02 -08:00
2017-05-09 16:43:23 +03:00
2017-05-23 07:40:44 -05:00
2017-03-10 20:55:09 +01:00
2017-03-28 16:03:21 -05:00
2017-05-24 18:24:07 -04:00
2017-03-28 08:54:48 +02:00
2017-04-18 11:38:20 -07:00
2017-05-02 06:29:22 -07:00
2017-03-09 13:27:17 -08:00
2017-04-19 09:29:18 -07:00
2017-03-02 08:42:24 +01:00
2017-05-10 10:30:46 -07:00
2017-04-21 05:59:27 -07:00
2017-04-21 05:59:27 -07:00
2017-03-13 07:41:08 +01:00
2017-04-04 17:36:10 +02:00
2017-05-01 16:22:40 -04:00
2017-05-01 10:26:40 -04:00
2017-05-03 15:52:10 -07:00
2017-05-03 15:52:09 -07:00
2017-04-09 14:45:21 -07:00
2017-04-14 14:06:52 -06:00
2017-05-05 18:16:23 -07:00
2017-03-28 11:05:14 +11:00
2017-05-08 17:15:12 -07:00
2017-05-18 17:38:24 +02:00
2017-04-08 18:51:57 +02:00
2017-03-25 10:37:26 -07:00
2017-03-03 01:43:48 +01:00
2017-04-17 21:53:19 -05:00
2017-03-02 08:42:29 +01:00
2017-05-02 16:40:27 -07:00
2017-04-18 11:42:36 -07:00
2017-03-26 15:09:45 +02:00
2017-03-23 17:01:02 -07:00
2017-06-08 08:25:19 -07:00
2017-04-26 11:23:28 -07:00
2017-04-26 11:23:28 -07:00
2017-04-26 16:32:17 -07:00
2017-03-08 09:18:02 +01:00
2017-04-03 01:06:00 -04:00
2017-03-22 12:15:15 -07:00
2017-05-05 18:49:20 -07:00
2017-06-07 00:57:37 +02:00
2017-05-03 15:52:11 -07:00
2017-03-02 20:51:15 -05:00
2017-04-16 23:42:49 -05:00
2017-03-24 20:34:39 -06:00
2017-03-02 08:42:29 +01:00
2017-04-26 14:44:39 -04:00
2017-03-09 15:42:33 +01:00
2017-05-02 10:45:15 -07:00
2017-03-23 02:12:14 +01:00
2017-05-08 17:15:15 -07:00
2017-04-14 21:49:55 +02:00
2017-03-03 01:45:39 +01:00
2017-04-03 22:46:02 +03:00
2017-03-24 20:51:50 -04:00
2017-04-10 15:22:17 -04:00
2017-05-18 17:38:24 +02:00
2017-04-19 09:29:17 -07:00
2017-05-08 17:15:14 -07:00
2017-04-01 20:11:36 -07:00
2017-04-08 18:13:27 +02:00
2017-04-02 12:10:47 -04:00
2017-04-18 16:54:19 +02:00
2017-03-06 15:26:37 -06:00
2017-03-09 17:01:10 -08:00
2017-05-02 23:41:43 +03:00
2017-05-02 23:41:43 +03:00
2017-04-24 12:35:56 -04:00
2017-05-09 16:43:22 +03:00
2017-05-03 15:52:08 -07:00
2017-03-02 08:42:25 +01:00
2017-05-12 15:57:15 -07:00
2017-03-17 15:10:49 +09:00
2017-03-08 10:36:03 -08:00
2017-04-15 12:20:53 +02:00
2017-03-22 20:11:33 -06:00