On Friday 28 December 2007, chri wrote:
> Hi,
> 
> I'm facing a problem with a driver for a SPI device: I think the
> problem may be more general or perhaps I'm just missing something
> obvious. I want to put a SPI device to sleep and this is done by
> sending a command on the SPI bus. The first place I tried is the
> suspend callback of struct spi_driver.

That's certainly supposed to work ...


> That didn't work, the system 
> deadlocked on suspending (by writting mem to /sys/power/state). I
> guess the reason is that the SPI master driver uses bit banging code
> that relies on workqueues, which are kernel threads that are stopped
> before the suspend callback is invoked. Does this make sense or I'm
> doing something wrong? Any pointer to devices with similar needs for
> going to sleep that I may study?

Hmm, I thought that create_singlethread_workqueue() was
supposed to create non-freezable workqueues ... which won't
be stopped before the suspend() callback dance begins.

Are you sure that's the reason for your deadlock?  Did you
turn on all the debug options and have the kernel report
to you that's what was happening?

- Dave


> 
> Thanks!
> 
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to