Lines Matching +full:spi +full:- +full:lsb +full:- +full:first

2 SPI userspace API
5 SPI devices have a limited userspace API, supporting basic half-duplex
6 read() and write() access to SPI slave devices. Using ioctl() requests,
15 #include <linux/spi/spidev.h>
19 * Prototyping in an environment that's not crash-prone; stray pointers
23 as SPI slaves, which you may need to change quite often.
33 The spidev driver contains lists of SPI devices that are supported for
36 The following are the SPI device tables supported by the spidev driver:
38 - struct spi_device_id spidev_spi_ids[]: list of devices that can be
42 - struct of_device_id spidev_dt_ids[]: list of devices that can be
46 - struct acpi_device_id spidev_acpi_ids[]: list of devices that can
50 You are encouraged to add an entry for your SPI device name to relevant
52 post a patch for spidev to the linux-spi@vger.kernel.org mailing list.
54 It used to be supported to define an SPI device using the "spidev" name.
56 is no longer supported by the Linux kernel and instead a real SPI device
59 Not having a real SPI device name will lead to an error being printed and
66 echo spidev > /sys/bus/spi/devices/spiB.C/driver_override
67 echo spiB.C > /sys/bus/spi/drivers/spidev/bind
69 When the spidev driver is bound to a SPI device, the sysfs node for the
74 For a SPI device with chipselect C on bus B, you should see:
82 as usual, the SPI device node will
83 be a child of its SPI master controller.
98 by having kernel code remove the SPI device, probably by removing the driver
99 for its SPI controller (so its spi_master vanishes).
101 Since this is a standard Linux device driver -- even though it just happens
102 to expose a low level API to userspace -- it can be associated with any number
104 SPI device, and you'll get a /dev device node for each device.
112 Standard read() and write() operations are obviously only half-duplex, and
113 the chipselect is deactivated between those operations. Full-duplex access,
114 and composite operation without chipselect de-activation, is available using
122 return (RD) or assign (WR) the SPI transfer mode. Use the constants
126 Note that this request is limited to SPI mode flags that fit in a
131 which will return (RD) or assign (WR) the full SPI transfer mode,
137 transfer SPI words. Zero indicates MSB-first; other values indicate
138 the less common LSB-first encoding. In both cases the specified value
139 is right-justified in each word, so that unused (TX) or undefined (RX)
145 each SPI transfer word. The value zero signifies eight bits.
149 u32 which will return (RD) or assign (WR) the maximum SPI transfer
155 - At this time there is no async I/O support; everything is purely
158 - There's currently no way to report the actual bit rate used to
161 - From userspace, you can't currently change the chip select polarity;
162 that could corrupt transfers to other devices sharing the SPI bus.
163 Each SPI device is deselected when it's not in active use, allowing
166 - There's a limit on the number of bytes each I/O request can transfer
167 to the SPI device. It defaults to one page, but that can be changed
170 - Because SPI has no low-level transfer acknowledgement, you usually
171 won't see any I/O errors when talking to a non-existent device.
183 The example shows one half-duplex RPC-style request and response message.