October 2017
Intermediate to advanced
586 pages
14h 8m
English
struct i2c_client is the structure used to describe the I2C device. However, with OF style, this structure could not be defined in the board file anymore. The only thing we need to do is provide the device's information in the DT and the kernel will build one from it.
The following code shows how we can declare our I2C foobar device node in a dts file:
&i2c3 {
status = "okay";
foo-bar: foo@55 {
compatible = "packtpub,foobar-device";
reg = <55>;
};
};