[RFC PATCH v4 0/3] Virtio SPI Linux driver

Haixu Cui posted 3 patches 8 months, 3 weeks ago
There is a newer version of this series
[RFC PATCH v4 0/3] Virtio SPI Linux driver
Posted by Haixu Cui 8 months, 3 weeks ago
This is the 4th RFC version of a virtio SPI Linux driver which is
intended to be compliant with the upcoming virtio specification
version 1.4. The specification can be found in repository
https://github.com/oasis-tcs/virtio-spec.git branch virtio-1.4.
 
Changes between 3rd and 4th virtio SPI driver RFC:
- Remove the logic code for statically creating SPI devices through
  the spi_new_device function.
- Add ACPI support.
- According to Hillf Danton's comment, use init_completion instead of
reinit_completion in virtio_spi_transfer_one function.
 
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.
 
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.
 
The virtio SPI driver was smoke tested on qemu using Qualcomm's
target hardware providing a physical SPI backend device, based on
vhost-user protocol. Take vhost-device-spi as the vhost-user backend
and qemu integrated with vhost-user-spi implementation as the vhost-user
frontend. The Linux version used for testing is 6.12.
Re: [RFC PATCH v4 0/3] Virtio SPI Linux driver
Posted by Haixu Cui 8 months ago
Dear Linux Kernel Developers,

The patch addresses virtio SPI driver and it has been validated
on Linux 6.12 with Qualcomm target hardware.

I kindly request community members with expertise in SPI and virtio 
subsystems or related areas to review the patch. Your expertise and 
feedback would be invaluable in ensuring the quality and effectiveness 
of this contribution.

Thank you very much for your time and consideration.


Best Regrads
Haixu Cui


On 4/1/2025 11:36 AM, Haixu Cui wrote:
> This is the 4th RFC version of a virtio SPI Linux driver which is
> intended to be compliant with the upcoming virtio specification
> version 1.4. The specification can be found in repository
> https://github.com/oasis-tcs/virtio-spec.git branch virtio-1.4.
>   
> Changes between 3rd and 4th virtio SPI driver RFC:
> - Remove the logic code for statically creating SPI devices through
>    the spi_new_device function.
> - Add ACPI support.
> - According to Hillf Danton's comment, use init_completion instead of
> reinit_completion in virtio_spi_transfer_one function.
>   
> 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.
>   
> 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.
>   
> The virtio SPI driver was smoke tested on qemu using Qualcomm's
> target hardware providing a physical SPI backend device, based on
> vhost-user protocol. Take vhost-device-spi as the vhost-user backend
> and qemu integrated with vhost-user-spi implementation as the vhost-user
> frontend. The Linux version used for testing is 6.12.
> 
>