ix2505v.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner
  4. *
  5. * Copyright (C) 2010 Malcolm Priestley
  6. */
  7. #ifndef DVB_IX2505V_H
  8. #define DVB_IX2505V_H
  9. #include <linux/i2c.h>
  10. #include <media/dvb_frontend.h>
  11. /**
  12. * struct ix2505v_config - ix2505 attachment configuration
  13. *
  14. * @tuner_address: tuner address
  15. * @tuner_gain: Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB
  16. * @tuner_chargepump: Charge pump output +/- 0=120 1=260 2=555 3=1200(default)
  17. * @min_delay_ms: delay after tune
  18. * @tuner_write_only: disables reads
  19. */
  20. struct ix2505v_config {
  21. u8 tuner_address;
  22. u8 tuner_gain;
  23. u8 tuner_chargepump;
  24. int min_delay_ms;
  25. u8 tuner_write_only;
  26. };
  27. #if IS_REACHABLE(CONFIG_DVB_IX2505V)
  28. /**
  29. * ix2505v_attach - Attach a ix2505v tuner to the supplied frontend structure.
  30. *
  31. * @fe: Frontend to attach to.
  32. * @config: pointer to &struct ix2505v_config
  33. * @i2c: pointer to &struct i2c_adapter.
  34. *
  35. * return: FE pointer on success, NULL on failure.
  36. */
  37. extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
  38. const struct ix2505v_config *config, struct i2c_adapter *i2c);
  39. #else
  40. static inline struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
  41. const struct ix2505v_config *config, struct i2c_adapter *i2c)
  42. {
  43. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  44. return NULL;
  45. }
  46. #endif
  47. #endif /* DVB_IX2505V_H */