spi: Inquiry Regarding Linux Kernel SPI Subsystem device drivers

Subhashini Rao Beerisetty subhashbeerisetty at gmail.com
Fri May 10 15:09:50 EDT 2024


Hi all,

I hope this email finds you well. I am new to the Linux kernel SPI
subsystem, I am currently in the process of learning about its
functionalities and intricacies. I have a few doubts and questions
that I would like to clarify, and I am hoping you could provide some
assistance.

As I understand it, the Linux kernel SPI subsystem supports two main
types of SPI drivers: SPI controller drivers and SPI protocol drivers.
Much like the USB Skeleton driver (drivers/usb/usb-skeleton.c) serves
as an excellent reference example for new engineers developing USB
device drivers, I am wondering if there exists a similar skeleton
driver for both SPI controller and SPI protocol drivers within the
Linux kernel tree. Would it be possible for you to share any reference
code or examples for these drivers?

Additionally, I am curious about the interaction between user space
applications and SPI hardware devices on the target side through the
SPI protocol driver. Could you please clarify if user space
applications communicate with the hardware device on the target side
via the SPI protocol driver running on the host side?

Furthermore, I would like to inquire about the availability of an SPI
library for user space applications, similar to libusb for USB
communication. Does the SPI subsystem provide any such library, or do
user space applications communicate directly with the SPI protocol or
controller driver through system call?

Your insights into these matters would be immensely helpful for my
understanding of the Linux kernel SPI subsystem. Thank you very much
for your time and consideration.



Thank You!



More information about the Kernelnewbies mailing list