]> git.sur5r.net Git - u-boot/commit
spi: soft_spi: Support NULL din/dout buffers
authorAndrew Ruder <andrew.ruder@elecsyscorp.com>
Thu, 24 Apr 2014 18:39:32 +0000 (13:39 -0500)
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Sun, 8 Jun 2014 17:42:27 +0000 (23:12 +0530)
commitc1c0dd2644d6bdd64f5d36528d801d14832f6394
treee00eeb8db9318ad294b18f9349a5fe60539d0975
parent04728086088e2dcc37ae0512a521246b21389838
spi: soft_spi: Support NULL din/dout buffers

This mirrors the conventions used in other SPI drivers (kirkwood,
davinci, atmel, et al) where the din/dout buffer can be NULL when the
received/transmitted data isn't important.  This reduces the need for
allocating additional buffers when write-only/read-only functionality is
needed.

In the din == NULL case, the received data is simply not stored.  In the
dout == NULL case, zeroes are transmitted.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
drivers/spi/soft_spi.c