Lines Matching +full:target +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0+
24 /* Bits in the supply control registers */
36 int retval = -1; in tps6586x_read()
59 int retval = -1; in tps6586x_write()
85 * @return 0 if ok, -1 on error
93 * Each vdd has two supply sources, ie, v1 and v2. in read_voltages()
94 * The supply control reg1 and reg2 determine the current selection. in read_voltages()
98 if (ctrl1 == -1 || ctrl2 == -1) in read_voltages()
99 return -ENOTSUPP; in read_voltages()
105 if (*sm0 == -1 || *sm1 == -1) in read_voltages()
106 return -ENOTSUPP; in read_voltages()
119 * Only one supply is needed in u-boot. set both v1 and v2 to in set_voltage()
123 * control1 reg to trigger the supply selection. in set_voltage()
131 return -ENOTSUPP; in set_voltage()
136 static int calculate_next_voltage(int voltage, int target, int step) in calculate_next_voltage() argument
138 int diff = voltage < target ? step : -step; in calculate_next_voltage()
140 if (abs(target - voltage) > step) in calculate_next_voltage()
143 voltage = target; in calculate_next_voltage()
155 if (ret != -1) { in tps6586x_set_pwm_mode()
162 if (ret == -1) in tps6586x_set_pwm_mode()
179 return -EINVAL; in tps6586x_adjust_sm0_sm1()
188 if (min_sm0_over_sm1 != -1 && sm0 < sm1 + min_sm0_over_sm1) { in tps6586x_adjust_sm0_sm1()
191 return -EINVAL; in tps6586x_adjust_sm0_sm1()
217 debug("%d-%d %d-%d ", sm0, sm0_target, sm1, sm1_target); in tps6586x_adjust_sm0_sm1()
240 debug("%d-%d %d-%d done\n", sm0, sm0_target, sm1, sm1_target); in tps6586x_adjust_sm0_sm1()
242 return bad ? -EINVAL : 0; in tps6586x_adjust_sm0_sm1()