zl10353.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for Zarlink DVB-T ZL10353 demodulator
  4. *
  5. * Copyright (C) 2006, 2007 Christopher Pascoe <c.pascoe@itee.uq.edu.au>
  6. */
  7. #ifndef ZL10353_H
  8. #define ZL10353_H
  9. #include <linux/dvb/frontend.h>
  10. struct zl10353_config
  11. {
  12. /* demodulator's I2C address */
  13. u8 demod_address;
  14. /* frequencies in units of 0.1kHz */
  15. int adc_clock; /* default: 450560 (45.056 MHz) */
  16. int if2; /* default: 361667 (36.1667 MHz) */
  17. /* set if no pll is connected to the secondary i2c bus */
  18. int no_tuner;
  19. /* set if parallel ts output is required */
  20. int parallel_ts;
  21. /* set if i2c_gate_ctrl disable is required */
  22. u8 disable_i2c_gate_ctrl:1;
  23. /* clock control registers (0x51-0x54) */
  24. u8 clock_ctl_1; /* default: 0x46 */
  25. u8 pll_0; /* default: 0x15 */
  26. };
  27. #if IS_REACHABLE(CONFIG_DVB_ZL10353)
  28. extern struct dvb_frontend* zl10353_attach(const struct zl10353_config *config,
  29. struct i2c_adapter *i2c);
  30. #else
  31. static inline struct dvb_frontend* zl10353_attach(const struct zl10353_config *config,
  32. struct i2c_adapter *i2c)
  33. {
  34. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  35. return NULL;
  36. }
  37. #endif /* CONFIG_DVB_ZL10353 */
  38. #endif /* ZL10353_H */