tda10071.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 i2c_address;
  29. /* Max bytes I2C provider can write at once.
  30. * Note: Buffer is taken from the stack currently!
  31. * Default: none, must set
  32. * Values:
  33. */
  34. u16 i2c_wr_max;
  35. /* TS output mode.
  36. * Default: TDA10071_TS_SERIAL
  37. * Values:
  38. */
  39. #define TDA10071_TS_SERIAL 0
  40. #define TDA10071_TS_PARALLEL 1
  41. u8 ts_mode;
  42. /* Input spectrum inversion.
  43. * Default: 0
  44. * Values: 0, 1
  45. */
  46. bool spec_inv;
  47. /* Xtal frequency Hz
  48. * Default: none, must set
  49. * Values:
  50. */
  51. u32 xtal;
  52. /* PLL multiplier.
  53. * Default: none, must set
  54. * Values:
  55. */
  56. u8 pll_multiplier;
  57. };
  58. #if defined(CONFIG_DVB_TDA10071) || \
  59. (defined(CONFIG_DVB_TDA10071_MODULE) && defined(MODULE))
  60. extern struct dvb_frontend *tda10071_attach(
  61. const struct tda10071_config *config, struct i2c_adapter *i2c);
  62. #else
  63. static inline struct dvb_frontend *tda10071_attach(
  64. const struct tda10071_config *config, struct i2c_adapter *i2c)
  65. {
  66. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  67. return NULL;
  68. }
  69. #endif
  70. #endif /* TDA10071_H */