[LNX007] Linux Device Driver Model: Device-Bus-Driver

[LNX007] Linux Device Driver Model: Device-Bus-Driver

Main Content 1. sysfs and kobject 2. device-bus-driver 2.1 bus_type 2.2 class and device_type 2.3 device/driver and sysfs 2.4 device and driver matching This article is based on the analysis of Linux version 6.6.92 1. sysfs and kobject sysfs is a virtual file system in the Linux kernel, its main function is to provide a … Read more

Advanced Device Tree (Part 4): Practical Linux Debugging

Advanced Device Tree (Part 4): Practical Linux Debugging

1. Device Tree in the sys Filesystem 1.1 /sys/firmware/devicetree/base The Linux kernel exports device tree information to the<span>/sys/firmware/devicetree/base</span> directory, providing a user-space access interface. Directory Structure: /sys/firmware/devicetree/base/ ├── compatible ├── model ├── #address-cells ├── #size-cells ├── cpus/ │ ├── cpu@0/ │ └── cpu@1/ ├── memory@80000000/ ├── soc/ │ ├── i2c@10002000/ │ ├── uart@10009000/ │ └── … Read more

Overview of the Linux sysfs System

Overview of the Linux sysfs System

Linux sysfs System 1. Overview: What is sysfs? <span>/sys</span> directory is a virtual file system provided by the kernel through the <span>sysfs</span> file system. It was introduced in the 2.6 kernel and is similar to <span>procfs</span> (<span>/proc</span>) but has different design purposes: • Purpose: To display the hierarchy of kernel objects (kobject), along with their … Read more

Sharing My PPT on the Linux Bus, Device, and Driver Model from a Few Years Ago

Sharing My PPT on the Linux Bus, Device, and Driver Model from a Few Years Ago

Sharing my PPT on the “Linux Bus, Device, and Driver Model” from a few years ago, which explains why Linux is designed this way, the reasons behind it, and its main design principles.1. An imagined Ethernet controller/a board 2. Decoupling 3. Unified binding 4. Bus, device, driver 5. Matching 6. Devices are devices, drivers are … Read more

Basics of Linux Drivers | sys Filesystem

Basics of Linux Drivers | sys Filesystem

Click on the above“Linux Notes”, select“Pin/Star the Official Account” Welfare and valuable content delivered promptly Introduction Considerations Introduction to sys Filesystem What is the sys Filesystem Description of sys Filesystem Functions sysfs and Object Using sysfs Interface Examples of sysfs Read/Write Operations Common sysfs Interfaces Common sysfs Structures Code Experiment Conclusion Introduction The previous article … Read more

Linux Device Model: Architecture Of Driver World

Linux Device Model: Architecture Of Driver World

Hello, I am Lao Wu. Does every ambitious person feel that they can work a little harder? In the end, if the goal is not achieved, the reason for failure can always be attributed to “not trying a little harder”. However, the biggest misconception about effort is: the longer the time and the more painful … Read more

Understanding Character Device Drivers and Their Relationships

Understanding Character Device Drivers and Their Relationships

In the process of developing Linux device drivers, one naturally encounters concepts and technologies related to character device drivers, platform device drivers, device driver models, and sysfs. This can be quite confusing for beginners, and even for engineers with a certain foundation in Linux, it is relatively commendable to have a good understanding of these … Read more