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/kconfig.h>
  24. #include <linux/dvb/frontend.h>
  25. /* 22 kHz tone enabled. Tone output controlled by DSQIN pin */
  26. #define LNBH25_TEN 0x01
  27. /* Low power mode activated (used only with 22 kHz tone output disabled) */
  28. #define LNBH25_LPM 0x02
  29. /* DSQIN input pin is set to receive external 22 kHz TTL signal source */
  30. #define LNBH25_EXTM 0x04
  31. struct lnbh25_config {
  32. u8 i2c_address;
  33. u8 data2_config;
  34. };
  35. #if IS_REACHABLE(CONFIG_DVB_LNBH25)
  36. struct dvb_frontend *lnbh25_attach(
  37. struct dvb_frontend *fe,
  38. struct lnbh25_config *cfg,
  39. struct i2c_adapter *i2c);
  40. #else
  41. static inline struct dvb_frontend *lnbh25_attach(
  42. struct dvb_frontend *fe,
  43. struct lnbh25_config *cfg,
  44. struct i2c_adapter *i2c)
  45. {
  46. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  47. return NULL;
  48. }
  49. #endif
  50. #endif