Is there a good example device-tree-aware i2c gpio driver for Linux?
I’ve been looking at gpio-pcf857x but it has a header file containing struct pcf857x_platform_data
which is used in board files.
I am looking for a similar example, but where the i2c id is defined-in/retrieved-from the device tree.
Advertisement
Answer
Take a look at max732x.c driver (code). As for I2C ID table usage — see this answer.
Corresponding bindings documentation (for driver references you are looking for) is at Documentation/devicetree/bindings/gpio/.