isl6423.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. Intersil ISL6423 SEC and LNB Power supply controller
  4. Copyright (C) Manu Abraham <[email protected]>
  5. */
  6. #ifndef __ISL_6423_H
  7. #define __ISL_6423_H
  8. #include <linux/dvb/frontend.h>
  9. enum isl6423_current {
  10. SEC_CURRENT_275m = 0,
  11. SEC_CURRENT_515m,
  12. SEC_CURRENT_635m,
  13. SEC_CURRENT_800m,
  14. };
  15. enum isl6423_curlim {
  16. SEC_CURRENT_LIM_ON = 1,
  17. SEC_CURRENT_LIM_OFF
  18. };
  19. struct isl6423_config {
  20. enum isl6423_current current_max;
  21. enum isl6423_curlim curlim;
  22. u8 addr;
  23. u8 mod_extern;
  24. };
  25. #if IS_REACHABLE(CONFIG_DVB_ISL6423)
  26. extern struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
  27. struct i2c_adapter *i2c,
  28. const struct isl6423_config *config);
  29. #else
  30. static inline struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
  31. struct i2c_adapter *i2c,
  32. const struct isl6423_config *config)
  33. {
  34. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  35. return NULL;
  36. }
  37. #endif /* CONFIG_DVB_ISL6423 */
  38. #endif /* __ISL_6423_H */