All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michael Krufky <mkrufky@kernellabs.com>
Subject: Re: [GIT PULL for 2.6.37-rc1] V4L/DVB updates
Date: Wed, 27 Oct 2010 14:46:41 -0200	[thread overview]
Message-ID: <4CC85771.2080307@redhat.com> (raw)
In-Reply-To: <AANLkTim=RfR3Dq0w+ACYjhGTHCSgapdf35wGW8QoZ38n@mail.gmail.com>

Em 27-10-2010 13:48, Devin Heitmueller escreveu:
> On Wed, Oct 27, 2010 at 11:41 AM, Mauro Carvalho Chehab
> 
> Have you looked at the code for how the Conexant guys got the xc5000
> firmware load to work (which uses 64 bytes at a time).  I suspect what
> *really* needs to happen is that needs to be made generic so that the
> stop bit is properly set (which would allow a single i2c transaction
> to span across multiple USB control messages).
> 
> Note that the xc5000 hack is actually two changes merged together -
> one uses a GPIO mode in certain cases to handle clock stretching
> properly (which probably has to stay there for now), and the other
> allows for larger i2c transactions.  I am referring to the latter
> change.
> 
> If we fix the cx231xx i2c master, then we can go back to the original
> 18271 config, which avoids the risk of regression for other devices.

The original code is broken, as it doesn't properly honour a max size of 8.
Even if we do some optimization at cx231xx, we still need to fix the tda18271
code, as it is trying to use more than 8 bytes on some writes.

Also, as you noticed, the way cx231xx sends large firmwares to xc5000 is a hack:
it requires to identify that the I2C device is a xc5000 and do an special
treatment for it.

We may actually move all those small_i2c logic to the bridge drivers, adding
those hacks inside the I2C adapter part, but this means that they'll need to 
have some complex-logic that are dependent on what device is connected to it,
damaging the benefits that the I2C bus abstraction brings.

Instead of polluting bridge drivers with I2C-device specific code, the proper
way seems to use parameters to adjust the maximum size, eventually flagging
the broken messages in a way that the I2C adapter won't sent a stop transaction
in the middle of a larger initialization like this one.

Cheers,
Mauro

  reply	other threads:[~2010-10-27 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 14:32 [GIT PULL for 2.6.37-rc1] V4L/DVB updates Mauro Carvalho Chehab
2010-10-27 15:30 ` Jiri Slaby
2010-10-27 15:41   ` Mauro Carvalho Chehab
2010-10-27 15:48     ` Devin Heitmueller
2010-10-27 16:46       ` Mauro Carvalho Chehab [this message]
2010-10-27 17:52         ` Devin Heitmueller
2010-10-27 15:53     ` Jiri Slaby
2010-10-27 16:36       ` Mauro Carvalho Chehab
2010-10-27 16:38         ` Jiri Slaby
2010-10-27 16:52           ` Mauro Carvalho Chehab
2010-10-27 17:39 ` Hans de Goede
2010-10-27 17:52   ` Mauro Carvalho Chehab

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=4CC85771.2080307@redhat.com \
    --to=mchehab@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dheitmueller@kernellabs.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mkrufky@kernellabs.com \
    --cc=torvalds@linux-foundation.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 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.