fadedbee
fadedbee

Reputation: 44765

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

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.

Upvotes: 1

Views: 1545

Answers (1)

Sam Protsenko
Sam Protsenko

Reputation: 14753

Take a look at 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/.

Upvotes: 1

Related Questions