diff options
author | Devin Heitmueller <devin.heitmueller@gmail.com> | 2008-09-06 13:45:27 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 09:37:08 -0200 |
commit | bdc203e156ce938e12d957912bd29ca53d160540 (patch) | |
tree | 8fc2b01bc6f584dc71f506e0c6a25f96c515e184 /drivers/media/dvb/dvb-usb/dib0700.h | |
parent | 17a370bcca661a849c9af07feae86f42d0c6dfd1 (diff) |
V4L/DVB (9039): Add support for new i2c API provided in firmware version 1.20
The Pinnacle PCTV HD Pro has an xc5000, which exposed a bug in the dib0700's
i2c implementation where it did not properly support a single i2c read request
(sending it as an i2c write request instead). Version 1.20 of the firmware
added support for a new i2c API which supported such requests.
This change defaults to fw 1.20 for all devices, but does not default to using
the new i2c API (since initial testing suggests problems interacting with the
mt2060). Maintainers can enable the use of the new i2c API by putting
the following into their frontend initialization:
struct dib0700_state *st = adap->dev->priv;
st->fw_use_new_i2c_api = 1;
Also note that the code expects i2c repeated start to be supported. If the
i2c slave does not support repeated start, i2c messsages should have the
I2C_M_NOSTART flag set.
Thanks to Patrick Boettcher <patrick.boettcher@desy.de> for providing new
firmware fixing the issue as well as example i2c code utilizing the interface.
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dib0700.h')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700.h b/drivers/media/dvb/dvb-usb/dib0700.h index 66d4dc6ba46f..cc0c51d82f2c 100644 --- a/drivers/media/dvb/dvb-usb/dib0700.h +++ b/drivers/media/dvb/dvb-usb/dib0700.h @@ -31,6 +31,8 @@ extern int dvb_usb_dib0700_debug; // 2 Byte: MPEG2 mode: 4MSB(1 = Master Mode, 0 = Slave Mode) 4LSB(Channel 1 = bit0, Channel 2 = bit1) // 2 Byte: Analog mode: 4MSB(0 = 625 lines, 1 = 525 lines) 4LSB( " " ) #define REQUEST_SET_RC 0x11 +#define REQUEST_NEW_I2C_READ 0x12 +#define REQUEST_NEW_I2C_WRITE 0x13 #define REQUEST_GET_VERSION 0x15 struct dib0700_state { @@ -39,6 +41,7 @@ struct dib0700_state { u8 rc_toggle; u8 rc_counter; u8 is_dib7000pc; + u8 fw_use_new_i2c_api; }; extern int dib0700_set_gpio(struct dvb_usb_device *, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val); |