pmbus.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Hardware monitoring driver for PMBus devices
  3. *
  4. * Copyright (c) 2010, 2011 Ericsson AB.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #ifndef _PMBUS_H_
  21. #define _PMBUS_H_
  22. /* flags */
  23. /*
  24. * PMBUS_SKIP_STATUS_CHECK
  25. *
  26. * During register detection, skip checking the status register for
  27. * communication or command errors.
  28. *
  29. * Some PMBus chips respond with valid data when trying to read an unsupported
  30. * register. For such chips, checking the status register is mandatory when
  31. * trying to determine if a chip register exists or not.
  32. * Other PMBus chips don't support the STATUS_CML register, or report
  33. * communication errors for no explicable reason. For such chips, checking
  34. * the status register must be disabled.
  35. */
  36. #define PMBUS_SKIP_STATUS_CHECK (1 << 0)
  37. struct pmbus_platform_data {
  38. u32 flags; /* Device specific flags */
  39. /* regulator support */
  40. int num_regulators;
  41. struct regulator_init_data *reg_init_data;
  42. };
  43. #endif /* _PMBUS_H_ */