stv0367.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * stv0367.h
  4. *
  5. * Driver for ST STV0367 DVB-T & DVB-C demodulator IC.
  6. *
  7. * Copyright (C) ST Microelectronics.
  8. * Copyright (C) 2010,2011 NetUP Inc.
  9. * Copyright (C) 2010,2011 Igor M. Liplianin <[email protected]>
  10. */
  11. #ifndef STV0367_H
  12. #define STV0367_H
  13. #include <linux/dvb/frontend.h>
  14. #include <media/dvb_frontend.h>
  15. #define STV0367_ICSPEED_53125 53125000
  16. #define STV0367_ICSPEED_58000 58000000
  17. struct stv0367_config {
  18. u8 demod_address;
  19. u32 xtal;
  20. u32 if_khz;/*4500*/
  21. int if_iq_mode;
  22. int ts_mode;
  23. int clk_pol;
  24. };
  25. #if IS_REACHABLE(CONFIG_DVB_STV0367)
  26. extern struct
  27. dvb_frontend *stv0367ter_attach(const struct stv0367_config *config,
  28. struct i2c_adapter *i2c);
  29. extern struct
  30. dvb_frontend *stv0367cab_attach(const struct stv0367_config *config,
  31. struct i2c_adapter *i2c);
  32. extern struct
  33. dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config,
  34. struct i2c_adapter *i2c);
  35. #else
  36. static inline struct
  37. dvb_frontend *stv0367ter_attach(const struct stv0367_config *config,
  38. struct i2c_adapter *i2c)
  39. {
  40. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  41. return NULL;
  42. }
  43. static inline struct
  44. dvb_frontend *stv0367cab_attach(const struct stv0367_config *config,
  45. struct i2c_adapter *i2c)
  46. {
  47. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  48. return NULL;
  49. }
  50. static inline struct
  51. dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config,
  52. struct i2c_adapter *i2c)
  53. {
  54. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  55. return NULL;
  56. }
  57. #endif
  58. #endif