drxd.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * drxd.h: DRXD DVB-T demodulator driver
  4. *
  5. * Copyright (C) 2005-2007 Micronas
  6. */
  7. #ifndef _DRXD_H_
  8. #define _DRXD_H_
  9. #include <linux/types.h>
  10. #include <linux/i2c.h>
  11. struct drxd_config {
  12. u8 index;
  13. u8 pll_address;
  14. u8 pll_type;
  15. #define DRXD_PLL_NONE 0
  16. #define DRXD_PLL_DTT7520X 1
  17. #define DRXD_PLL_MT3X0823 2
  18. u32 clock;
  19. u8 insert_rs_byte;
  20. u8 demod_address;
  21. u8 demoda_address;
  22. u8 demod_revision;
  23. /* If the tuner is not behind an i2c gate, be sure to flip this bit
  24. or else the i2c bus could get wedged */
  25. u8 disable_i2c_gate_ctrl;
  26. u32 IF;
  27. s16(*osc_deviation) (void *priv, s16 dev, int flag);
  28. };
  29. #if IS_REACHABLE(CONFIG_DVB_DRXD)
  30. extern
  31. struct dvb_frontend *drxd_attach(const struct drxd_config *config,
  32. void *priv, struct i2c_adapter *i2c,
  33. struct device *dev);
  34. #else
  35. static inline
  36. struct dvb_frontend *drxd_attach(const struct drxd_config *config,
  37. void *priv, struct i2c_adapter *i2c,
  38. struct device *dev)
  39. {
  40. printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
  41. __func__);
  42. return NULL;
  43. }
  44. #endif
  45. #endif