From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Fabien Marteau <lepingouin.tux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: SMBus quick command problem
Date: Fri, 9 Jan 2009 15:27:52 +0100 [thread overview]
Message-ID: <20090109152752.29b3c5de@hyperion.delvare> (raw)
In-Reply-To: <ce62e9d00901080101ocfa0388g91698776eb9704cb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Salut Fabien,
On Thu, 8 Jan 2009 10:01:01 +0100, Fabien Marteau wrote:
> I'm writing a driver for i2c controller. To do it, I'm following the
> SMBus protocol description in linux/Documentation/i2c/SMBus-
> protocol. This documentation say that we can write a single bit with
> «SMBus Quick Command». This command is used in i2cdetect program to
> find slave on the bus.
>
> I used this command to write bit 0 and that work whell with my slaves,
> but if I try to write bit 1 the slaves addressed are blocking the bus
> (maintain SDA to 0). I tried it with two slaves components :
> LIS3LV02DL (accelerometer) and DS28CZ04 (EEPROM).
>
> Is it a known problem ?
The SMBus specification describes a number of standardized
transactions. Each chip on the bus can support each given transaction
type or not. In practice, each slave chip only supports a subset of the
SMBus specification. I can't remember working on a chip saying it was
supporting the SMBus quick command. The Linux i2c subsystem abuses this
transaction type for device detection purposes, because it is known to
give good results in practice, but ideally it shouldn't do that.
There have been some devices known to lock up the SMBus on Quick
command with data bit = 1 (as you are experiencing.) In most cases
these were write-only devices, which didn't expect a transaction
starting like a read (the SMBus specification says that a Quick command
with data bit = 1 is writing 1 bit to the slave, but the I2C
specification says this is a _read_ transaction of length 0.)
This SMBus Quick command thing keeps causing trouble and confusing
people. Not much we can do though. If your slaves don't like the quick
command, just don't send that command to them.
> [Erreur de décodage BASE64]
Gni?
--
Jean Delvare
next prev parent reply other threads:[~2009-01-09 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 9:01 SMBus quick command problem Fabien Marteau
[not found] ` <ce62e9d00901080101ocfa0388g91698776eb9704cb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-09 14:27 ` Jean Delvare [this message]
[not found] ` <20090109152752.29b3c5de-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-09 15:03 ` Fabien Marteau
[not found] ` <ce62e9d00901090703y5af1ba4diedf37d30da5d158a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-09 15:12 ` Jean Delvare
[not found] ` <20090109161222.4c75ffda-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-09 17:11 ` Fabien Marteau
[not found] ` <ce62e9d00901090911r7454ae5fr61c69a22704ed86b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-01-09 17:38 ` Jean Delvare
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=20090109152752.29b3c5de@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=lepingouin.tux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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