Searched refs:chrg_volt (Results 1 – 2 of 2) sorted by relevance
309 static int sgm4154x_set_chrg_volt(struct sgm41542 *charger, int chrg_volt) in sgm4154x_set_chrg_volt() argument314 if (chrg_volt < SGM4154x_VREG_V_MIN_uV) in sgm4154x_set_chrg_volt()315 chrg_volt = SGM4154x_VREG_V_MIN_uV; in sgm4154x_set_chrg_volt()316 else if (chrg_volt > SGM4154x_VREG_V_MAX_uV) in sgm4154x_set_chrg_volt()317 chrg_volt = SGM4154x_VREG_V_MAX_uV; in sgm4154x_set_chrg_volt()319 reg_val = (chrg_volt - SGM4154x_VREG_V_MIN_uV) / SGM4154x_VREG_V_STEP_uV; in sgm4154x_set_chrg_volt()
324 static int sgm4154x_set_chrg_volt(struct sgm4154x_device *sgm, int chrg_volt) in sgm4154x_set_chrg_volt() argument329 if (chrg_volt < SGM4154x_VREG_V_MIN_uV) in sgm4154x_set_chrg_volt()330 chrg_volt = SGM4154x_VREG_V_MIN_uV; in sgm4154x_set_chrg_volt()332 if ((sgm->init_data.max_vreg > 0) && (chrg_volt > sgm->init_data.max_vreg)) in sgm4154x_set_chrg_volt()333 chrg_volt = sgm->init_data.max_vreg; in sgm4154x_set_chrg_volt()334 chrg_volt = min(chrg_volt, SGM4154x_VREG_V_MAX_uV); in sgm4154x_set_chrg_volt()337 reg_val = (chrg_volt - SGM4154x_VREG_V_MIN_uV) / SGM4154x_VREG_V_STEP_uV; in sgm4154x_set_chrg_volt()338 if (chrg_volt == 4200 * 1000) in sgm4154x_set_chrg_volt()