tuner-xc2028.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* tuner-xc2028
  2. *
  3. * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
  4. * This code is placed under the terms of the GNU General Public License v2
  5. */
  6. #ifndef __TUNER_XC2028_H__
  7. #define __TUNER_XC2028_H__
  8. #include "dvb_frontend.h"
  9. #define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
  10. #define XC3028L_DEFAULT_FIRMWARE "xc3028L-v36.fw"
  11. /* Dmoduler IF (kHz) */
  12. #define XC3028_FE_DEFAULT 0 /* Don't load SCODE */
  13. #define XC3028_FE_LG60 6000
  14. #define XC3028_FE_ATI638 6380
  15. #define XC3028_FE_OREN538 5380
  16. #define XC3028_FE_OREN36 3600
  17. #define XC3028_FE_TOYOTA388 3880
  18. #define XC3028_FE_TOYOTA794 7940
  19. #define XC3028_FE_DIBCOM52 5200
  20. #define XC3028_FE_ZARLINK456 4560
  21. #define XC3028_FE_CHINA 5200
  22. enum firmware_type {
  23. XC2028_AUTO = 0, /* By default, auto-detects */
  24. XC2028_D2633,
  25. XC2028_D2620,
  26. };
  27. struct xc2028_ctrl {
  28. char *fname;
  29. int max_len;
  30. unsigned int scode_table;
  31. unsigned int mts :1;
  32. unsigned int input1:1;
  33. unsigned int vhfbw7:1;
  34. unsigned int uhfbw8:1;
  35. unsigned int demod;
  36. enum firmware_type type:2;
  37. };
  38. struct xc2028_config {
  39. struct i2c_adapter *i2c_adap;
  40. u8 i2c_addr;
  41. struct xc2028_ctrl *ctrl;
  42. };
  43. /* xc2028 commands for callback */
  44. #define XC2028_TUNER_RESET 0
  45. #define XC2028_RESET_CLK 1
  46. #if defined(CONFIG_MEDIA_TUNER_XC2028) || (defined(CONFIG_MEDIA_TUNER_XC2028_MODULE) && defined(MODULE))
  47. extern struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
  48. struct xc2028_config *cfg);
  49. #else
  50. static inline struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
  51. struct xc2028_config *cfg)
  52. {
  53. printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
  54. __func__);
  55. return NULL;
  56. }
  57. #endif
  58. #endif /* __TUNER_XC2028_H__ */