On Wed, Aug 05, 2015 at 06:24:05PM +0800, Nicolas Boichat wrote:
> Anyway, the "safer" way to fix this would be to keep the
> prepare/unprepare functions, busy variable, and just protect it with a
> mutex instead of a spinlock...
OK, that seems reasonable.
signature.asc
Description: Digital sig
On Tue, Aug 4, 2015 at 6:59 PM, Mark Brown wrote:
> On Tue, Aug 04, 2015 at 02:09:56PM +0800, Nicolas Boichat wrote:
[snip]
>> Actually, I'm not sure if I understand the existing code: why are we not
>> waiting for busy to go down to 0, then call chipselect, instead of not
>> calling
>> it at all
On Tue, Aug 04, 2015 at 02:09:56PM +0800, Nicolas Boichat wrote:
> Enabling CONFIG_DEBUG_ATOMIC_SLEEP in kernel configuration, we get
> this warning in spi_gpio_setup:
> [1.177747] BUG: sleeping function called from invalid context at
> drivers/gpio/gpiolib.c:1431
> [1.190182] in_atomic():
Enabling CONFIG_DEBUG_ATOMIC_SLEEP in kernel configuration, we get
this warning in spi_gpio_setup:
[1.177747] BUG: sleeping function called from invalid context at
drivers/gpio/gpiolib.c:1431
[1.190182] in_atomic(): 1, irqs_disabled(): 128, pid: 1, name: swapper/0
[1.196922] 3 locks he