isl6423.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. Intersil ISL6423 SEC and LNB Power supply controller
  3. Copyright (C) Manu Abraham <abraham.manu@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef __ISL_6423_H
  17. #define __ISL_6423_H
  18. #include <linux/dvb/frontend.h>
  19. enum isl6423_current {
  20. SEC_CURRENT_275m = 0,
  21. SEC_CURRENT_515m,
  22. SEC_CURRENT_635m,
  23. SEC_CURRENT_800m,
  24. };
  25. enum isl6423_curlim {
  26. SEC_CURRENT_LIM_ON = 1,
  27. SEC_CURRENT_LIM_OFF
  28. };
  29. struct isl6423_config {
  30. enum isl6423_current current_max;
  31. enum isl6423_curlim curlim;
  32. u8 addr;
  33. u8 mod_extern;
  34. };
  35. #if defined(CONFIG_DVB_ISL6423) || (defined(CONFIG_DVB_ISL6423_MODULE) && defined(MODULE))
  36. extern struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
  37. struct i2c_adapter *i2c,
  38. const struct isl6423_config *config);
  39. #else
  40. static inline struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
  41. struct i2c_adapter *i2c,
  42. const struct isl6423_config *config)
  43. {
  44. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  45. return NULL;
  46. }
  47. #endif /* CONFIG_DVB_ISL6423 */
  48. #endif /* __ISL_6423_H */