Hello Tom, Jérôme, Sorry for the late reply, but I just starting to look through my backlog, after my vacation ...
Tom Rini wrote: > On Wed, Dec 21, 2011 at 10:36 PM, Jérôme Carretero <[email protected]> > wrote: >> Hi Tom, >> >> I'm requesting comments on the following (untested) patch. >> It adds support for multiple i2c buses on davinci_i2c, without altering one >> line of code. >> What I don't like is that I'm doing a bit of macro black magic to transform >> constants into variables. >> But I don't know whether refactoring the code would be accepted, so this is >> a first shot. > > So, this follows the example of other i2c drivers, but as Wolfgang > likes to point out, following another bad example isn't a valid reason > to do something. So, is this the right way or a bad example to > follow, Wolfgang or Heiko? Thanks! Yes, that is the actual (not really nice) state to implement the "multibus" feature for i2c. The better way would be to go this way: http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/multibus_v2_20111112 but this branch is not up to date, some test on at last powerpc and arm architectures should be done, and there are a lof of checkpatch errors in this branch (any help is welcome ;-) ... so there is some work to do, before this can go to mainline ... bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

