making spi drivers half-duplex/3wire ready

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I messed up the spi transfer stuff in at86rf230 driver. Some people
reported issues with half-duplex and 3wire spi controllers.

The issue is that we use only one tranfer buffer for one message for tx
and rx. I thought the spi subsystem can deal with that and just not
overwrite rx buf position with tx buf position on all other types.

No, what we need to do is:

spi_message_add_tail($TX_ONLY_PART, &state->msg);
spi_message_add_tail($RX_ONLY_PART, &state->msg);

and do TX only and then afterwards RX only. Seems that is what the SPI
subsystem wants then..., otherwise it will fail at [0].

In at86rf230/mrf24j40 only low-level async setup is affected. I hope
regmap can deal with half-duplex/3wire stuff.

Just that everybody is aware about this issue now. :-)

- Alex

[0] http://elixir.free-electrons.com/linux/latest/source/drivers/spi/spi.c#L2610
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux