lnbh25.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * lnbh25.c
  4. *
  5. * Driver for LNB supply and control IC LNBH25
  6. *
  7. * Copyright (C) 2014 NetUP Inc.
  8. * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>
  9. * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>
  10. */
  11. #ifndef LNBH25_H
  12. #define LNBH25_H
  13. #include <linux/i2c.h>
  14. #include <linux/dvb/frontend.h>
  15. /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */
  16. #define LNBH25_TEN 0x01
  17. /* Low power mode activated (used only with 22 kHz tone output disabled) */
  18. #define LNBH25_LPM 0x02
  19. /* DSQIN input pin is set to receive external 22 kHz TTL signal source */
  20. #define LNBH25_EXTM 0x04
  21. struct lnbh25_config {
  22. u8 i2c_address;
  23. u8 data2_config;
  24. };
  25. #if IS_REACHABLE(CONFIG_DVB_LNBH25)
  26. struct dvb_frontend *lnbh25_attach(
  27. struct dvb_frontend *fe,
  28. struct lnbh25_config *cfg,
  29. struct i2c_adapter *i2c);
  30. #else
  31. static inline struct dvb_frontend *lnbh25_attach(
  32. struct dvb_frontend *fe,
  33. struct lnbh25_config *cfg,
  34. struct i2c_adapter *i2c)
  35. {
  36. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  37. return NULL;
  38. }
  39. #endif
  40. #endif