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