Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3468: capsules: spi_controller: Don't provide read buffer for write ops r=bradjc a=alistair23 ### Pull Request Overview The SPI HIL uses a single `read_write_bytes()` function which is used for both reading/writing. The `read_buffer` is optional if the caller just wants to write data and doesn't care about reading any data back they can provide `None` The current userspace capsule always supplies a read buffer, even if userspace doesn't want to perform a read. This results in the data being read from the bus, passed back to the capsule and then not being used. To avoid reading and copying data that was never requested, let's avoid passing the read buffer to the HIL implemenation if userspace doesn't want to read the data. This way implementations can avoid copying the data from the bus when it isn't going to be used. ### Testing Strategy Running SPI operations ### TODO or Help Wanted N/A ### Documentation Updated - [X] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [X] Ran `make prepush`. Co-authored-by: Alistair Francis <alistair.francis@wdc.com>
- Loading branch information