Device Driver Model (DM) Documentation Index
This directory contains comprehensive documentation for RT-Thread's Device Driver Model and related subsystems.
Core Documentation
Module-Specific Documentation
Power Management
Regulator Framework
Status: ✅ Complete
Topics Covered:
- Consumer API with complete examples
- Provider (driver) implementation guide
- Device tree bindings (fixed, GPIO, SCMI)
- Best practices and troubleshooting
- Performance considerations
Clock Framework
- clk/ - Clock Management Framework
Status: 📝 To Be Documented
Planned Topics:
- Clock consumer API
- Clock provider implementation
- Clock tree management
- Fixed-rate, PLL, mux, divider clocks
- Device tree bindings
Pin Control
- pinctrl/ - Pin Multiplexing and Configuration
Status: 📝 To Be Documented
Planned Topics:
- Pin configuration API
- Pin multiplexing
- Pin control driver implementation
- Device tree bindings
Reset Controller
- reset/ - Reset Controller Framework
Status: 📝 To Be Documented
Planned Topics:
- Reset consumer API
- Reset provider implementation
- Device tree bindings
Power Domain
- pmdomain/ - Power Domain Management
Status: 📝 To Be Documented
Planned Topics:
- Power domain consumer API
- Power domain provider implementation
- Domain hierarchy
- Device tree bindings
Interrupt and Timing
Platform Interrupt Controller
- pic/ - Platform Interrupt Controller
Status: 📝 To Be Documented
Planned Topics:
- IRQ domain management
- IRQ mapping
- PIC driver implementation
Hardware Timer
- hwtimer/ - Hardware Timer Framework (with DM support)
Status: 📝 To Be Documented
Planned Topics:
- Timer API with DM
- Timer driver implementation
- Device tree bindings
Storage and Memory
NVMEM
- nvmem/ - Non-Volatile Memory Framework
Status: 📝 To Be Documented
Planned Topics:
- NVMEM consumer API
- NVMEM provider implementation
- EEPROM, OTP, eFuse support
- Device tree bindings
Block Devices
- block/ - Block Device Layer (with DM support)
Status: 📝 To Be Documented
Planned Topics:
- Block device API with DM
- Partition support
- Device tree bindings
MTD
- mtd/ - Memory Technology Device (with DM support)
Status: 📝 To Be Documented
Planned Topics:
- MTD framework with DM
- NOR/NAND flash support
- Device tree bindings
Communication
Mailbox
- mailbox/ - Mailbox/Doorbell Framework
Status: 📝 To Be Documented
Planned Topics:
- Mailbox consumer API
- Mailbox controller driver
- Inter-processor communication
- Device tree bindings
DMA
- dma/ - DMA Engine Framework
Status: 📝 To Be Documented
Planned Topics:
- DMA consumer API
- DMA controller driver
- DMA transfer types
- Device tree bindings
Bus Controllers
PCI
Status: 📝 To Be Documented
Planned Topics:
- PCI device enumeration
- PCI driver implementation
- PCIe host controller
- Device tree bindings
I2C (DM Extensions)
- i2c/ - I2C with DM Support
Status: 📝 To Be Documented
Planned Topics:
- I2C with device tree
- I2C controller driver with DM
SPI (DM Extensions)
- spi/ - SPI with DM Support
Status: 📝 To Be Documented
Planned Topics:
- SPI with device tree
- SPI controller driver with DM
Specialized Hardware
Thermal Management
- thermal/ - Thermal Management Framework
Status: 📝 To Be Documented
Planned Topics:
- Thermal zone management
- Thermal cooling devices
- Trip points
- Device tree bindings
Multi-Function Device
- mfd/ - Multi-Function Device Framework
Status: 📝 To Be Documented
Planned Topics:
- MFD parent device
- Sub-device registration
- Shared resources
- Device tree bindings
Industrial I/O
- iio/ - Industrial I/O Subsystem
Status: 📝 To Be Documented
Planned Topics:
- IIO device framework
- Channels and attributes
- Buffered data capture
- Device tree bindings
PHY Framework
- phy/ - Physical Layer Framework
Status: 📝 To Be Documented
Planned Topics:
- PHY consumer API
- PHY provider implementation
- USB, PCIe, SATA PHY support
- Device tree bindings
Ethernet PHY
- phye/ - Ethernet PHY Framework
Status: 📝 To Be Documented
Planned Topics:
- Ethernet PHY management
- MDIO bus
- PHY drivers
- Device tree bindings
System Support
Open Firmware (OFW)
- ofw/ - Device Tree Support
Status: ⚠️ Partially Documented
Existing: ../ofw/dtc.md
Additional Planned Topics:
- FDT parsing internals
- OFW API reference
- Property reading helpers
- IRQ and address translation
Firmware
- firmware/ - Firmware Framework
Status: 📝 To Be Documented
Planned Topics:
- ARM SCMI support
- Firmware loading
- Device tree bindings
Hardware Cache
- hwcache/ - Hardware Cache Management
Status: 📝 To Be Documented
Planned Topics:
- Cache controller framework
- L2/L3 cache management
Hardware Spinlock
- hwspinlock/ - Hardware Spinlock
Status: 📝 To Be Documented
Planned Topics:
- Hardware spinlock API
- Multi-core synchronization
Documentation Standards
All module documentation should include:
Introduction
- General concept overview
- RT-Thread specific implementation
- Use cases
Kconfig Configuration
- All configuration options
- Menuconfig location
- Dependencies
Device Tree Bindings
- Standard properties
- Example DTS nodes
- Consumer usage examples
Application Layer API
- Complete function reference
- Parameter descriptions
- Return values
- Usage examples
Driver Implementation Guide
- Key structures
- Operations to implement
- Complete driver examples
- Best practices
Comprehensive Examples
- Real-world use cases
- Complete working code
- Error handling patterns
Troubleshooting
- Common issues
- Debugging tips
- Performance considerations
Architecture Diagrams (SVG)
- Component relationships
- Data flow
- Clear and professional formatting
Contributing
When adding new module documentation:
- Follow the structure established by the regulator documentation
- Include both English and Chinese versions
- Provide complete, tested code examples
- Create clear SVG diagrams
- Cross-reference related modules
- Update this INDEX.md file
Status Legend
- ✅ Complete - Full documentation available
- ⚠️ Partial - Some documentation exists, needs completion
- 📝 To Be Documented - Planned but not yet created
- 🚧 In Progress - Currently being written
Priority Modules
Based on usage frequency and importance:
- ✅ regulator - Complete
- clk - High priority (power management)
- pinctrl - High priority (hardware configuration)
- reset - High priority (hardware control)
- ofw - High priority (device tree)
- pic - Medium priority (interrupt handling)
- dma - Medium priority (data transfer)
- nvmem - Medium priority (persistent data)
- mailbox - Medium priority (IPC)
- thermal - Medium priority (power management)
Other modules follow based on community needs and hardware support requirements.
Related Documentation
External References