stv0297.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. Driver for STV0297 demodulator
  4. Copyright (C) 2003-2004 Dennis Noermann <dennis.noermann@noernet.de>
  5. */
  6. #ifndef STV0297_H
  7. #define STV0297_H
  8. #include <linux/dvb/frontend.h>
  9. #include <media/dvb_frontend.h>
  10. struct stv0297_config
  11. {
  12. /* the demodulator's i2c address */
  13. u8 demod_address;
  14. /* inittab - array of pairs of values.
  15. * First of each pair is the register, second is the value.
  16. * List should be terminated with an 0xff, 0xff pair.
  17. */
  18. u8* inittab;
  19. /* does the "inversion" need inverted? */
  20. u8 invert:1;
  21. /* set to 1 if the device requires an i2c STOP during reading */
  22. u8 stop_during_read:1;
  23. };
  24. #if IS_REACHABLE(CONFIG_DVB_STV0297)
  25. extern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config,
  26. struct i2c_adapter* i2c);
  27. #else
  28. static inline struct dvb_frontend* stv0297_attach(const struct stv0297_config* config,
  29. struct i2c_adapter* i2c)
  30. {
  31. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  32. return NULL;
  33. }
  34. #endif // CONFIG_DVB_STV0297
  35. #endif // STV0297_H