lnbp22.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * lnbp22.h - driver for lnb supply and control ic lnbp22
  3. *
  4. * Copyright (C) 2006 Dominik Kuhlen
  5. * Based on lnbp21.h
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * To obtain the license, point your browser to
  19. * http://www.gnu.org/copyleft/gpl.html
  20. *
  21. *
  22. * the project's page is at https://linuxtv.org
  23. */
  24. #ifndef _LNBP22_H
  25. #define _LNBP22_H
  26. /* Enable */
  27. #define LNBP22_EN 0x10
  28. /* Voltage selection */
  29. #define LNBP22_VSEL 0x02
  30. /* Plus 1 Volt Bit */
  31. #define LNBP22_LLC 0x01
  32. #include <linux/dvb/frontend.h>
  33. #if IS_REACHABLE(CONFIG_DVB_LNBP22)
  34. /*
  35. * override_set and override_clear control which system register bits (above)
  36. * to always set & clear
  37. */
  38. extern struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe,
  39. struct i2c_adapter *i2c);
  40. #else
  41. static inline struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe,
  42. struct i2c_adapter *i2c)
  43. {
  44. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  45. return NULL;
  46. }
  47. #endif /* CONFIG_DVB_LNBP22 */
  48. #endif /* _LNBP22_H */