ix2505v.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner
  3. *
  4. * Copyright (C) 2010 Malcolm Priestley
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License Version 2, as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19. #ifndef DVB_IX2505V_H
  20. #define DVB_IX2505V_H
  21. #include <linux/kconfig.h>
  22. #include <linux/i2c.h>
  23. #include "dvb_frontend.h"
  24. /**
  25. * Attach a ix2505v tuner to the supplied frontend structure.
  26. *
  27. * @param fe Frontend to attach to.
  28. * @param config ix2505v_config structure
  29. * @return FE pointer on success, NULL on failure.
  30. */
  31. struct ix2505v_config {
  32. u8 tuner_address;
  33. /*Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB */
  34. u8 tuner_gain;
  35. /*Charge pump output +/- 0=120 1=260 2=555 3=1200(default) */
  36. u8 tuner_chargepump;
  37. /* delay after tune */
  38. int min_delay_ms;
  39. /* disables reads*/
  40. u8 tuner_write_only;
  41. };
  42. #if IS_REACHABLE(CONFIG_DVB_IX2505V)
  43. extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
  44. const struct ix2505v_config *config, struct i2c_adapter *i2c);
  45. #else
  46. static inline struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
  47. const struct ix2505v_config *config, struct i2c_adapter *i2c)
  48. {
  49. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  50. return NULL;
  51. }
  52. #endif
  53. #endif /* DVB_IX2505V_H */