sandbox_pmic.h 837 B

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