dib3000.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * public header file of the frontend drivers for mobile DVB-T demodulators
  4. * DiBcom 3000M-B and DiBcom 3000P/M-C (http://www.dibcom.fr/)
  5. *
  6. * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)
  7. *
  8. * based on GPL code from DibCom, which has
  9. *
  10. * Copyright (C) 2004 Amaury Demol for DiBcom
  11. *
  12. * Acknowledgements
  13. *
  14. * Amaury Demol from DiBcom for providing specs and driver
  15. * sources, on which this driver (and the dvb-dibusb) are based.
  16. *
  17. * see Documentation/media/dvb-drivers/dvb-usb.rst for more information
  18. */
  19. #ifndef DIB3000_H
  20. #define DIB3000_H
  21. #include <linux/dvb/frontend.h>
  22. struct dib3000_config
  23. {
  24. /* the demodulator's i2c address */
  25. u8 demod_address;
  26. };
  27. struct dib_fe_xfer_ops
  28. {
  29. /* pid and transfer handling is done in the demodulator */
  30. int (*pid_parse)(struct dvb_frontend *fe, int onoff);
  31. int (*fifo_ctrl)(struct dvb_frontend *fe, int onoff);
  32. int (*pid_ctrl)(struct dvb_frontend *fe, int index, int pid, int onoff);
  33. int (*tuner_pass_ctrl)(struct dvb_frontend *fe, int onoff, u8 pll_ctrl);
  34. };
  35. #if IS_REACHABLE(CONFIG_DVB_DIB3000MB)
  36. extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
  37. struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops);
  38. #else
  39. static inline struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
  40. struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops)
  41. {
  42. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  43. return NULL;
  44. }
  45. #endif // CONFIG_DVB_DIB3000MB
  46. #endif // DIB3000_H