mxl5007t.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * mxl5007t.h - driver for the MaxLinear MxL5007T silicon tuner
  3. *
  4. * Copyright (C) 2008 Michael Krufky <mkrufky@linuxtv.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef __MXL5007T_H__
  17. #define __MXL5007T_H__
  18. #include <media/dvb_frontend.h>
  19. /* ------------------------------------------------------------------------- */
  20. enum mxl5007t_if_freq {
  21. MxL_IF_4_MHZ, /* 4000000 */
  22. MxL_IF_4_5_MHZ, /* 4500000 */
  23. MxL_IF_4_57_MHZ, /* 4570000 */
  24. MxL_IF_5_MHZ, /* 5000000 */
  25. MxL_IF_5_38_MHZ, /* 5380000 */
  26. MxL_IF_6_MHZ, /* 6000000 */
  27. MxL_IF_6_28_MHZ, /* 6280000 */
  28. MxL_IF_9_1915_MHZ, /* 9191500 */
  29. MxL_IF_35_25_MHZ, /* 35250000 */
  30. MxL_IF_36_15_MHZ, /* 36150000 */
  31. MxL_IF_44_MHZ, /* 44000000 */
  32. };
  33. enum mxl5007t_xtal_freq {
  34. MxL_XTAL_16_MHZ, /* 16000000 */
  35. MxL_XTAL_20_MHZ, /* 20000000 */
  36. MxL_XTAL_20_25_MHZ, /* 20250000 */
  37. MxL_XTAL_20_48_MHZ, /* 20480000 */
  38. MxL_XTAL_24_MHZ, /* 24000000 */
  39. MxL_XTAL_25_MHZ, /* 25000000 */
  40. MxL_XTAL_25_14_MHZ, /* 25140000 */
  41. MxL_XTAL_27_MHZ, /* 27000000 */
  42. MxL_XTAL_28_8_MHZ, /* 28800000 */
  43. MxL_XTAL_32_MHZ, /* 32000000 */
  44. MxL_XTAL_40_MHZ, /* 40000000 */
  45. MxL_XTAL_44_MHZ, /* 44000000 */
  46. MxL_XTAL_48_MHZ, /* 48000000 */
  47. MxL_XTAL_49_3811_MHZ, /* 49381100 */
  48. };
  49. enum mxl5007t_clkout_amp {
  50. MxL_CLKOUT_AMP_0_94V = 0,
  51. MxL_CLKOUT_AMP_0_53V = 1,
  52. MxL_CLKOUT_AMP_0_37V = 2,
  53. MxL_CLKOUT_AMP_0_28V = 3,
  54. MxL_CLKOUT_AMP_0_23V = 4,
  55. MxL_CLKOUT_AMP_0_20V = 5,
  56. MxL_CLKOUT_AMP_0_17V = 6,
  57. MxL_CLKOUT_AMP_0_15V = 7,
  58. };
  59. struct mxl5007t_config {
  60. s32 if_diff_out_level;
  61. enum mxl5007t_clkout_amp clk_out_amp;
  62. enum mxl5007t_xtal_freq xtal_freq_hz;
  63. enum mxl5007t_if_freq if_freq_hz;
  64. unsigned int invert_if:1;
  65. unsigned int loop_thru_enable:1;
  66. unsigned int clk_out_enable:1;
  67. };
  68. #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MXL5007T)
  69. extern struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
  70. struct i2c_adapter *i2c, u8 addr,
  71. struct mxl5007t_config *cfg);
  72. #else
  73. static inline struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
  74. struct i2c_adapter *i2c,
  75. u8 addr,
  76. struct mxl5007t_config *cfg)
  77. {
  78. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  79. return NULL;
  80. }
  81. #endif
  82. #endif /* __MXL5007T_H__ */