drxd.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * drxd.h: DRXD DVB-T demodulator driver
  3. *
  4. * Copyright (C) 2005-2007 Micronas
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * version 2 only, as published by the Free Software Foundation.
  9. *
  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. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20. * 02110-1301, USA
  21. * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
  22. */
  23. #ifndef _DRXD_H_
  24. #define _DRXD_H_
  25. #include <linux/kconfig.h>
  26. #include <linux/types.h>
  27. #include <linux/i2c.h>
  28. struct drxd_config {
  29. u8 index;
  30. u8 pll_address;
  31. u8 pll_type;
  32. #define DRXD_PLL_NONE 0
  33. #define DRXD_PLL_DTT7520X 1
  34. #define DRXD_PLL_MT3X0823 2
  35. u32 clock;
  36. u8 insert_rs_byte;
  37. u8 demod_address;
  38. u8 demoda_address;
  39. u8 demod_revision;
  40. /* If the tuner is not behind an i2c gate, be sure to flip this bit
  41. or else the i2c bus could get wedged */
  42. u8 disable_i2c_gate_ctrl;
  43. u32 IF;
  44. s16(*osc_deviation) (void *priv, s16 dev, int flag);
  45. };
  46. #if IS_REACHABLE(CONFIG_DVB_DRXD)
  47. extern
  48. struct dvb_frontend *drxd_attach(const struct drxd_config *config,
  49. void *priv, struct i2c_adapter *i2c,
  50. struct device *dev);
  51. #else
  52. static inline
  53. struct dvb_frontend *drxd_attach(const struct drxd_config *config,
  54. void *priv, struct i2c_adapter *i2c,
  55. struct device *dev)
  56. {
  57. printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
  58. __func__);
  59. return NULL;
  60. }
  61. #endif
  62. #endif