sandbox_pmic.h 837 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2015 Samsung Electronics
  4. * Przemyslaw Marczak <p.marczak@samsung.com>
  5. */
  6. #ifndef _DT_BINDINGS_SANDBOX_PMIC_H_
  7. #define _DT_BINDINGS_SANDBOX_PMIC_H_
  8. /*
  9. * Sandbox PMIC - prepare reset values
  10. * To provide the default (reset) values as in the real hardware,
  11. * the registers are set in i2c pmic emul driver's probe() method.
  12. * The default values are defined as below.
  13. */
  14. /* Buck operation mode IDs */
  15. #define BUCK_OM_OFF 0
  16. #define BUCK_OM_ON 1
  17. #define BUCK_OM_PWM 2
  18. #define BUCK_OM_COUNT 3
  19. /* Ldo operation mode IDs */
  20. #define LDO_OM_OFF 0
  21. #define LDO_OM_ON 1
  22. #define LDO_OM_SLEEP 2
  23. #define LDO_OM_STANDBY 3
  24. #define LDO_OM_COUNT 4
  25. /* [Value uV/uA]/[Mode ID] to register */
  26. #define VAL2REG(min, step, val) (((val) - (min)) / (step))
  27. #define VAL2OMREG(x) (x)
  28. #endif