From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] i2c: merge all i2c_reg_read() and i2c_reg_write() into inline functions
Date: Tue, 16 Dec 2008 15:35:23 -0500 [thread overview]
Message-ID: <4948110B.2010503@ge.com> (raw)
In-Reply-To: <Pine.LNX.4.64ksi.0812161102580.28667@home-gw.koi8.net>
ksi at koi8.net wrote:
> On Tue, 16 Dec 2008, Timur Tabi wrote:
>
>> ksi at koi8.net wrote:
>>
>>> That looks messy... Why would we use two different versions if we can
>> make
>>> everything uniform?
>> Because we already have something that makes it uniform, and it's
>> broken. The
>> idea of having a "current i2c bus" that needs to be set before
>> read/write
>> operations can be performed is the broken part!
>
> Eh, we don't have any uniformity. That "uniformity" we do have is only for a
> trivial case of a single I2C bus. Everything else is a bunch of SoC specific
> hacks made differently fo different platforms. The fsl-i2c.c e.g. uses local
> bus number variable.
[snip]
>> I think all this boils down to one core disagreement we have: I think
>> the idea
>> of a "current" i2c bus is a bad one.
>
> I can see nothing wrong with that but I also have nothing against changing
> all i2c_{read,write,probe}() functions to take bus number as an argument.
>
> I offered 4 possible scenarios and additional parameter to i2c functions was
> one of them. Wolfgang said that current bus approach looks better than
> others and I agree with him. But it is not rocket science to use an
> additional parameter either. The only thing is it MUST be consistent, i.e.
> we should NOT have 2 different sets of functions based on CONFIG_MULTIBUS or
> whatever. If we are to make this change ALL boards must be multibus with
> majority of them having bus count of 1.
>
> Does anybody else have something to say on this? I'm going to write code so
> let's make some decision. I don't want this to end up as a company hack and
> making it properly affects a lot of U-boot...
IMHO Sergey's approach is reasonable. It is pragmatic in that it builds
on and improves the existing method. It only touches boards with
multiple i2c buses.
The best is the enemy of the good. - Voltaire
<http://www.bartleby.com/66/2/63002.html>
My two cents,
gvb
next prev parent reply other threads:[~2008-12-16 20:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 17:28 [U-Boot] [PATCH v3] i2c: merge all i2c_reg_read() and i2c_reg_write() into inline functions Timur Tabi
2008-12-06 17:49 ` Jean-Christophe PLAGNIOL-VILLARD
2008-12-15 22:47 ` Wolfgang Denk
2008-12-15 23:37 ` ksi at koi8.net
2008-12-15 23:42 ` Timur Tabi
2008-12-16 0:24 ` ksi at koi8.net
2008-12-16 15:19 ` Timur Tabi
2008-12-16 17:58 ` ksi at koi8.net
2008-12-16 18:51 ` Timur Tabi
2008-12-16 19:40 ` ksi at koi8.net
2008-12-16 20:35 ` Jerry Van Baren [this message]
2008-12-16 20:58 ` Wolfgang Denk
2008-12-17 3:55 ` ksi at koi8.net
2008-12-16 20:49 ` Wolfgang Denk
2008-12-16 23:46 ` Timur Tabi
2008-12-17 1:00 ` ksi at koi8.net
2008-12-17 1:28 ` Wolfgang Denk
2008-12-16 17:47 ` Scott Wood
2008-12-16 18:07 ` ksi at koi8.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4948110B.2010503@ge.com \
--to=gerald.vanbaren@ge.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox