lnbh25.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * lnbh25.c
  3. *
  4. * Driver for LNB supply and control IC LNBH25
  5. *
  6. * Copyright (C) 2014 NetUP Inc.
  7. * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>
  8. * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. */
  20. #ifndef LNBH25_H
  21. #define LNBH25_H
  22. #include <linux/i2c.h>
  23. #include <linux/dvb/frontend.h>
  24. /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */
  25. #define LNBH25_TEN 0x01
  26. /* Low power mode activated (used only with 22 kHz tone output disabled) */
  27. #define LNBH25_LPM 0x02
  28. /* DSQIN input pin is set to receive external 22 kHz TTL signal source */
  29. #define LNBH25_EXTM 0x04
  30. struct lnbh25_config {
  31. u8 i2c_address;
  32. u8 data2_config;
  33. };
  34. #if IS_REACHABLE(CONFIG_DVB_LNBH25)
  35. struct dvb_frontend *lnbh25_attach(
  36. struct dvb_frontend *fe,
  37. struct lnbh25_config *cfg,
  38. struct i2c_adapter *i2c);
  39. #else
  40. static inline struct dvb_frontend *lnbh25_attach(
  41. struct dvb_frontend *fe,
  42. struct lnbh25_config *cfg,
  43. struct i2c_adapter *i2c)
  44. {
  45. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  46. return NULL;
  47. }
  48. #endif
  49. #endif