All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Mark Brown <broonie@sirena.org.uk>
Cc: alsa-devel@alsa-project.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 1/2] ASoC: cs4270: introduce CS4270_I2C_INCR
Date: Wed, 6 May 2009 01:19:24 +0200	[thread overview]
Message-ID: <20090505231924.GA28090@buzzloop.caiaq.de> (raw)
In-Reply-To: <20090505180859.GA3953@sirena.org.uk>

On Tue, May 05, 2009 at 07:09:01PM +0100, Mark Brown wrote:
> > I planned to use that macro a second time for the register write-back at
> > resume time. But unfortunately, the i2c stack is so badly broken that it
> > does not allow the write of a whole data block without having the length
> > itself as part of the message (which is wrong for the codec).
> 
> Could you clarify what you mean when you say that the I2C block requires
> the length be part of the message?  The I2C stack needs to know the
> amount of data to write but I'm not aware of any restrictions it places
> on the content of the data.

All high-level i2c functions to write block data, namely
i2c_smbus_write_block_data() and i2c_smbus_write_i2c_block_data(), put
the length of the data being sent inside the block sent on the wire. I
couldn't believe it myself, but even my hardware I2C analyzer clearly
shows that. The API seems to assume that communication to I2C devices
always wants data to be sent with a leading command, followed by the
number of data bytes attached and then the data itself. Correct me if
I'm wrong on that.

Daniel

  reply	other threads:[~2009-05-05 23:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05  9:25 [PATCH 1/2] ASoC: cs4270: introduce CS4270_I2C_INCR Daniel Mack
2009-05-05  9:25 ` [PATCH 2/2] ASoC: cs4270: add power management support Daniel Mack
2009-05-05 15:30   ` Timur Tabi
2009-05-05 15:51     ` Daniel Mack
2009-05-05 17:55       ` Timur Tabi
2009-05-05 23:26         ` Daniel Mack
2009-05-06 15:27           ` Timur Tabi
2009-05-07  8:02             ` Mark Brown
2009-05-05 14:51 ` [PATCH 1/2] ASoC: cs4270: introduce CS4270_I2C_INCR Timur Tabi
2009-05-05 15:15   ` Daniel Mack
2009-05-05 18:09     ` Mark Brown
2009-05-05 23:19       ` Daniel Mack [this message]
2009-05-06  8:44         ` Mark Brown
2009-05-06  9:39           ` Daniel Mack
2009-05-06 15:28             ` Timur Tabi

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=20090505231924.GA28090@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@sirena.org.uk \
    --cc=timur@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.