rk2928_defconfig: 'pmic: Initialized first && charge: set default parameter

This commit is contained in:
kfx
2012-11-05 18:05:55 +08:00
parent 3cc8a4b559
commit 74facddded
4 changed files with 19 additions and 10 deletions

View File

@@ -353,7 +353,7 @@ int pmic_dcdc_set(int index, int on)
return 0;
}
EXPORT_SYNBOL(pmic_dcdc_set);
EXPORT_SYMBOL(pmic_dcdc_set);
int pmic_ldo_set(int index, int on)
{
struct regulator *ldo = NULL;
@@ -377,7 +377,7 @@ int pmic_ldo_set(int index, int on)
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);
@@ -447,15 +447,15 @@ static inline int check_rtc_param(void)
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)
{

View File

@@ -20,7 +20,9 @@ static int act8931_set_init(struct act8931 *act8931)
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

View File

@@ -255,7 +255,9 @@ int tps65910_post_init(struct tps65910 *tps65910)
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

View File

@@ -684,6 +684,11 @@ static int __init chg_board_init(void)
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
@@ -1068,6 +1073,9 @@ static int __init rk2928_config_init(void)
{
int ret = 0;
ret = pmic_board_init();
if(ret < 0)
return ret;
ret = key_board_init();
if(ret < 0)
return ret;
@@ -1096,9 +1104,6 @@ static int __init rk2928_config_init(void)
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();