On Wed, Jan 08, 2020 at 02:27:08PM +0100, Wolfram Sang wrote: > > > > It would be nice, but I'm not sure this is really doable. Say the DT for > > > board X lists all the used slave addresses. Then the kernel would assume > > > all the other addresses are available. But then somebody includes the DT > > > of board X in the DT for product Z, based on board X + add-on board Y. > > > Add-on board Y has 2 I2C chips, but only one is described in DT. Now the > > > kernel still thinks it knows all the used address, but this is wrong. > > > > That's the fault of the system integrator though. We can't prevent > > people from making incorrect DT, and we shouldn't go to great length to > > still support them. > > Currently, there is no paradigm that all I2C busses must be fully > described. Enforcing it now all of a sudden is not too user-friendly, > or? We're only enforcing it for systems that want to make use of this new API, so it's not breaking backward compatibility. > Especially since calling read_byte once is not necessarily "great > length" in my book. If you have 8 cameras on a 400kHz bus, the 8 * 18 > bits should take 360us if I am not mistaken? That's assuming the first scanned address is free. There could also be I2C-controller I2C muxes or gates in front of the bus. Things can quickly get more expensive. -- Regards, Laurent Pinchart