public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Andy Walls <awalls@radix.net>
Cc: Matthias Fechner <idefix@fechner.net>,
	linux-media@vger.kernel.org, Jarod Wilson <jarod@wilsonet.com>,
	"Igor M. Liplianin" <liplianin@me.by>
Subject: Re: IR Receiver on an Tevii S470
Date: Mon, 23 Nov 2009 09:54:35 +0100	[thread overview]
Message-ID: <20091123095435.310fcdf3@hyperion.delvare> (raw)
In-Reply-To: <1258935479.1896.29.camel@localhost>

On Sun, 22 Nov 2009 19:17:59 -0500, Andy Walls wrote:
> On Sun, 2009-11-22 at 21:32 +0100, Jean Delvare wrote:
> > The fact that 0x30-0x37 and 0x50-0x5f all reply suggest that the bus
> > driver erroneously returns success to "SMBus receive byte" transactions
> > even when no device acks. This is a bug which should get fixed. If you
> > point me to the I2C adapter driver code, I can take a look.
> 
> Although Igor's information makes the original need for this moot, here
> is the i2c adapter driver code:
> 
> http://linuxtv.org/hg/v4l-dvb/file/8bff7e6c44d4/linux/drivers/media/video/cx23885/cx23885-i2c.c

The results are not surprising: i2c_slave_did_ack() is only called for
zero-length transactions. For all other transactions, no check is done.
This is incorrect.

I have written 3 patches for cx23885-i2c.c, the second one should fix
this particular issue. The other two are cleanups. Patches are there if
you want to take a look / give them a try:
http://khali.linux-fr.org/devel/misc/cx23885/

These are totally untested, and I don't know anything about the
hardware, so they might need some more work. But at least you should
get the idea of what's missing.

> Note the CX2388[578] chips have 3 I2C masters, 2 for external buses, and
> 1 internal "on silicon" bus which the driver sets up as the 3rd bus.
> The internal bus should at least have devices at 0x44 and 0x4c as
> confirmed above.  I'll note the comment in this file, that indicates the
> "on silicon" I2C bus runs at 1.95 MHz:
> 
> http://linuxtv.org/hg/v4l-dvb/file/8bff7e6c44d4/linux/drivers/media/video/cx23885/cx23885-core.c

This is strange. For one thing, 1.95 MHz wouldn't be standard I2C but
high-speed mode I2C. But more importantly, I fail to see how you could
reach such speeds with a software-driven, byte-by-byte implementation.
You need hardware buffers to reach high speeds on I2C.

> The TeVii S470 card had what looked like at serial I2C EEPROM with the
> A0, A1, and A2 pins all grounded, so I assume it is at 0x50 on one of
> the CX23885's external I2C buses.

Probably. Hopefully my patches will show you where it is.

-- 
Jean Delvare

  reply	other threads:[~2009-11-23  8:54 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18 20:31 IR Receiver on an Tevii S470 Matthias Fechner
2009-11-21 17:10 ` Matthias Fechner
2009-11-21 20:41   ` Andy Walls
2009-11-21 22:19     ` Jonas Kvinge
2009-11-22  1:03     ` Igor M. Liplianin
2009-11-22  2:48       ` Andy Walls
2009-11-22 18:08         ` Matthias Fechner
2009-11-22 20:11           ` Andy Walls
2009-11-22 20:25             ` Matthias Fechner
2009-11-22 20:32               ` Jean Delvare
2009-11-23  0:17                 ` Andy Walls
2009-11-23  8:54                   ` Jean Delvare [this message]
2009-11-25  0:25                     ` Andy Walls
2009-11-26 16:43                       ` Matthias Fechner
2009-11-29 14:22                         ` Andy Walls
2009-11-22 20:26             ` Jean Delvare
2009-11-22 22:29             ` Igor M. Liplianin
2009-11-22 23:40               ` Andy Walls
2009-12-06 21:40       ` Andy Walls
2009-12-06 22:36         ` Matthias Fechner
2009-12-07  1:23         ` Igor M. Liplianin
2009-12-07  3:35           ` Andy Walls
2009-12-08 17:59             ` Igor M. Liplianin
2009-12-09 11:47               ` Andy Walls
2009-12-09 15:54                 ` Igor M. Liplianin
2009-12-10  1:12                   ` Andy Walls
2009-12-10 16:16                     ` Igor M. Liplianin
2009-12-11  2:32                       ` Andy Walls
  -- strict thread matches above, loose matches on Subject: below --
2009-11-23  0:15 Igor M. Liplianin
2009-12-12  0:30 Igor M. Liplianin
2009-12-12  1:00 ` Andy Walls
2009-12-12  1:42   ` Igor M. Liplianin
2009-12-12  2:58     ` Andy Walls
2009-12-12 11:49       ` Igor M. Liplianin
2009-12-12 14:15         ` Andy Walls
2009-12-12 16:01           ` Igor M. Liplianin
2009-12-12 16:22           ` Igor M. Liplianin
2009-12-12 16:59             ` Andy Walls
2009-12-31 12:46               ` Guillem Solà Aranda
2009-12-31 15:23                 ` Igor M. Liplianin
2010-01-06 21:21   ` Andreas Tschirpke
2010-01-07  0:44     ` Andy Walls

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=20091123095435.310fcdf3@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=awalls@radix.net \
    --cc=idefix@fechner.net \
    --cc=jarod@wilsonet.com \
    --cc=linux-media@vger.kernel.org \
    --cc=liplianin@me.by \
    /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