tda10071.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * NXP TDA10071 + Conexant CX24118A DVB-S/S2 demodulator + tuner driver
  3. *
  4. * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
  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. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #ifndef TDA10071_H
  21. #define TDA10071_H
  22. #include <linux/dvb/frontend.h>
  23. struct tda10071_config {
  24. /* Demodulator I2C address.
  25. * Default: none, must set
  26. * Values: 0x55,
  27. */
  28. u8 demod_i2c_addr;
  29. /* Tuner I2C address.
  30. * Default: none, must set
  31. * Values: 0x14, 0x54, ...
  32. */
  33. u8 tuner_i2c_addr;
  34. /* Max bytes I2C provider can write at once.
  35. * Note: Buffer is taken from the stack currently!
  36. * Default: none, must set
  37. * Values:
  38. */
  39. u16 i2c_wr_max;
  40. /* TS output mode.
  41. * Default: TDA10071_TS_SERIAL
  42. * Values:
  43. */
  44. #define TDA10071_TS_SERIAL 0
  45. #define TDA10071_TS_PARALLEL 1
  46. u8 ts_mode;
  47. /* Input spectrum inversion.
  48. * Default: 0
  49. * Values: 0, 1
  50. */
  51. bool spec_inv;
  52. /* Xtal frequency Hz
  53. * Default: none, must set
  54. * Values:
  55. */
  56. u32 xtal;
  57. /* PLL multiplier.
  58. * Default: none, must set
  59. * Values:
  60. */
  61. u8 pll_multiplier;
  62. };
  63. #if defined(CONFIG_DVB_TDA10071) || \
  64. (defined(CONFIG_DVB_TDA10071_MODULE) && defined(MODULE))
  65. extern struct dvb_frontend *tda10071_attach(
  66. const struct tda10071_config *config, struct i2c_adapter *i2c);
  67. #else
  68. static inline struct dvb_frontend *tda10071_attach(
  69. const struct tda10071_config *config, struct i2c_adapter *i2c)
  70. {
  71. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  72. return NULL;
  73. }
  74. #endif
  75. #endif /* TDA10071_H */