[U-Boot] [PATCH] 7/12 Multiadapter/multibus I2C, drivers part 4

Heiko Schocher hs at denx.de
Thu Feb 19 09:04:51 CET 2009


Hello ksi,

ksi at koi8.net wrote:
> On Wed, 18 Feb 2009, Wolfgang Denk wrote:
> 
>> Dear ksi at koi8.net,
>>
>> In message <Pine.LNX.4.64ksi.0902181400470.5729 at home-gw.koi8.net> you wrote:
[...]
>>> Should we add a config option like CONFIG_I2C_INIT_ADAPTERS {1,3,5,9} ? But
>> No, because we probably do not need to activate all tehse adapters at
>> the same time.
>>
>>> Or should we remove i2c_init() from _ALL_ common places and let board
>>> developers to call i2c_adap[X]->init() as they see fit? But that is a big
>>> rewrite... And there is another place, cmd_i2c.c that must be taken care
>>> of...
>> You will always call i2c_init() for a specific I2C device.
>>
>> The code should automatically know which adapters need to be  initia-
>> lized  to  "talk"  to that device. Yes, you must somehow describe the
>> I2C bus topology, but a single one-way description for the path  from
>> the specific device to the CPU should be sufficient.
> 
> Topology is already there, this is not a problem. That is that
> initinialization that is. The a.m. approach means the I2C layer should not

No this is no problem, if you have a look at my proposal for
i2c_set_bus_num()

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list