From: Rodolfo Giometti <giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
To: mgreer-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mauro Barella <mbarella-RSoB1PSltFvQT0dZR+AlfA@public.gmane.org>
Subject: I2C controller i2c-mv64xxx.c not compliant
Date: Mon, 15 Nov 2010 15:54:07 +0100 [thread overview]
Message-ID: <20101115145406.GE3372@enneenne.com> (raw)
Hello,
I'm using a ltc4266 (PoE chip) with the Marvell i2c controller (CPU
Feroceon 88FR131).
The ltc4266 wants a repeated START during a write/read sequence,
i.e. in order to read a register with the following messages:
u8 reg = <address>;
u8 val;
struct i2c_msg msg[] = {
{ client->addr, 0, 1, ® },
{ client->addr, I2C_M_RD, 1, &val },
};
the master _must_ send a repeated START at beginning of the read
message otherwise the ltc4266 will reset its internal address register
and the master will read the register 0x00 each time!
Looking at the code the i2c-mv64xxx.c driver sends a STOP at each
message's end, but into the file include/linux/i2c.h is stated:
* Except when I2C "protocol mangling" is used, all I2C adapters implement
* the standard rules for I2C transactions. Each transaction begins with a
* START. That is followed by the slave address, and a bit encoding read
* versus write. Then follow all the data bytes, possibly including a byte
* with SMBus PEC. The transfer terminates with a NAK, or when all those
* bytes have been transferred and ACKed. If this is the last message in a
* group, it is followed by a STOP. Otherwise it is followed by the next
* @i2c_msg transaction segment, beginning with a (repeated) START.
Any suggestions in order to fix it?
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org
Linux Device Driver giometti-k2GhghHVRtY@public.gmane.org
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
next reply other threads:[~2010-11-15 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 14:54 Rodolfo Giometti [this message]
[not found] ` <20101115145406.GE3372-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2011-02-11 14:04 ` I2C controller i2c-mv64xxx.c not compliant Michael Lawnick
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=20101115145406.GE3372@enneenne.com \
--to=giometti-avvdyk/kqijwk0htik3j/w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mbarella-RSoB1PSltFvQT0dZR+AlfA@public.gmane.org \
--cc=mgreer-Igf4POYTYCDQT0dZR+AlfA@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;
as well as URLs for NNTP newsgroup(s).