Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Olli Salonen and committed by
Mauro Carvalho Chehab
5dce1ee6 d9768728

+1 -10
+1 -10
drivers/media/pci/saa7164/saa7164-api.c
··· 1385 1385 * 08... register address 1386 1386 */ 1387 1387 memset(buf, 0, sizeof(buf)); 1388 - if (reg) 1389 - memcpy((buf + 2 * sizeof(u32) + 0), reg, reglen); 1388 + memcpy((buf + 2 * sizeof(u32) + 0), reg, reglen); 1390 1389 *((u32 *)(buf + 0 * sizeof(u32))) = reglen; 1391 1390 *((u32 *)(buf + 1 * sizeof(u32))) = datalen; 1392 1391 ··· 1474 1475 * 04-07 dest bytes to write 1475 1476 * 08... register address 1476 1477 */ 1477 - if (datalen == 1) { 1478 - /* Workaround for issues with i2c components 1479 - * that issue writes with no data. IE: SI2168/2157 1480 - * Increase reglen by 1, strobe out an additional byte, 1481 - * ignored by SI2168/2157. 1482 - */ 1483 - datalen++; 1484 - } 1485 1478 *((u32 *)(buf + 0 * sizeof(u32))) = reglen; 1486 1479 *((u32 *)(buf + 1 * sizeof(u32))) = datalen - reglen; 1487 1480 memcpy((buf + 2 * sizeof(u32)), data, datalen);