[PATCH] s2250: Fix write_reg i2c address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>

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)


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux