-#include <linux/syscore_ops.h>
-
-#if 0
-#define DBG(x...) printk(KERN_INFO x)
-#else
-#define DBG(x...)
-#endif
-#if 1
-#define DBG_INFO(x...) printk(KERN_INFO x)
-#else
-#define DBG_INFO(x...)
-#endif
-#define PM_CONTROL
-
-struct rk808 *g_rk808;
-#define DCDC_RAISE_VOL_BYSTEP 1
-#define DCDC_VOL_STEP 12500 /*12.5mv*/
-
-static struct mfd_cell rk808s[] = {
- {
- .name = "rk808-rtc",
- },
-};
-
-#define BUCK_VOL_MASK 0x3f
-#define LDO_VOL_MASK 0x3f
-
-#define VOL_MIN_IDX 0x00
-#define VOL_MAX_IDX 0x3f
-
-const static int buck_set_vol_base_addr[] = {
- RK808_BUCK1_ON_REG,
- RK808_BUCK2_ON_REG,
- RK808_BUCK3_CONFIG_REG,
- RK808_BUCK4_ON_REG,
-};
-const static int buck_contr_base_addr[] = {
- RK808_BUCK1_CONFIG_REG,
- RK808_BUCK2_CONFIG_REG,
- RK808_BUCK3_CONFIG_REG,
- RK808_BUCK4_CONFIG_REG,
-};
-#define rk808_BUCK_SET_VOL_REG(x) (buck_set_vol_base_addr[x])
-#define rk808_BUCK_CONTR_REG(x) (buck_contr_base_addr[x])
-
-
-const static int ldo_set_vol_base_addr[] = {
- RK808_LDO1_ON_VSEL_REG,
- RK808_LDO2_ON_VSEL_REG,
- RK808_LDO3_ON_VSEL_REG,
- RK808_LDO4_ON_VSEL_REG,
- RK808_LDO5_ON_VSEL_REG,
- RK808_LDO6_ON_VSEL_REG,
- RK808_LDO7_ON_VSEL_REG,
- RK808_LDO8_ON_VSEL_REG,
-// RK808_LDO1_ON_VSEL_REG,
-};
-/*
-const static int ldo_contr_base_addr[] = {
- rk808_LDO1_CONTR_BASE,
- rk808_LDO2_CONTR_BASE,
- rk808_LDO3_CONTR_BASE,
- rk808_LDO4_CONTR_BASE,
- rk808_LDO5_CONTR_BASE,
- rk808_LDO6_CONTR_BASE,
- rk808_LDO7_CONTR_BASE,
- rk808_LDO8_CONTR_BASE,
-// rk808_LDO9_CONTR_BASE,
-};
-*/
-#define rk808_LDO_SET_VOL_REG(x) (ldo_set_vol_base_addr[x])
-//#define rk808_LDO_CONTR_REG(x) (ldo_contr_base_addr[x])
-
-const static int buck_voltage_map[] = {
- 712, 725, 737, 750, 762, 775, 787, 800,
- 812, 825, 837, 850,862, 875, 887, 900, 912,
- 925, 937, 950, 962, 975, 987, 1000, 1012, 1025,
- 1037, 1050,1062, 1075, 1087, 1100, 1112, 1125, 1137,
- 1150,1162, 1175, 1187, 1200, 1212, 1225, 1237, 1250,
- 1262, 1275, 1287, 1300, 1312, 1325, 1337, 1350,1362,
- 1375, 1387, 1400, 1412, 1425, 1437, 1450,1462, 1475,
- 1487, 1500,
-};
-
-const static int buck4_voltage_map[] = {
- 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600,
- 2700, 2800, 2900, 3000, 3100, 3200,3300,
-};