Linux 的设备树感知 i2c gpio 驱动程序示例?

Example device-tree-aware i2c gpio driver for Linux?

Linux是否有一个很好的设备树感知 i2c gpio 驱动程序示例?

我一直在查看 gpio-pcf857x,但它有一个包含 struct pcf857x_platform_data 的头文件,用于开发板文件。

我正在寻找一个类似的例子,但是 i2c id 是 defined-in/retrieved-from 设备树。

看看 driver (code). As for I2C ID table usage -- see this 答案。

相应的绑定文档(您正在查找的驱动程序参考)位于 Documentation/devicetree/bindings/gpio/