s5h1420.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for
  4. * Samsung S5H1420 and
  5. * PnpNetwork PN1010 QPSK Demodulator
  6. *
  7. * Copyright (C) 2005 Andrew de Quincey <[email protected]>
  8. * Copyright (C) 2005-8 Patrick Boettcher <[email protected]>
  9. */
  10. #ifndef S5H1420_H
  11. #define S5H1420_H
  12. #include <linux/dvb/frontend.h>
  13. struct s5h1420_config
  14. {
  15. /* the demodulator's i2c address */
  16. u8 demod_address;
  17. /* does the inversion require inversion? */
  18. u8 invert:1;
  19. u8 repeated_start_workaround:1;
  20. u8 cdclk_polarity:1; /* 1 == falling edge, 0 == raising edge */
  21. u8 serial_mpeg:1;
  22. };
  23. #if IS_REACHABLE(CONFIG_DVB_S5H1420)
  24. extern struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
  25. struct i2c_adapter *i2c);
  26. extern struct i2c_adapter *s5h1420_get_tuner_i2c_adapter(struct dvb_frontend *fe);
  27. #else
  28. static inline struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
  29. struct i2c_adapter *i2c)
  30. {
  31. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  32. return NULL;
  33. }
  34. static inline struct i2c_adapter *s5h1420_get_tuner_i2c_adapter(struct dvb_frontend *fe)
  35. {
  36. return NULL;
  37. }
  38. #endif // CONFIG_DVB_S5H1420
  39. #endif // S5H1420_H