lnbp21.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * lnbp21.h - driver for lnb supply and control ic lnbp21
  4. *
  5. * Copyright (C) 2006 Oliver Endriss
  6. *
  7. * the project's page is at https://linuxtv.org
  8. */
  9. #ifndef _LNBP21_H
  10. #define _LNBP21_H
  11. /* system register bits */
  12. /* [RO] 0=OK; 1=over current limit flag */
  13. #define LNBP21_OLF 0x01
  14. /* [RO] 0=OK; 1=over temperature flag (150 C) */
  15. #define LNBP21_OTF 0x02
  16. /* [RW] 0=disable LNB power, enable loopthrough
  17. 1=enable LNB power, disable loopthrough */
  18. #define LNBP21_EN 0x04
  19. /* [RW] 0=low voltage (13/14V, vert pol)
  20. 1=high voltage (18/19V,horiz pol) */
  21. #define LNBP21_VSEL 0x08
  22. /* [RW] increase LNB voltage by 1V:
  23. 0=13/18V; 1=14/19V */
  24. #define LNBP21_LLC 0x10
  25. /* [RW] 0=tone controlled by DSQIN pin
  26. 1=tone enable, disable DSQIN */
  27. #define LNBP21_TEN 0x20
  28. /* [RW] current limit select:
  29. 0:Iout=500-650mA Isc=300mA
  30. 1:Iout=400-550mA Isc=200mA */
  31. #define LNBP21_ISEL 0x40
  32. /* [RW] short-circuit protect:
  33. 0=pulsed (dynamic) curr limiting
  34. 1=static curr limiting */
  35. #define LNBP21_PCL 0x80
  36. #include <linux/dvb/frontend.h>
  37. #if IS_REACHABLE(CONFIG_DVB_LNBP21)
  38. /* override_set and override_clear control which
  39. system register bits (above) to always set & clear */
  40. extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
  41. struct i2c_adapter *i2c, u8 override_set,
  42. u8 override_clear);
  43. #else
  44. static inline struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
  45. struct i2c_adapter *i2c, u8 override_set,
  46. u8 override_clear)
  47. {
  48. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  49. return NULL;
  50. }
  51. #endif
  52. #endif