Searched hist:ea9103186d0508cfbd665a04d2773514e336fa72 (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/iio/adc/ |
H A D | mcp320x.c | diff ea9103186d0508cfbd665a04d2773514e336fa72 Sat Sep 09 20:32:41 CEST 2017 Lukas Wunner <lukas@wunner.de> iio: adc: mcp320x: Speed up readout of single-channel ADCs
Single-channel converters such as mcp3001, mcp3201, mcp3301 and the upcoming mcp3550/1/3 lack a MOSI pin, so there's no need to call mcp320x_channel_to_tx_data() for them.
Moreover, instead of calling spi_read() for these converters, which generates an spi_message and spi_transfer on the stack on every readout, it's more efficient to use the spi_message and spi_transfer[] included in struct mcp320x (as we do for multi-channel ADCs), but initialize the spi_message only with the receive transfer.
Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|