stv0910.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Driver for the ST STV0910 DVB-S/S2 demodulator.
  4. *
  5. * Copyright (C) 2014-2015 Ralph Metzler <rjkm@metzlerbros.de>
  6. * Marcus Metzler <mocm@metzlerbros.de>
  7. * developed for Digital Devices GmbH
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * version 2 only, as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #ifndef _STV0910_H_
  19. #define _STV0910_H_
  20. #include <linux/types.h>
  21. #include <linux/i2c.h>
  22. struct stv0910_cfg {
  23. u32 clk;
  24. u8 adr;
  25. u8 parallel;
  26. u8 rptlvl;
  27. u8 single;
  28. u8 tsspeed;
  29. };
  30. #if IS_REACHABLE(CONFIG_DVB_STV0910)
  31. struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
  32. struct stv0910_cfg *cfg, int nr);
  33. #else
  34. static inline struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
  35. struct stv0910_cfg *cfg,
  36. int nr)
  37. {
  38. pr_warn("%s: driver disabled by Kconfig\n", __func__);
  39. return NULL;
  40. }
  41. #endif /* CONFIG_DVB_STV0910 */
  42. #endif /* _STV0910_H_ */