Messages in this thread |  | | | Date | Tue, 26 Jun 2012 02:56:17 +0800 | | Subject | Re: [PATCH] spi: Unlock a spinlock before calling into the controller driver. | | From | Linus Walleij <> |
| |
On Tue, Jun 26, 2012 at 1:07 AM, Doug Anderson <dianders@chromium.org> wrote:
> Specifically there should be only one instance of spi_pump_messages() > running at a time per master. That's because it's a kthread work > function. ...so we can't possibly get a prepare in the middle of the > unprepare when prepare is called because the only caller to > prepare/unprepare is spi_pump_messages().
Yes that's how the message pump is designed.
> I can't comment on whether it's better to do something like add a > workqueue (which might be more obvious / less fragile) or just to add > a comment. I will let others comment on that. :)
The message pump initially used a workqueue, but was converted to a kthread because we needed to push the queue to run as realtime for some important low-latency workloads across SPI. The code is basically a tweaked workqueue if you dive down in the implementation.
Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |