mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
Document the new_device and delete_device sysfs attributes on SPI
controllers:
- Documentation/spi/instantiating-devices.rst: describes when and
why this interface is needed, accepted parameters, usage examples,
and limitations.
- Documentation/ABI/testing/sysfs-class-spi-master: formal ABI
entry for both attributes.
Signed-off-by: Vishwaroop A <va@nvidia.com>
Link: https://patch.msgid.link/20260803104614.2548375-3-va@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
What: /sys/class/spi_master/spiB/new_device
|
|
Date: July 2026
|
|
KernelVersion: 7.3
|
|
Contact: linux-spi@vger.kernel.org
|
|
Description: (WO) Instantiate a new SPI device on bus B, where B
|
|
is the bus number (0, 1, 2, ...). Takes parameters
|
|
in the format:
|
|
|
|
<modalias> <chip_select> [<max_speed_hz> [<mode>]]
|
|
|
|
where modalias is the driver name, chip_select is the
|
|
CS line number, and max_speed_hz and mode are optional.
|
|
|
|
The device can later be removed with delete_device.
|
|
|
|
Only devices created via this interface can be removed
|
|
with delete_device; platform and DT devices are not
|
|
affected.
|
|
|
|
Example:
|
|
# echo spidev 0 > /sys/class/spi_master/spi0/new_device
|
|
# echo spidev 0 10000000 > /sys/class/spi_master/spi0/new_device
|
|
# echo spidev 0 10000000 3 > /sys/class/spi_master/spi0/new_device
|
|
|
|
What: /sys/class/spi_master/spiB/delete_device
|
|
Date: July 2026
|
|
KernelVersion: 7.3
|
|
Contact: linux-spi@vger.kernel.org
|
|
Description: (WO) Remove a SPI device previously created via
|
|
new_device. Takes a single parameter: the chip select
|
|
number of the device to remove.
|
|
|
|
Example:
|
|
# echo 0 > /sys/class/spi_master/spi0/delete_device
|