Day33 Log - Minimal IIO Driver¶
Summary¶
Implemented a minimal IIO driver using a platform device.
Key features:
- Single voltage channel
- RAW and SCALE attributes
- Direct mode (no buffer)
Issues Encountered¶
1. Unknown symbol error¶
Cause:
- IIO core module not loaded
Solution:
2. No iio:deviceX created¶
Cause:
- Platform driver had no matching device
- probe() not executed
Solution:
- Created dummy platform device inside module:
Observations¶
1. sysfs auto-generation¶
Attributes such as:
were automatically created by IIO core.
2. read_raw() mapping¶
Verified:
3. Channel-driven interface¶
Changing iio_chan_spec directly affects:
- sysfs attribute names
- available features
4. Scale formatting¶
Using:
produces:
Key Learning¶
- IIO uses metadata-driven design
- Device model (probe) is essential
- Framework handles user-space interface
Reflection¶
This minimal driver behaves like:
but provides a foundation for:
- multi-channel sampling
- buffered data
- trigger-based acquisition