We need some type of code that handles of auto detection part. Three main purposes:
- Provide debugging information if something goes wrong.
- List all available periphery, that pi4j can consume.
- Get rid of "context" code and autoload corresponding providers depending on interfaces found.
There still should be a way to override this behaviour, but the main reason is to simply API interfaces for a regular user and provide log messages with hints.
I can see a three way steps in detection process:
- Scan live nodes of interfaces located at
/dev/... and ioctl. Most of enabled interfaces will be detected.
- Scan device tree to find potential interfaces, but disabled for some reason.
- Fallback to ACPI search in
sysfs for systems without device tree (e.g. x86 PC)
@eitch @FDelporte @stefanhaustein guys, what do you think?
We need some type of code that handles of auto detection part. Three main purposes:
There still should be a way to override this behaviour, but the main reason is to simply API interfaces for a regular user and provide log messages with hints.
I can see a three way steps in detection process:
/dev/...andioctl. Most of enabled interfaces will be detected.sysfsfor systems without device tree (e.g. x86 PC)@eitch @FDelporte @stefanhaustein guys, what do you think?
Do the line numbers have any meaning? Are these the pcm numbers?
Just to confirm: If I enable i2c in the rpi boot settings, the corresponding pins won't be available for gpio at all? Or just when I open I2c at runtime?