Ejemplo n.º 1
0
int wm831x_post_init(struct wm831x *Wm831x)
{
	struct regulator *dcdc;
	struct regulator *ldo;
	int i = 0;
	
	g_pmic_type = PMIC_TYPE_WM8326;
	printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);

	for(i = 0; i < ARRAY_SIZE(wm8326_dcdc_info); i++)
	{
	dcdc =regulator_get(NULL, wm8326_dcdc_info[i].name);
	regulator_set_voltage(dcdc, wm8326_dcdc_info[i].min_uv, wm8326_dcdc_info[i].max_uv);
	regulator_set_suspend_voltage(dcdc, wm8326_dcdc_info[i].suspend_vol);
	regulator_enable(dcdc);
	printk("%s  %s =%dmV end\n", __func__,wm8326_dcdc_info[i].name, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);
	}
	
	for(i = 0; i < ARRAY_SIZE(wm8326_ldo_info); i++)
	{
	ldo =regulator_get(NULL, wm8326_ldo_info[i].name);
	regulator_set_voltage(ldo, wm8326_ldo_info[i].min_uv, wm8326_ldo_info[i].max_uv);
	regulator_set_suspend_voltage(ldo, wm8326_ldo_info[i].suspend_vol);
	regulator_enable(ldo);
	//printk("%s  %s =%dmV end\n", __func__,tps65910_dcdc_info[i].name, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
	}
	
	wm831x_mask_interrupt(Wm831x);

	#ifdef CONFIG_WM8326_VBAT_LOW_DETECTION
	wm831x_low_power_detection(Wm831x);
	#endif
	
	printk("wm831x_post_init end");
	return 0;
}
Ejemplo n.º 2
0
int wm831x_post_init(struct wm831x *Wm831x)
{
	struct regulator *dcdc;
	struct regulator *ldo;


	ldo = regulator_get(NULL, "ldo6");	//vcc_33
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo6 vcc_33=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
	
	ldo = regulator_get(NULL, "ldo4");	// vdd_11
	regulator_set_voltage(ldo, 1100000, 1100000);
	regulator_set_suspend_voltage(ldo, 1000000);
	regulator_enable(ldo);
//	printk("%s set ldo4 vdd_11=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo5");	//vcc_25
	regulator_set_voltage(ldo, 2500000, 2500000);
	regulator_set_suspend_voltage(ldo, 2500000);
	regulator_enable(ldo);
//	printk("%s set ldo5 vcc_25=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);

	dcdc = regulator_get(NULL, "dcdc4");	// vcc_io
	regulator_set_voltage(dcdc, 3000000, 3000000);
	regulator_set_suspend_voltage(dcdc, 2800000);
	regulator_enable(dcdc);
//	printk("%s set dcdc4 vcc_io=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "vdd_cpu");	// vdd_arm
	regulator_set_voltage(dcdc, 1100000, 1100000);
	regulator_set_suspend_voltage(dcdc, 1000000);
	regulator_enable(dcdc);
	printk("%s set dcdc2 vdd_cpu(vdd_arm)=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "vdd_core");	// vdd_log
	regulator_set_voltage(dcdc, 1150000, 1150000);
	regulator_set_suspend_voltage(dcdc, 1000000);
	regulator_enable(dcdc);
	printk("%s set dcdc1 vdd_core(vdd_log)=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "dcdc3");	// vcc_ddr
	regulator_set_voltage(dcdc, 1150000, 1150000);
	regulator_set_suspend_voltage(dcdc, 1150000);
	regulator_enable(dcdc);
//	printk("%s set dcdc3 vcc_ddr=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	ldo = regulator_get(NULL, "ldo7");	// vcc28_cif
	regulator_set_voltage(ldo, 2800000, 2800000);
	regulator_set_suspend_voltage(ldo, 2800000);
	regulator_enable(ldo);
//	printk("%s set ldo7 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo1");	// vcc18_cif
	regulator_set_voltage(ldo, 1800000, 1800000);
	regulator_set_suspend_voltage(ldo, 1800000);
	regulator_enable(ldo);
//	printk("%s set ldo1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo8");	// vcca_33
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo8 vcca_33=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo2");	//vccio_wl
	regulator_set_voltage(ldo, 1800000, 1800000);
	regulator_set_suspend_voltage(ldo, 1800000);
	regulator_enable(ldo);
//	printk("%s set ldo2 vccio_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo10");	//vcc_hdmi
	regulator_set_voltage(ldo, 2500000, 2500000);
	regulator_set_suspend_voltage(ldo, 2500000);
	regulator_enable(ldo);
//	printk("%s set ldo10 vcca_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo3");	//vdd_hdmi
	regulator_set_voltage(ldo, 1100000, 1100000);
	regulator_set_suspend_voltage(ldo, 1100000);
	regulator_enable(ldo);
//	printk("%s set ldo3 vdd_12=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo9");	//vcc_tp
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo9 vcc_tp=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	wm831x_mask_interrupt(Wm831x);

	#ifdef CONFIG_WM8326_VBAT_LOW_DETECTION
	wm831x_low_power_detection(Wm831x);
	#endif
	
	printk("wm831x_post_init end");
	return 0;
}
int wm831x_post_init(struct wm831x *Wm831x)
{
	struct regulator *dcdc;
	struct regulator *ldo;


	ldo = regulator_get(NULL, "ldo8");	//vcca33
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo8 vcca33=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
	
	ldo = regulator_get(NULL, "ldo3");	// vdd_11
	regulator_set_voltage(ldo, 1100000, 1100000);
	regulator_set_suspend_voltage(ldo, 1100000);
	regulator_enable(ldo);
//	printk("%s set ldo3 vdd_11=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	dcdc = regulator_get(NULL, "dcdc3");	// vcc_io
	regulator_set_voltage(dcdc, 3000000, 3000000);
	regulator_set_suspend_voltage(dcdc, 3000000);
	regulator_enable(dcdc);
//	printk("%s set dcdc3 vcc_io=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	ldo = regulator_get(NULL, "ldo4");	//vdd_usb11
	regulator_set_voltage(ldo, 1100000, 1100000);
	regulator_set_suspend_voltage(ldo, 1100000);
	regulator_enable(ldo);
//	printk("%s set ldo4 vdd_usb11=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);

	ldo = regulator_get(NULL, "ldo5");	//vcc_25
	regulator_set_voltage(ldo, 2500000, 2500000);
	regulator_set_suspend_voltage(ldo, 2500000);
	regulator_enable(ldo);
//	printk("%s set ldo5 vcc_25=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);


	ldo = regulator_get(NULL, "ldo10");	//vcc_usb33
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo10 vcc_usb33=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);

	dcdc = regulator_get(NULL, "dcdc1");	// vcc_lpddr2_1v8
	regulator_set_voltage(dcdc, 1800000, 1800000);
	regulator_set_suspend_voltage(dcdc, 1800000);
	regulator_enable(dcdc);
	printk("%s set dcdc1 vcc_lpddr2_1v8=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "dcdc2");	// vcc_lpddr2_1v2
	regulator_set_voltage(dcdc, 1200000, 1200000);
	regulator_set_suspend_voltage(dcdc, 1200000);
	regulator_enable(dcdc);
	printk("%s set dcdc2 vcc_lpddr2_1v2=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);
	
	ldo = regulator_get(NULL, "ldo2");	// vcc_emmc3v3
	regulator_set_voltage(ldo, 3000000, 3000000);
	regulator_set_suspend_voltage(ldo, 3000000);
	regulator_enable(ldo);
//	printk("%s set ldo2 vcc_emmc3v3=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo6");	// vcc_codec18
	regulator_set_voltage(ldo, 1800000, 1800000);
	regulator_set_suspend_voltage(ldo, 1800000);
	regulator_enable(ldo);
//	printk("%s set ldo6 vcc_codec18=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo1");	// vcc_lcd
	regulator_set_voltage(ldo, 3000000, 3000000);
	regulator_set_suspend_voltage(ldo, 3000000);
	regulator_enable(ldo);
//	printk("%s set ldo1 vcc_lcd=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
#if 0 

	ldo = regulator_get(NULL, "ldo7");	//vdd_mtv_1v2
	regulator_set_voltage(ldo, 1200000, 1200000);
	regulator_set_suspend_voltage(ldo, 1200000);
	regulator_enable(ldo);
//	printk("%s set ldo7 vdd_mtv_1v2=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
	
	ldo = regulator_get(NULL, "ldo9");	//vdd_mtv_3v
	regulator_set_voltage(ldo, 3000000, 3000000);
	regulator_set_suspend_voltage(ldo, 3000000);
	regulator_enable(ldo);
//	printk("%s set ldo9 vdd_mtv_3v=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
#endif

//discrete dcdc device
#ifdef CONFIG_RK30_PWM_REGULATOR
	dcdc = regulator_get(NULL, "vdd_core"); // vdd_log
	regulator_set_voltage(dcdc, 1050000, 1050000);
	regulator_enable(dcdc);
	printk("%s set vdd_core=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "vdd_cpu");	// vdd_arm
	regulator_set_voltage(dcdc, 1100000, 1100000);
	regulator_enable(dcdc);
	printk("%s set vdd_cpu=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);
#endif
	printk("wm831x_post_init end");
	return 0;
}
Ejemplo n.º 4
0
static int act8846_set_init(struct act8846 *act8846)
{
	struct regulator *dcdc;
	struct regulator *ldo;
	int i = 0;
	printk("%s,line=%d\n", __func__,__LINE__);

	#ifndef CONFIG_RK_CONFIG
	g_pmic_type = PMIC_TYPE_ACT8846;
	#endif
	printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);
	
	for(i = 0; i < ARRAY_SIZE(act8846_dcdc_info); i++)
	{

                if(act8846_dcdc_info[i].min_uv == 0 && act8846_dcdc_info[i].max_uv == 0)
                        continue;
	        dcdc =regulator_get(NULL, act8846_dcdc_info[i].name);
	        regulator_set_voltage(dcdc, act8846_dcdc_info[i].min_uv, act8846_dcdc_info[i].max_uv);
		 regulator_set_suspend_voltage(dcdc, act8846_dcdc_info[i].suspend_vol);
	        regulator_enable(dcdc);
	        printk("%s  %s =%dmV end\n", __func__,act8846_dcdc_info[i].name, regulator_get_voltage(dcdc));
	        regulator_put(dcdc);
	        udelay(100);
	}
	
	for(i = 0; i < ARRAY_SIZE(act8846_ldo_info); i++)
	{
                if(act8846_ldo_info[i].min_uv == 0 && act8846_ldo_info[i].max_uv == 0)
                        continue;
	        ldo =regulator_get(NULL, act8846_ldo_info[i].name);
	        regulator_set_voltage(ldo, act8846_ldo_info[i].min_uv, act8846_ldo_info[i].max_uv);
	        regulator_enable(ldo);
	        printk("%s  %s =%dmV end\n", __func__,act8846_ldo_info[i].name, regulator_get_voltage(ldo));
	        regulator_put(ldo);
	}

	#ifdef CONFIG_RK_CONFIG
	if(sram_gpio_init(get_port_config(pmic_slp).gpio, &pmic_sleep) < 0){
		printk(KERN_ERR "sram_gpio_init failed\n");
		return -EINVAL;
	}
	if(port_output_init(pmic_slp, 0, "pmic_slp") < 0){
		printk(KERN_ERR "port_output_init failed\n");
		return -EINVAL;
	}
	#else
	if(sram_gpio_init(PMU_POWER_SLEEP, &pmic_sleep) < 0){
		printk(KERN_ERR "sram_gpio_init failed\n");
		return -EINVAL;
	}
	gpio_request(PMU_POWER_SLEEP, "NULL");
	gpio_direction_output(PMU_POWER_SLEEP, GPIO_LOW);
	
	#ifdef CONFIG_ACT8846_SUPPORT_RESET
	if(sram_gpio_init(PMU_VSEL, &pmic_vsel) < 0){
		printk(KERN_ERR "sram_gpio_init failed\n");
		return -EINVAL;
	}
//	rk30_mux_api_set(GPIO3D3_PWM0_NAME,GPIO3D_GPIO3D3);
	gpio_request(PMU_VSEL, "NULL");
	gpio_direction_output(PMU_VSEL, GPIO_HIGH);
	#endif
	
	#endif

	printk("%s,line=%d END\n", __func__,__LINE__);
	
	
	return 0;
}
Ejemplo n.º 5
0
int wm831x_post_init(struct wm831x *Wm831x)
{
	struct regulator *dcdc;
	struct regulator *ldo;

	
	g_pmic_type = PMIC_TYPE_WM8326;
	printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);
	
	ldo = regulator_get(NULL, "ldo6");	//vcc_33
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo6 vcc_33=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);
	
	ldo = regulator_get(NULL, "ldo4");	// vdd_11
	regulator_set_voltage(ldo, 1100000, 1100000);
	regulator_set_suspend_voltage(ldo, 1000000);
	regulator_enable(ldo);
//	printk("%s set ldo4 vdd_11=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo5");	//vcc_25
	regulator_set_voltage(ldo, 2500000, 2500000);
	regulator_set_suspend_voltage(ldo, 2500000);
	regulator_enable(ldo);
//	printk("%s set ldo5 vcc_25=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);

	dcdc = regulator_get(NULL, "dcdc4");	// vcc_io
#ifdef CONFIG_MACH_RK3066_SDK
	regulator_set_voltage(dcdc, 3300000, 3300000);
	regulator_set_suspend_voltage(dcdc, 3100000);
#else
	regulator_set_voltage(dcdc, 3000000, 3000000);
	regulator_set_suspend_voltage(dcdc, 2800000);
#endif
	regulator_enable(dcdc);
//	printk("%s set dcdc4 vcc_io=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "vdd_cpu");	// vdd_arm
	regulator_set_voltage(dcdc, 1100000, 1100000);
	regulator_set_suspend_voltage(dcdc, 1000000);
	regulator_enable(dcdc);
	printk("%s set dcdc2 vdd_cpu(vdd_arm)=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "vdd_core");	// vdd_log
	
	/* Read avs value under logic 1.1V*/
	regulator_set_voltage(dcdc, 1100000, 1100000);
	avs_init_val_get(1,1100000,"wm8326 init");
	udelay(600);
	avs_set_scal_val(AVS_BASE);

	regulator_set_voltage(dcdc, 1150000, 1150000);
	regulator_set_suspend_voltage(dcdc, 1000000);
	regulator_enable(dcdc);
	printk("%s set dcdc1 vdd_core(vdd_log)=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	dcdc = regulator_get(NULL, "dcdc3");	// vcc_ddr
	regulator_set_voltage(dcdc, 1150000, 1150000);
	regulator_set_suspend_voltage(dcdc, 1150000);
	regulator_enable(dcdc);
//	printk("%s set dcdc3 vcc_ddr=%dmV end\n", __func__, regulator_get_voltage(dcdc));
	regulator_put(dcdc);
	udelay(100);

	ldo = regulator_get(NULL, "ldo7");	// vcc28_cif
	regulator_set_voltage(ldo, 2800000, 2800000);
	regulator_set_suspend_voltage(ldo, 2800000);
	regulator_enable(ldo);
//	printk("%s set ldo7 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo1");	// vcc18_cif
	regulator_set_voltage(ldo, 1800000, 1800000);
	regulator_set_suspend_voltage(ldo, 1800000);
	regulator_enable(ldo);
//	printk("%s set ldo1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo8");	// vcca_33
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo8 vcca_33=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo2");	//vccio_wl
	regulator_set_voltage(ldo, 1800000, 1800000);
	regulator_set_suspend_voltage(ldo, 1800000);
	regulator_enable(ldo);
//	printk("%s set ldo2 vccio_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo10");	//flash io
	regulator_set_voltage(ldo, 1800000, 1800000);
	regulator_set_suspend_voltage(ldo, 1800000);
	regulator_enable(ldo);
//	printk("%s set ldo10 vcca_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

#ifdef CONFIG_MACH_RK3066_SDK
	ldo = regulator_get(NULL, "ldo3");	//vdd11_hdmi
	regulator_set_voltage(ldo, 1100000, 1100000);
	regulator_set_suspend_voltage(ldo, 1100000);
#else
	ldo = regulator_get(NULL, "ldo3");	//vdd_12
	regulator_set_voltage(ldo, 1200000, 1200000);
	regulator_set_suspend_voltage(ldo, 1200000);
#endif
	regulator_enable(ldo);
//	printk("%s set ldo3 vdd_12=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	ldo = regulator_get(NULL, "ldo9");	//vcc_tp
	regulator_set_voltage(ldo, 3300000, 3300000);
	regulator_set_suspend_voltage(ldo, 3300000);
	regulator_enable(ldo);
//	printk("%s set ldo9 vcc_tp=%dmV end\n", __func__, regulator_get_voltage(ldo));
	regulator_put(ldo);
	udelay(100);

	wm831x_mask_interrupt(Wm831x);

	#ifdef CONFIG_WM8326_VBAT_LOW_DETECTION
	wm831x_low_power_detection(Wm831x);
	#endif
	
	printk("wm831x_post_init end");
	return 0;
}
Ejemplo n.º 6
0
static int rk808_set_init(struct rk808 *rk808)
{
	struct regulator *dcdc;
	struct regulator *ldo;
	int i = 0;
	printk("%s,line=%d\n", __func__,__LINE__);

	#ifndef CONFIG_RK_CONFIG
	g_pmic_type = PMIC_TYPE_RK808;
	#endif
	printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);
	
	for(i = 0; i < ARRAY_SIZE(rk808_dcdc_info); i++)
	{

                if(rk808_dcdc_info[i].min_uv == 0 && rk808_dcdc_info[i].max_uv == 0)
                        continue;
	        dcdc =regulator_get(NULL, rk808_dcdc_info[i].name);
	        regulator_set_voltage(dcdc, rk808_dcdc_info[i].min_uv, rk808_dcdc_info[i].max_uv);
		 regulator_set_suspend_voltage(dcdc, rk808_dcdc_info[i].suspend_vol);
	        regulator_enable(dcdc);
	        printk("%s  %s =%duV end\n", __func__,rk808_dcdc_info[i].name, regulator_get_voltage(dcdc));
	        regulator_put(dcdc);
	        udelay(100);
	}
	
	for(i = 0; i < ARRAY_SIZE(rk808_ldo_info); i++)
	{
                if(rk808_ldo_info[i].min_uv == 0 && rk808_ldo_info[i].max_uv == 0)
                        continue;
	        ldo =regulator_get(NULL, rk808_ldo_info[i].name);

	        regulator_set_voltage(ldo, rk808_ldo_info[i].min_uv, rk808_ldo_info[i].max_uv);
		 regulator_set_suspend_voltage(ldo, rk808_ldo_info[i].suspend_vol);
	        regulator_enable(ldo);
	        printk("%s  %s =%duV end\n", __func__,rk808_ldo_info[i].name, regulator_get_voltage(ldo));
	        regulator_put(ldo);
	}

	#ifdef CONFIG_RK_CONFIG
	if(sram_gpio_init(get_port_config(pmic_slp).gpio, &pmic_sleep) < 0){
		printk(KERN_ERR "sram_gpio_init failed\n");
		return -EINVAL;
	}
	if(port_output_init(pmic_slp, 0, "pmic_slp") < 0){
		printk(KERN_ERR "port_output_init failed\n");
		return -EINVAL;
	}
	#else
	if(sram_gpio_init(PMU_POWER_SLEEP, &pmic_sleep) < 0){
		printk(KERN_ERR "sram_gpio_init failed\n");
		return -EINVAL;
	}
	gpio_request(PMU_POWER_SLEEP, "NULL");
	gpio_direction_output(PMU_POWER_SLEEP, GPIO_LOW);
		
	#endif
	
	printk("%s,line=%d END\n", __func__,__LINE__);
	
	
	return 0;
}