regulator: bd7181x: skip DVS buck setup if it's not enabled
The DVS buck setup should only be done in case that i2c_dvs_enable is true. Otherwise, we should skip it to avoid the following noisy messages. bd7181x-pmic bd7181x-pmic: Buck0: DVS High-Low[0 - 0]. bd7181x-pmic bd7181x-pmic: bd7181x_buck12_dvs_init(): not found selector for voltage [0] bd7181x-pmic bd7181x-pmic: bd7181x_buck12_dvs_init(): not found selector for voltage [0] Signed-off-by: Shawn Guo <shawn.guo@linaro.org>pull/10/head
parent
025677441b
commit
77bb1a30e6
|
@ -620,13 +620,14 @@ static int bd7181x_buck12_dvs_init(struct bd7181x_pmic *pmic)
|
|||
u8 regh, regl;
|
||||
|
||||
for(i = 0; i < BD7181X_DVS_BUCK_NUM; i++, buck_dvs++) {
|
||||
if (!buck_dvs->i2c_dvs_enable)
|
||||
continue;
|
||||
|
||||
regh = BD7181X_REG_BUCK1_VOLT_H + i*0x2;
|
||||
regl = BD7181X_REG_BUCK1_VOLT_L + i*0x2;
|
||||
val = BUCK1_DVSSEL;
|
||||
if(buck_dvs->i2c_dvs_enable) {
|
||||
dev_info(pmic->dev, "Buck%d: I2C DVS Enabled !\n", i);
|
||||
val &= ~BUCK1_STBY_DVS;
|
||||
}
|
||||
dev_info(pmic->dev, "Buck%d: DVS High-Low[%d - %d].\n", i, buck_dvs->voltage[0], buck_dvs->voltage[1]);
|
||||
selector = regulator_map_voltage_iterate(pmic->rdev[i], buck_dvs->voltage[0], buck_dvs->voltage[0]);
|
||||
if(selector < 0) {
|
||||
|
|
Loading…
Reference in New Issue