blob: c5ef592cbfee41606e0380dc9bde3a0a6e73e908 [file] [log] [blame]
Michael Krufkybaa2ed02006-09-23 20:01:29 -03001#ifndef _DVB_USB_M920X_H_
2#define _DVB_USB_M920X_H_
Aapo Tahkola5fecd9f2006-09-23 20:00:41 -03003
Michael Krufkybaa2ed02006-09-23 20:01:29 -03004#define DVB_USB_LOG_PREFIX "m920x"
Aapo Tahkola5fecd9f2006-09-23 20:00:41 -03005#include "dvb-usb.h"
6
Michael Krufkybaa2ed02006-09-23 20:01:29 -03007#define deb_rc(args...) dprintk(dvb_usb_m920x_debug,0x01,args)
Aapo Tahkola5fecd9f2006-09-23 20:00:41 -03008
Aapo Tahkolae2adbecf72006-09-28 00:47:51 -03009#define M9206_CORE 0x22
Michael Krufky26f48ea2006-09-28 01:46:49 -030010#define M9206_RC_STATE 0xff51
11#define M9206_RC_KEY 0xff52
12#define M9206_RC_INIT1 0xff54
13#define M9206_RC_INIT2 0xff55
14#define M9206_FW_GO 0xff69
Aapo Tahkolae2adbecf72006-09-28 00:47:51 -030015
16#define M9206_I2C 0x23
17#define M9206_FILTER 0x25
18#define M9206_FW 0x30
19
20#define M9206_MAX_FILTERS 8
Aapo Tahkola84ad7572007-01-21 15:57:20 -030021
Aapo Tahkola26247012007-03-05 18:23:19 -030022/*
23sequences found in logs:
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 */
Aapo Tahkola84ad7572007-01-21 15:57:20 -030047
Aapo Tahkolae2adbecf72006-09-28 00:47:51 -030048struct m9206_state {
49 u16 filters[M9206_MAX_FILTERS];
50 int filtering_enabled;
51 int rep_count;
52};
Aapo Tahkola5fecd9f2006-09-23 20:00:41 -030053#endif