From f46d86002540661d35063e72b369b3a34a52c695 Mon Sep 17 00:00:00 2001 From: Olli Salonen Date: Sun, 26 Jul 2015 09:36:48 +0300 Subject: [PATCH] linux: add missing I2C functions to the Hauppauge HVR-2205 patch --- ...linux-229-hauppauge-hvr-2205-and-2255.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/linux/patches/4.1.3/linux-229-hauppauge-hvr-2205-and-2255.patch b/packages/linux/patches/4.1.3/linux-229-hauppauge-hvr-2205-and-2255.patch index f625401e07..ec7ae60ff9 100644 --- a/packages/linux/patches/4.1.3/linux-229-hauppauge-hvr-2205-and-2255.patch +++ b/packages/linux/patches/4.1.3/linux-229-hauppauge-hvr-2205-and-2255.patch @@ -616,3 +616,21 @@ diff -urN a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/ return 0; } +diff -urN a/drivers/media/pci/saa7164/saa7164-i2c.c b/drivers/media/pci/saa7164/saa7164-i2c.c +--- a/drivers/media/pci/saa7164/saa7164-i2c.c ++++ b/drivers/media/pci/saa7164/saa7164-i2c.c +@@ -39,9 +39,10 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) + dprintk(DBGLVL_I2C, "%s(num = %d) addr = 0x%02x len = 0x%x\n", + __func__, num, msgs[i].addr, msgs[i].len); + if (msgs[i].flags & I2C_M_RD) { +- /* Unsupported - Yet*/ +- printk(KERN_ERR "%s() Unsupported - Yet\n", __func__); +- continue; ++ retval = saa7164_api_i2c_read(bus, ++ msgs[i].addr, ++ 0 /* reglen */, ++ NULL /* reg */, msgs[i].len, msgs[i].buf); + } else if (i + 1 < num && (msgs[i + 1].flags & I2C_M_RD) && + msgs[i].addr == msgs[i + 1].addr) { + /* write then read from same address */ +