lnbh24.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * lnbh24.h - driver for lnb supply and control ic lnbh24
  4. *
  5. * Copyright (C) 2009 NetUP Inc.
  6. * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
  7. */
  8. #ifndef _LNBH24_H
  9. #define _LNBH24_H
  10. /* system register bits */
  11. #define LNBH24_OLF 0x01
  12. #define LNBH24_OTF 0x02
  13. #define LNBH24_EN 0x04
  14. #define LNBH24_VSEL 0x08
  15. #define LNBH24_LLC 0x10
  16. #define LNBH24_TEN 0x20
  17. #define LNBH24_TTX 0x40
  18. #define LNBH24_PCL 0x80
  19. #include <linux/dvb/frontend.h>
  20. #if IS_REACHABLE(CONFIG_DVB_LNBP21)
  21. /* override_set and override_clear control which
  22. system register bits (above) to always set & clear */
  23. extern struct dvb_frontend *lnbh24_attach(struct dvb_frontend *fe,
  24. struct i2c_adapter *i2c, u8 override_set,
  25. u8 override_clear, u8 i2c_addr);
  26. #else
  27. static inline struct dvb_frontend *lnbh24_attach(struct dvb_frontend *fe,
  28. struct i2c_adapter *i2c, u8 override_set,
  29. u8 override_clear, u8 i2c_addr)
  30. {
  31. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  32. return NULL;
  33. }
  34. #endif
  35. #endif