I am currently reading the Linux Module Programming Guide, and I came across two terms that confused the device file bits and the device driver. When studying these terms, I came across the following:
A device driver is a piece of software that controls or controls a particular type of device.
A device file is an interface for a device driver that appears in the file system as if it were a regular file. On Unix-like operating systems, they are usually located in the / dev directory and are also called device nodes.
What I would like to know -
1) Are device files an interface between user space programs and a device driver? 2) Does the program provide access to the driver in the kernel through a special file of the corresponding device?
for example, when using the spidev char dev file, does my user space program allow me to interact with spi.c and omap2_mcspi.c, etc. using simple read, write, and ioctl calls?
source share