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"
};
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.