m88rs2000.h 962 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. Driver for M88RS2000 demodulator
  4. */
  5. #ifndef M88RS2000_H
  6. #define M88RS2000_H
  7. #include <linux/dvb/frontend.h>
  8. #include <media/dvb_frontend.h>
  9. struct m88rs2000_config {
  10. /* Demodulator i2c address */
  11. u8 demod_addr;
  12. u8 *inittab;
  13. /* minimum delay before retuning */
  14. int min_delay_ms;
  15. int (*set_ts_params)(struct dvb_frontend *, int);
  16. };
  17. enum {
  18. CALL_IS_SET_FRONTEND = 0x0,
  19. CALL_IS_READ,
  20. };
  21. #if IS_REACHABLE(CONFIG_DVB_M88RS2000)
  22. extern struct dvb_frontend *m88rs2000_attach(
  23. const struct m88rs2000_config *config, struct i2c_adapter *i2c);
  24. #else
  25. static inline struct dvb_frontend *m88rs2000_attach(
  26. const struct m88rs2000_config *config, struct i2c_adapter *i2c)
  27. {
  28. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  29. return NULL;
  30. }
  31. #endif /* CONFIG_DVB_M88RS2000 */
  32. #define RS2000_FE_CRYSTAL_KHZ 27000
  33. enum {
  34. DEMOD_WRITE = 0x1,
  35. WRITE_DELAY = 0x10,
  36. };
  37. #endif /* M88RS2000_H */