Lines Matching refs:sm0
88 static int read_voltages(int *sm0, int *sm1) in read_voltages() argument
104 *sm0 = tps6586x_read(is_v2 ? SM0_VOLTAGE_V2 : SM0_VOLTAGE_V1); in read_voltages()
106 if (*sm0 == -1 || *sm1 == -1) in read_voltages()
172 int sm0, sm1; in tps6586x_adjust_sm0_sm1() local
178 if (read_voltages(&sm0, &sm1)) { in tps6586x_adjust_sm0_sm1()
189 if (min_sm0_over_sm1 != -1 && sm0 < sm1 + min_sm0_over_sm1) { in tps6586x_adjust_sm0_sm1()
191 __func__, sm0, sm1, min_sm0_over_sm1); in tps6586x_adjust_sm0_sm1()
215 while (!bad && (sm0 != sm0_target || sm1 != sm1_target)) { in tps6586x_adjust_sm0_sm1()
218 debug("%d-%d %d-%d ", sm0, sm0_target, sm1, sm1_target); in tps6586x_adjust_sm0_sm1()
220 if (sm0 != sm0_target) { in tps6586x_adjust_sm0_sm1()
225 sm0 = calculate_next_voltage(sm0, sm0_target, step); in tps6586x_adjust_sm0_sm1()
227 bad |= set_voltage(SM0_VOLTAGE_V1, sm0, rate); in tps6586x_adjust_sm0_sm1()
238 bad |= set_voltage(SM0_VOLTAGE_V1, sm0, rate); in tps6586x_adjust_sm0_sm1()
241 debug("%d-%d %d-%d done\n", sm0, sm0_target, sm1, sm1_target); in tps6586x_adjust_sm0_sm1()