r820t.h 885 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Elonics R820T silicon tuner driver
  4. *
  5. * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
  6. */
  7. #ifndef R820T_H
  8. #define R820T_H
  9. #include <media/dvb_frontend.h>
  10. enum r820t_chip {
  11. CHIP_R820T,
  12. CHIP_R620D,
  13. CHIP_R828D,
  14. CHIP_R828,
  15. CHIP_R828S,
  16. CHIP_R820C,
  17. };
  18. struct r820t_config {
  19. u8 i2c_addr; /* 0x34 */
  20. u32 xtal;
  21. enum r820t_chip rafael_chip;
  22. unsigned max_i2c_msg_len;
  23. bool use_diplexer;
  24. bool use_predetect;
  25. };
  26. #if IS_REACHABLE(CONFIG_MEDIA_TUNER_R820T)
  27. struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
  28. struct i2c_adapter *i2c,
  29. const struct r820t_config *cfg);
  30. #else
  31. static inline struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
  32. struct i2c_adapter *i2c,
  33. const struct r820t_config *cfg)
  34. {
  35. pr_warn("%s: driver disabled by Kconfig\n", __func__);
  36. return NULL;
  37. }
  38. #endif
  39. #endif