Linux Media Controller development
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: "linux-media" <linux-media@vger.kernel.org>
Subject: Re: em28xx: commit aab3125c43d8fecc7134e5f1e729fabf4dd196da broke HVR 900
Date: Thu, 21 Mar 2013 07:03:27 -0300	[thread overview]
Message-ID: <20130321070327.772c6301@redhat.com> (raw)
In-Reply-To: <201303210933.41537.hverkuil@xs4all.nl>

Em Thu, 21 Mar 2013 09:33:41 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> I tried to use my HVR 900 stick today and discovered that it no longer worked.
> I traced it to commit aab3125c43d8fecc7134e5f1e729fabf4dd196da: "em28xx: add
> support for registering multiple i2c buses".
> 
> The kernel messages for when it fails are:
...
> Mar 21 09:26:57 telek kernel: [ 1396.542517] xc2028 12-0061: attaching existing instance
> Mar 21 09:26:57 telek kernel: [ 1396.542521] xc2028 12-0061: type set to XCeive xc2028/xc3028 tuner
> Mar 21 09:26:57 telek kernel: [ 1396.542523] em2882/3 #0: em2882/3 #0/2: xc3028 attached
...
> Mar 21 09:26:57 telek kernel: [ 1396.547833] xc2028 12-0061: Error on line 1293: -19

Probably, the I2C speed is wrong. I noticed a small bug on this patch.
The following patch should fix it. Could you please test?

-- 

Regards,
Mauro

[PATCH] em28xx: fix I2C write to register 06

Signed-off-by: Mauro Carvalho Chehab

diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
index de9b208..dd1f2de 100644
--- a/drivers/media/usb/em28xx/em28xx-i2c.c
+++ b/drivers/media/usb/em28xx/em28xx-i2c.c
@@ -295,7 +295,9 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
 			dev->cur_i2c_bus |= EM2874_I2C_SECONDARY_BUS_SELECT;
 		else
 			dev->cur_i2c_bus &= ~EM2874_I2C_SECONDARY_BUS_SELECT;
-		em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->cur_i2c_bus);
+		em28xx_write_reg_bits(dev, EM28XX_R06_I2C_CLK,
+				      dev->cur_i2c_bus,
+				      EM2874_I2C_SECONDARY_BUS_SELECT);
 		dev->cur_i2c_bus = bus;
 	}
 

  reply	other threads:[~2013-03-21 10:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21  8:33 em28xx: commit aab3125c43d8fecc7134e5f1e729fabf4dd196da broke HVR 900 Hans Verkuil
2013-03-21 10:03 ` Mauro Carvalho Chehab [this message]
2013-03-21 10:19   ` Hans Verkuil
2013-03-21 15:34   ` Hans Verkuil
2013-03-21 16:23     ` Mauro Carvalho Chehab
2013-03-22 10:20       ` Hans Verkuil
2013-03-21 18:21     ` Frank Schäfer
2013-03-21 19:05       ` 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=20130321070327.772c6301@redhat.com \
    --to=mchehab@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.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