ves1820.h 977 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. VES1820 - Single Chip Cable Channel Receiver driver module
  4. Copyright (C) 1999 Convergence Integrated Media GmbH <[email protected]>
  5. */
  6. #ifndef VES1820_H
  7. #define VES1820_H
  8. #include <linux/dvb/frontend.h>
  9. #define VES1820_SELAGC_PWM 0
  10. #define VES1820_SELAGC_SIGNAMPERR 1
  11. struct ves1820_config
  12. {
  13. /* the demodulator's i2c address */
  14. u8 demod_address;
  15. /* value of XIN to use */
  16. u32 xin;
  17. /* does inversion need inverted? */
  18. u8 invert:1;
  19. /* SELAGC control */
  20. u8 selagc:1;
  21. };
  22. #if IS_REACHABLE(CONFIG_DVB_VES1820)
  23. extern struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
  24. struct i2c_adapter* i2c, u8 pwm);
  25. #else
  26. static inline struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
  27. struct i2c_adapter* i2c, u8 pwm)
  28. {
  29. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  30. return NULL;
  31. }
  32. #endif // CONFIG_DVB_VES1820
  33. #endif // VES1820_H