All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Sommer <saschasommer@freenet.de>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: [PATCH] em28xx: Do not modify EM28XX_R06_I2C_CLK for em2800
Date: Sun, 08 Jan 2012 21:32:09 +0100	[thread overview]
Message-ID: <4F09FD49.2000806@freenet.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Hello,

writing the EM28XX_R06_I2C_CLK register leads to the problem that the 
i2c bus
on the Terratec Cinergy 200 USB is no longer usable when the system is 
rebooted.
The device needs to be unplugged in order to bring it back to life.
Attached patch conditionally disables the write in 
em28xx_pre_card_setup() like
it is already done in em28xx_card_setup().

Regards

Sascha


[-- Attachment #2: em28xx_do_not_modify_EM28XX_R06_I2C_CLK_for_em2800.patch --]
[-- Type: text/x-patch, Size: 837 bytes --]

Do not modify EM28XX_R06_I2C_CLK for em2800
Modifying this register makes the Terratec Cinergy 200 USB unusable
after reboot.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>

diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 897a432..0b2e6d5 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -2287,7 +2287,8 @@ void em28xx_pre_card_setup(struct em28xx *dev)
 	/* Set the initial XCLK and I2C clock values based on the board
 	   definition */
 	em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f);
-	em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
+	if (!dev->board.is_em2800)
+		em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
 	msleep(50);
 
 	/* request some modules */

                 reply	other threads:[~2012-01-07 20:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4F09FD49.2000806@freenet.de \
    --to=saschasommer@freenet.de \
    --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 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.