public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Eberlein <pete@sensoray.com>
To: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: [PATCH] s2250: Fix write_reg i2c address
Date: Wed, 13 Jan 2010 14:15:48 -0800	[thread overview]
Message-ID: <1263420948.4697.313.camel@pete-desktop> (raw)

The kernel i2c model uses right-aligned 7-bit i2c addresses, but the
2250 firmware uses an 8-bit address in the usb vendor request.  A
previous patch by Jean Delvare shifted the i2c addresses 1 bit to the
right, and this patch fixes the write_reg function to shift it back
before sending the vendor request.

Priority: normal

Signed-off-by: Pete Eberlein <pete@sensoray.com>

diff -r 3a4be7d7dabd -r 134a95c0d98b linux/drivers/staging/go7007/s2250-board.c
--- a/linux/drivers/staging/go7007/s2250-board.c	Sun Jan 03 17:04:42 2010 +0000
+++ b/linux/drivers/staging/go7007/s2250-board.c	Wed Jan 13 14:11:48 2010 -0800
@@ -159,7 +159,7 @@
 	struct go7007 *go = i2c_get_adapdata(client->adapter);
 	struct go7007_usb *usb;
 	int rc;
-	int dev_addr = client->addr;
+	int dev_addr = client->addr << 1;  /* firmware wants 8-bit address */
 	u8 *buf;
 
 	if (go == NULL)



                 reply	other threads:[~2010-01-13 23:16 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=1263420948.4697.313.camel@pete-desktop \
    --to=pete@sensoray.com \
    --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