Hi
I mean something like that:
Code:
&i2c1 {
some_label: some_driver@0 {
compatible = "name,subnam";
/*some properties*/
};
};
where driver has in probe(struct platform_device*) instead of probe(struct i2c_client*) ???
I see that every driver has probe(struct* i2c_client).
I need to add some driver which is handling part of hardware (i2c device). Another part is handled in linux build-in driver which CONFIG is by default = n. If somebody from other team, in company in which I am working, will add do dts configuration for this built-in linux driver then probe for one of driver will fail as there can't be two nodes in i2c1 with the same <reg> property.
Currently my solution is - I am out of i2c1 node and my driver is platform driver probe(struct platform_device*):
Code:
my_label: my_device@18 {
compatible = "xyz,abc";
addr = <0x18>;
bus-id = <4>;
/*other properties*/
};
and <reg> is <addr> and <bus-id> is number of i2c bus. I parse both in probe.
I wonder if I can still be inside i2c1 node and remove at least bus-id property. But how to get this bus-id.