tda10071.h 2.1 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/kconfig.h>
  23. #include <linux/dvb/frontend.h>
  24. struct tda10071_config {
  25. /* Demodulator I2C address.
  26. * Default: none, must set
  27. * Values: 0x55,
  28. */
  29. u8 demod_i2c_addr;
  30. /* Tuner I2C address.
  31. * Default: none, must set
  32. * Values: 0x14, 0x54, ...
  33. */
  34. u8 tuner_i2c_addr;
  35. /* Max bytes I2C provider can write at once.
  36. * Note: Buffer is taken from the stack currently!
  37. * Default: none, must set
  38. * Values:
  39. */
  40. u16 i2c_wr_max;
  41. /* TS output mode.
  42. * Default: TDA10071_TS_SERIAL
  43. * Values:
  44. */
  45. #define TDA10071_TS_SERIAL 0
  46. #define TDA10071_TS_PARALLEL 1
  47. u8 ts_mode;
  48. /* Input spectrum inversion.
  49. * Default: 0
  50. * Values: 0, 1
  51. */
  52. bool spec_inv;
  53. /* Xtal frequency Hz
  54. * Default: none, must set
  55. * Values:
  56. */
  57. u32 xtal;
  58. /* PLL multiplier.
  59. * Default: none, must set
  60. * Values:
  61. */
  62. u8 pll_multiplier;
  63. };
  64. #if IS_ENABLED(CONFIG_DVB_TDA10071)
  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 */