0

If a sensor is connected to I2C bus then both the following device tree entries will workt or only entry1 will work.

entry1:
-------
i2c {
    clock-frequency = <200000>;
    sensor1@addr {
            compatible = "sensor1"

    };
};


entry2:
-------
i2c {
    clock-frequency = <200000>;
}
sensor1@addr {
    compatible = "sensor1"
};
user3693586
  • 1,227
  • 5
  • 18
  • 40

1 Answers1

1

As sensor is connected to I2C bus, entry1 seems to be fine as sensor is a child node of the your I2C bus node. Also I expect to see in DT entry; on which I2C bus the sensor in hooked.Its not clear in entry1.

a.saurabh
  • 1,163
  • 10
  • 15