diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-13 13:50:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-13 13:50:15 -0300 |
commit | dbc0579cac0ed9f9af0bcf361a5c3fc56f4f8395 (patch) | |
tree | 8e9f703aba9ff7c66ddf4fef5a740a6ef44c71a4 /linux/drivers/media/dvb/dvb-usb/m920x.h | |
parent | b4bd63c6ce993e0bf2bf3aaecc3384740b495845 (diff) | |
parent | a73981e95b53d62cc7e42ce54e54473f3758d2e7 (diff) | |
download | mediapointer-dvb-s2-dbc0579cac0ed9f9af0bcf361a5c3fc56f4f8395.tar.gz mediapointer-dvb-s2-dbc0579cac0ed9f9af0bcf361a5c3fc56f4f8395.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/m920x.h')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/m920x.h | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/m920x.h b/linux/drivers/media/dvb/dvb-usb/m920x.h index c354196ff..7dd3db65c 100644 --- a/linux/drivers/media/dvb/dvb-usb/m920x.h +++ b/linux/drivers/media/dvb/dvb-usb/m920x.h @@ -19,17 +19,49 @@ #define M9206_MAX_FILTERS 8 -#define M9206_I2C_TUNER 0 -#define M9206_I2C_DEMOD 1 -#define M9206_I2C_MAX 2 +/* +sequences found in logs: +[index value] +0x80 write addr +(0x00 out byte)* +0x40 out byte + +0x80 write addr +(0x00 out byte)* +0x80 read addr +(0x21 in byte)* +0x60 in byte + +this sequence works: +0x80 read addr +(0x21 in byte)* +0x60 in byte + +Guess at API of the I2C function: +I2C operation is done one byte at a time with USB control messages. The +index the messages is sent to is made up of a set of flags that control +the I2C bus state: +0x80: Send START condition. After a START condition, one would normally + always send the 7-bit slave I2C address as the 7 MSB, followed by + the read/write bit as the LSB. +0x40: Send STOP condition. This should be set on the last byte of an + I2C transaction. +0x20: Read a byte from the slave. As opposed to writing a byte to the + slave. The slave will normally not produce any data unless you + set the R/W bit to 1 when sending the slave's address after the + START condition. +0x01: Respond with ACK, as opposed to a NACK. For a multi-byte read, + the master should send an ACK, that is pull SDA low during the 9th + clock cycle, after every byte but the last. This flags only makes + sense when bit 0x20 is set, indicating a read. + +What any other bits might mean, or how to get the slave's ACK/NACK +response to a write, is unknown. +*/ struct m9206_state { u16 filters[M9206_MAX_FILTERS]; int filtering_enabled; int rep_count; - struct { - unsigned char addr; - unsigned char magic; - }i2c_r[M9206_I2C_MAX]; }; #endif |