aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/m920x.h
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2007-03-05 16:23:19 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:44:35 -0400
commit26247018be1ca7ca464f5f32e8ca7c897ded5393 (patch)
treef73212d3525ecf69d36700ffc59e91be11b26de1 /drivers/media/dvb/dvb-usb/m920x.h
parentfee73165ee0ff7cfbffad4233a70f56b821f434e (diff)
V4L/DVB (5423): M920x: i2c cleanups
- Implement m920x i2c as suggested by Pierre Willenbrock - remove "magic" hack - r/w bit is not part of the i2c address - move hardware remarks to header file Signed-off-by: Aapo Tahkola <aet@rasterburn.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/m920x.h')
-rw-r--r--drivers/media/dvb/dvb-usb/m920x.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.h b/drivers/media/dvb/dvb-usb/m920x.h
index c354196ffe5d..c5ef592cbfee 100644
--- a/drivers/media/dvb/dvb-usb/m920x.h
+++ b/drivers/media/dvb/dvb-usb/m920x.h
@@ -19,17 +19,35 @@
19 19
20#define M9206_MAX_FILTERS 8 20#define M9206_MAX_FILTERS 8
21 21
22#define M9206_I2C_TUNER 0 22/*
23#define M9206_I2C_DEMOD 1 23sequences found in logs:
24#define M9206_I2C_MAX 2 24[index value]
250x80 write addr
26(0x00 out byte)*
270x40 out byte
28
290x80 write addr
30(0x00 out byte)*
310x80 read addr
32(0x21 in byte)*
330x60 in byte
34
35this sequence works:
360x80 read addr
37(0x21 in byte)*
380x60 in byte
39
40_my guess_:
410x80: begin i2c transfer using address. value=address<<1|(reading?1:0)
420x00: write byte
430x21: read byte, more to follow
440x40: write last byte of message sequence
450x60: read last byte of message sequence
46 */
25 47
26struct m9206_state { 48struct m9206_state {
27 u16 filters[M9206_MAX_FILTERS]; 49 u16 filters[M9206_MAX_FILTERS];
28 int filtering_enabled; 50 int filtering_enabled;
29 int rep_count; 51 int rep_count;
30 struct {
31 unsigned char addr;
32 unsigned char magic;
33 }i2c_r[M9206_I2C_MAX];
34}; 52};
35#endif 53#endif