lkml.org 
[lkml]   [2008]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add Dallas DS1390 RTC chip
David Brownell wrote:
> On Friday 17 October 2008, Mark Jackson wrote:
>>>> + /* Can tx_buf and rx_buf be equal? The doc in spi.h is not sure... */
>>>> + xfer.tx_buf = chip->tx_buf;
>>>> + xfer.rx_buf = chip->rx_buf;
>>> you use the same buffer a few functions below. either
>>> one way or the other. please investigate with the spi subsystem maintainer.
>> David,
>>
>> Just to double check (as per Alessandro's suggestion), is this okay use of the
>> spi buffers ?
>
> Yes. That comment deserves to be updated.
>
> SPI does bi-directional I/O, and the underlying controller
> should be able to just replace the contents of a buffer
> with a spi_transfer that uses the same rx and tx buffers.

Excellent. Thanks for the confirmation.

Regards
Mark


\
 
 \ /
  Last update: 2008-10-17 21:31    [W:0.035 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site