OpenBSD has had something like this for a few years in its gpio(4) device and associated gpioctl(8) utility. These allow configuration of device pins in various I/O modes and runtime attachment of I2C and Onewire drivers (iic(4) and onewire(4) respectively. The available I2C drivers are pretty skewed towards sensors one would find on a motherboard, but the kernel API is trivial to write drivers to (hell, even I wrote a couple).
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds