tuner-xc2028.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* tuner-xc2028
  2. *
  3. * Copyright (c) 2007 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. /* Dmoduler IF (kHz) */
  11. #define XC3028_FE_DEFAULT 0
  12. #define XC3028_FE_LG60 6000
  13. #define XC3028_FE_ATI638 6380
  14. #define XC3028_FE_OREN538 5380
  15. #define XC3028_FE_OREN36 3600
  16. #define XC3028_FE_TOYOTA388 3880
  17. #define XC3028_FE_TOYOTA794 7940
  18. #define XC3028_FE_DIBCOM52 5200
  19. #define XC3028_FE_ZARLINK456 4560
  20. #define XC3028_FE_CHINA 5200
  21. struct xc2028_ctrl {
  22. char *fname;
  23. int max_len;
  24. unsigned int scode_table;
  25. unsigned int mts :1;
  26. unsigned int d2633 :1;
  27. unsigned int input1:1;
  28. unsigned int demod;
  29. };
  30. struct xc2028_config {
  31. struct i2c_adapter *i2c_adap;
  32. u8 i2c_addr;
  33. void *video_dev;
  34. struct xc2028_ctrl *ctrl;
  35. int (*callback) (void *dev, int command, int arg);
  36. };
  37. /* xc2028 commands for callback */
  38. #define XC2028_TUNER_RESET 0
  39. #define XC2028_RESET_CLK 1
  40. #if defined(CONFIG_TUNER_XC2028) || (defined(CONFIG_TUNER_XC2028_MODULE) && defined(MODULE))
  41. void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg);
  42. #else
  43. void *xc2028_attach(struct dvb_frontend *fe,
  44. struct xc2028_config *cfg)
  45. {
  46. printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
  47. __FUNCTION__);
  48. return -EINVAL;
  49. }
  50. #endif
  51. #endif /* __TUNER_XC2028_H__ */