Michael Krufky | baa2ed0 | 2006-09-23 20:01:29 -0300 | [diff] [blame] | 1 | #ifndef _DVB_USB_M920X_H_ |
| 2 | #define _DVB_USB_M920X_H_ |
Aapo Tahkola | 5fecd9f | 2006-09-23 20:00:41 -0300 | [diff] [blame] | 3 | |
Michael Krufky | baa2ed0 | 2006-09-23 20:01:29 -0300 | [diff] [blame] | 4 | #define DVB_USB_LOG_PREFIX "m920x" |
Aapo Tahkola | 5fecd9f | 2006-09-23 20:00:41 -0300 | [diff] [blame] | 5 | #include "dvb-usb.h" |
| 6 | |
Michael Krufky | baa2ed0 | 2006-09-23 20:01:29 -0300 | [diff] [blame] | 7 | #define deb_rc(args...) dprintk(dvb_usb_m920x_debug,0x01,args) |
Aapo Tahkola | 5fecd9f | 2006-09-23 20:00:41 -0300 | [diff] [blame] | 8 | |
Aapo Tahkola | e2adbecf7 | 2006-09-28 00:47:51 -0300 | [diff] [blame] | 9 | #define M9206_CORE 0x22 |
Michael Krufky | 26f48ea | 2006-09-28 01:46:49 -0300 | [diff] [blame] | 10 | #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 Tahkola | e2adbecf7 | 2006-09-28 00:47:51 -0300 | [diff] [blame] | 15 | |
| 16 | #define M9206_I2C 0x23 |
| 17 | #define M9206_FILTER 0x25 |
| 18 | #define M9206_FW 0x30 |
| 19 | |
| 20 | #define M9206_MAX_FILTERS 8 |
Aapo Tahkola | 84ad757 | 2007-01-21 15:57:20 -0300 | [diff] [blame] | 21 | |
Aapo Tahkola | 2624701 | 2007-03-05 18:23:19 -0300 | [diff] [blame^] | 22 | /* |
| 23 | sequences found in logs: |
| 24 | [index value] |
| 25 | 0x80 write addr |
| 26 | (0x00 out byte)* |
| 27 | 0x40 out byte |
| 28 | |
| 29 | 0x80 write addr |
| 30 | (0x00 out byte)* |
| 31 | 0x80 read addr |
| 32 | (0x21 in byte)* |
| 33 | 0x60 in byte |
| 34 | |
| 35 | this sequence works: |
| 36 | 0x80 read addr |
| 37 | (0x21 in byte)* |
| 38 | 0x60 in byte |
| 39 | |
| 40 | _my guess_: |
| 41 | 0x80: begin i2c transfer using address. value=address<<1|(reading?1:0) |
| 42 | 0x00: write byte |
| 43 | 0x21: read byte, more to follow |
| 44 | 0x40: write last byte of message sequence |
| 45 | 0x60: read last byte of message sequence |
| 46 | */ |
Aapo Tahkola | 84ad757 | 2007-01-21 15:57:20 -0300 | [diff] [blame] | 47 | |
Aapo Tahkola | e2adbecf7 | 2006-09-28 00:47:51 -0300 | [diff] [blame] | 48 | struct m9206_state { |
| 49 | u16 filters[M9206_MAX_FILTERS]; |
| 50 | int filtering_enabled; |
| 51 | int rep_count; |
| 52 | }; |
Aapo Tahkola | 5fecd9f | 2006-09-23 20:00:41 -0300 | [diff] [blame] | 53 | #endif |