Lines Matching +full:target +full:- +full:supply
5 * SPDX-License-Identifier: GPL-2.0+
25 /* Bits in the supply control registers */
37 int retval = -1; in tps6586x_read()
60 int retval = -1; in tps6586x_write()
86 * @return 0 if ok, -1 on error
94 * Each vdd has two supply sources, ie, v1 and v2. in read_voltages()
95 * The supply control reg1 and reg2 determine the current selection. in read_voltages()
99 if (ctrl1 == -1 || ctrl2 == -1) in read_voltages()
100 return -ENOTSUPP; in read_voltages()
106 if (*sm0 == -1 || *sm1 == -1) in read_voltages()
107 return -ENOTSUPP; in read_voltages()
120 * Only one supply is needed in u-boot. set both v1 and v2 to in set_voltage()
124 * control1 reg to trigger the supply selection. in set_voltage()
132 return -ENOTSUPP; in set_voltage()
137 static int calculate_next_voltage(int voltage, int target, int step) in calculate_next_voltage() argument
139 int diff = voltage < target ? step : -step; in calculate_next_voltage()
141 if (abs(target - voltage) > step) in calculate_next_voltage()
144 voltage = target; in calculate_next_voltage()
156 if (ret != -1) { in tps6586x_set_pwm_mode()
163 if (ret == -1) in tps6586x_set_pwm_mode()
180 return -EINVAL; in tps6586x_adjust_sm0_sm1()
189 if (min_sm0_over_sm1 != -1 && sm0 < sm1 + min_sm0_over_sm1) { in tps6586x_adjust_sm0_sm1()
192 return -EINVAL; in tps6586x_adjust_sm0_sm1()
218 debug("%d-%d %d-%d ", sm0, sm0_target, sm1, sm1_target); in tps6586x_adjust_sm0_sm1()
241 debug("%d-%d %d-%d done\n", sm0, sm0_target, sm1, sm1_target); in tps6586x_adjust_sm0_sm1()
243 return bad ? -EINVAL : 0; in tps6586x_adjust_sm0_sm1()