On Fri, Dec 05, 2025 at 09:40:26PM +0800, Peng Fan (OSS) wrote: >From: Peng Fan <[email protected]> > >spi-virtio registers a SPI controller, but we still need to register a >SPI device to initiate the SPI virtio transfer. > >To Xen hypervisor, there might be no 'passthrough' node for DomU, >so add a sysfs interface to allow creating/deleting a SPI device. > >Usage: > echo "spidev" > /sys/class/spi_master/spi0/new_device > echo "spi0.0" > /sys/class/spi_master/spi0/delete_device >
After rethinking about this, I think it might be better to add the sysfs to all SPI controller just as what i2c core supports: drivers/i2c/i2c-core-base.c: 1264 I will post out v2 to move the code to spi_controller_groups if no objections. Thanks, Peng

