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