aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorOlli Salonen <olli.salonen@iki.fi>2015-06-06 04:44:58 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-10 11:46:03 -0300
commit5dce1ee611e4acd0893c77611d25fe5b1594764a (patch)
treed0b7ed8434117f2934c64fe64625166bf55d49f3 /drivers/media/pci
parent[media] saa7164: change Si2168 reglen to 0 bit (diff)
downloadlinux-dev-5dce1ee611e4acd0893c77611d25fe5b1594764a.tar.xz
linux-dev-5dce1ee611e4acd0893c77611d25fe5b1594764a.zip
[media] saa7164: Improvements for I2C handling"
This reverts commit ad90b6b0f10566d4a5546e27fe455ce3b5e6b6c7. This patch breaks I2C communication towards Si2168. After reverting and applying the other patch in this series the I2C communication is correct. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/saa7164/saa7164-api.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/media/pci/saa7164/saa7164-api.c b/drivers/media/pci/saa7164/saa7164-api.c
index e8077037fb5c..e7e586c1ba53 100644
--- a/drivers/media/pci/saa7164/saa7164-api.c
+++ b/drivers/media/pci/saa7164/saa7164-api.c
@@ -1385,8 +1385,7 @@ int saa7164_api_i2c_read(struct saa7164_i2c *bus, u8 addr, u32 reglen, u8 *reg,
* 08... register address
*/
memset(buf, 0, sizeof(buf));
- if (reg)
- memcpy((buf + 2 * sizeof(u32) + 0), reg, reglen);
+ memcpy((buf + 2 * sizeof(u32) + 0), reg, reglen);
*((u32 *)(buf + 0 * sizeof(u32))) = reglen;
*((u32 *)(buf + 1 * sizeof(u32))) = datalen;
@@ -1475,14 +1474,6 @@ int saa7164_api_i2c_write(struct saa7164_i2c *bus, u8 addr, u32 datalen,
* 04-07 dest bytes to write
* 08... register address
*/
- if (datalen == 1) {
- /* Workaround for issues with i2c components
- * that issue writes with no data. IE: SI2168/2157
- * Increase reglen by 1, strobe out an additional byte,
- * ignored by SI2168/2157.
- */
- datalen++;
- }
*((u32 *)(buf + 0 * sizeof(u32))) = reglen;
*((u32 *)(buf + 1 * sizeof(u32))) = datalen - reglen;
memcpy((buf + 2 * sizeof(u32)), data, datalen);