m920x.h 1005 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef _DVB_USB_M920X_H_
  2. #define _DVB_USB_M920X_H_
  3. #define DVB_USB_LOG_PREFIX "m920x"
  4. #include "dvb-usb.h"
  5. #define deb_rc(args...) dprintk(dvb_usb_m920x_debug,0x01,args)
  6. #define M9206_CORE 0x22
  7. #define M9206_RC_STATE 0xff51
  8. #define M9206_RC_KEY 0xff52
  9. #define M9206_RC_INIT1 0xff54
  10. #define M9206_RC_INIT2 0xff55
  11. #define M9206_FW_GO 0xff69
  12. #define M9206_I2C 0x23
  13. #define M9206_FILTER 0x25
  14. #define M9206_FW 0x30
  15. #define M9206_MAX_FILTERS 8
  16. /*
  17. sequences found in logs:
  18. [index value]
  19. 0x80 write addr
  20. (0x00 out byte)*
  21. 0x40 out byte
  22. 0x80 write addr
  23. (0x00 out byte)*
  24. 0x80 read addr
  25. (0x21 in byte)*
  26. 0x60 in byte
  27. this sequence works:
  28. 0x80 read addr
  29. (0x21 in byte)*
  30. 0x60 in byte
  31. _my guess_:
  32. 0x80: begin i2c transfer using address. value=address<<1|(reading?1:0)
  33. 0x00: write byte
  34. 0x21: read byte, more to follow
  35. 0x40: write last byte of message sequence
  36. 0x60: read last byte of message sequence
  37. */
  38. struct m9206_state {
  39. u16 filters[M9206_MAX_FILTERS];
  40. int filtering_enabled;
  41. int rep_count;
  42. };
  43. #endif