#include <linux/regulator/rk2818_lp8725.h>
#include <mach/gpio.h>
#include <linux/delay.h>
+#include <mach/iomux.h>
//add by robert for reboot notifier
#include <linux/notifier.h>
#define DBG_INFO(x...)
#endif
-
+#define PM_CONTROL
struct lp8725 {
int tmp = 0;
struct regulator *ldo1,*ldo2,*ldo3,*ldo4,*ldo5;
struct regulator *lilo1,*lilo2;
- struct regulator *buck1,*buck2;
+ struct regulator *buck1,*buck1_v2,*buck2;
DBG_INFO("***run in %s %d ",__FUNCTION__,__LINE__);
tmp = regulator_get_voltage(buck1);
DBG_INFO("***regulator_set_init: buck1 vcc =%d\n",tmp);
+ #ifdef PM_CONTROL
+ DBG_INFO("***buck1 v2 init\n");
+ buck1_v2 = regulator_get(NULL, "vdd12_v2");// dvs 0
+ regulator_enable(buck1_v2);
+ regulator_set_voltage(buck1_v2,1000000,1000000);//1300000
+ tmp = regulator_get_voltage(buck1_v2);
+ DBG_INFO("***regulator_set_init: buck1 v2 =%d\n",tmp);
+ #endif
+
/*init buck2*/
DBG_INFO("***buck2 vcc init\n");
buck2 = regulator_get(NULL, "vccdr");
} else
dev_warn(lp8725->dev, "No platform init data supplied\n");
+ //DVS pin control, make sure it is high level at start.
+ #ifdef PM_CONTROL
+ rk2818_lp8725_pm_control();
+ #endif
lp8725_set_init();
return 0;