return 0;
}
-EXPORT_SYNBOL(pmic_dcdc_set);
+EXPORT_SYMBOL(pmic_dcdc_set);
int pmic_ldo_set(int index, int on)
{
struct regulator *ldo = NULL;
return 0;
}
-EXPORT_SYNBOL(pmic_ldo_set);
+EXPORT_SYMBOL(pmic_ldo_set);
/* ion */
static uint ion_size = DEF_ION_SIZE;
module_param(ion_size, uint, 0644);
static int chg_adc = DEF_CHG_ADC;
module_param(chg_adc, int, 0644);
-static int dc_det = -1;
+static int dc_det = DEF_DC_DET;
module_param(dc_det, int, 0644);
-static int bat_low = -1;
+static int bat_low = DEF_BAT_LOW;
module_param(bat_low, int, 0644);
-static int chg_ok = -1;
+static int chg_ok = DEF_CHG_OK;
module_param(chg_ok, int, 0644);
-static int chg_set = -1;
+static int chg_set = DEF_CHG_SET;
module_param(chg_set, int, 0644);
-static int chg_sel = -1;
+static int chg_sel = DEF_CHG_SEL;
module_param(chg_sel, int, 0644);
static inline int check_chg_param(void)
{
int i = 0;
printk("%s,line=%d\n", __func__,__LINE__);
+#ifndef CONFIG_RK_CONFIG
g_pmic_type = PMIC_TYPE_ACT8931;
+#endif
printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);
#ifdef CONFIG_RK30_PWM_REGULATOR
int i = 0;
printk("%s,line=%d\n", __func__,__LINE__);
+#ifndef CONFIG_RK_CONFIG
g_pmic_type = PMIC_TYPE_TPS65910;
+#endif
printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);
#ifdef CONFIG_RK30_PWM_REGULATOR
if(ret < 0)
return ret;
rk30_adc_battery_platdata.adc_channel = chg_adc;
+ rk30_adc_battery_platdata.dc_det_pin = get_port_config(dc_det).gpio;
+ rk30_adc_battery_platdata.batt_low_pin = get_port_config(bat_low).gpio;
+ rk30_adc_battery_platdata.charge_ok_pin = get_port_config(chg_ok).gpio;
+ rk30_adc_battery_platdata.charge_set_pin = get_port_config(chg_set).gpio;
+
return 0;
}
#else
{
int ret = 0;
+ ret = pmic_board_init();
+ if(ret < 0)
+ return ret;
ret = key_board_init();
if(ret < 0)
return ret;
if(ret < 0)
return ret;
ret = rtc_board_init();
- if(ret < 0)
- return ret;
- ret = pmic_board_init();
if(ret < 0)
return ret;
ret = codec_board_init();