Skip to contentSkip to conversation

Reuse of spi_transfer and spi_message structures for cyclic communication with SPI devices?

DISCUSSION wzab 1 participant 1 message May 17, 2011

lore
Share & tools
lore

wzab

author
#0 lore raw

Hi,

I'm writing a device driver for data acquisition system using A/D converters connected via SPI interface.
To allow flexible ordering of received data, the content of spi_transfer structures ans spi_message structures must be set-up in quite sophisticate way before the transfer may be started.
Refilling of those structures in each sampling cycle will be very time consuming. I'd prefer to reuse the same structures again and again, but I can't find any info in the kernel if I'm allowed to.

The documentation suggests to zero spi_transfer ans spi_message before filling, but doesn't state if they may be used multiple times with the same I/O buffers without zeroing and refilling.

Signature · 2 lines
TIA & Regards,
Wojtek Zabolotny