From: Krzysztof Halasa <khc@pm.waw.pl>
To: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>,
linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] [PATCH] I2C: i2c_bit_add_bus should initialize SDA and SCL lines
Date: Sun, 11 Jun 2006 00:27:14 +0200 [thread overview]
Message-ID: <m3lks4k5od.fsf@defiant.localdomain> (raw)
In-Reply-To: <20060609110546.GA26073@jupiter.solarsys.private> (Mark M. Hoffman's message of "Fri, 9 Jun 2006 07:05:46 -0400")
Hi,
"Mark M. Hoffman" <mhoffman@lightlink.com> writes:
> SCL and SDA must be pulled high by hardware. If a driver inits to
> setting them low, that's a bug in the driver.
Thanks for your response.
The question is rather who inits the lines: a) the hw driver,
b) the I2C algorithm driver.
With a) every hw driver has to know how to init them (duplicated
code but there might be positive side).
With b) I2C algorithm driver inits the lines and hw driver
doesn't worry about but it might have some limitations such
as unknown SCL state.
I understand the current case is a) - right?
The other question is _how_ to init the lines. There are 4 possible
hardware initial conditions:
SCL SDA
a) 0 0 (outputs zeroed by default)
b) 0 1 (uncommon but may be left in this state by previous operations)
c) 1 0 (ditto)
d) 1 1 (I/O lines configured as input by default)
The internal state of devices connected to the bus is potentially
unknown. Some implementations just start with STOP to eliminate
this problem, I don't know what Linux driver is supposed to do.
(Other implementation I know are rather specialized and thus they
know their hardware init state, Linux I2C algorithm handles many
devices with potentially different initial state of hardware lines).
To summarize questions:
- is it the hw driver who has to init the bus
- how to init the bus (depending on init state)
--
Krzysztof Halasa
next prev parent reply other threads:[~2006-06-10 22:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-06 16:58 Krzysztof Halasa
2006-06-09 11:05 ` [lm-sensors] " Mark M. Hoffman
2006-06-10 22:27 ` Krzysztof Halasa [this message]
2006-06-12 12:36 ` Mark M. Hoffman
2006-06-12 17:13 ` Krzysztof Halasa
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=m3lks4k5od.fsf@defiant.localdomain \
--to=khc@pm.waw.pl \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=mhoffman@lightlink.com \
/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
all inboxes | Powered by JetHome®