[RFC PATCH v3 0/3] Virtio SPI Linux driver compliant to draft spec V10
From: Harald Mommer
Date: Tue Feb 13 2024 - 08:54:43 EST
This is the 3rd RFC version of a virtio SPI Linux driver which is
intended to be compliant with the proposed virtio SPI draft
specification V10.
Changes between 1st and 2nd virtio SPI driver RFC:
- Update from virtio SPI draft specification V4 to V10.
- Incorporate review comments gotten from the community.
A proposal for a performance enhancement having more than only one SPI
message in flight had to be kept out. The more complicated code would
have caused an unacceptable project risk now.
Changes between 2nd and 3rd virtio SPI driver RFC:
- Order header inclusion alphabetically
- Add Viresh Kumar's "signed-off" to the header files
- Rework virtio_spi_one_transfer()
- Rework the delays according to Haixu Cui's advise. Delays are now
handled in a new sub-function virtio_spi_set_delays()
- Minor change: Re-formulate arguments of sg_init_one()
- Rework virtio_spi_probe()
- Replace some goto in error paths by return
- Add spi_unregister_controller() to an error path. Abstained from
using devm_spi_register_controller() to keep order of
de-initialization in virtio_spi_remove().
- Add deletion of vqueue to all error paths taken after the virtqueues
have been initialized
The virtio SPI driver was smoke tested on qemu using OpenSynergy's
proprietary virtio SPI device doing a SPI backend simulation on top of
next-20240213 and an adapted version on Linux 6.5 with target hardware
providing a physical SPI backend device.