qt1010.h 1018 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for Quantek QT1010 silicon tuner
  4. *
  5. * Copyright (C) 2006 Antti Palosaari <crope@iki.fi>
  6. * Aapo Tahkola <aet@rasterburn.org>
  7. */
  8. #ifndef QT1010_H
  9. #define QT1010_H
  10. #include <media/dvb_frontend.h>
  11. struct qt1010_config {
  12. u8 i2c_address;
  13. };
  14. /**
  15. * Attach a qt1010 tuner to the supplied frontend structure.
  16. *
  17. * @param fe frontend to attach to
  18. * @param i2c i2c adapter to use
  19. * @param cfg tuner hw based configuration
  20. * @return fe pointer on success, NULL on failure
  21. */
  22. #if IS_REACHABLE(CONFIG_MEDIA_TUNER_QT1010)
  23. extern struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
  24. struct i2c_adapter *i2c,
  25. struct qt1010_config *cfg);
  26. #else
  27. static inline struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
  28. struct i2c_adapter *i2c,
  29. struct qt1010_config *cfg)
  30. {
  31. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  32. return NULL;
  33. }
  34. #endif // CONFIG_MEDIA_TUNER_QT1010
  35. #endif