Lines Matching refs:min_uV
96 int min_uV; member
112 int min_uV, int max_uV);
167 int *min_uV, int *max_uV) in regulator_check_voltage() argument
169 BUG_ON(*min_uV > *max_uV); in regulator_check_voltage()
182 if (*min_uV < rdev->constraints->min_uV) in regulator_check_voltage()
183 *min_uV = rdev->constraints->min_uV; in regulator_check_voltage()
185 if (*min_uV > *max_uV) { in regulator_check_voltage()
187 *min_uV, *max_uV); in regulator_check_voltage()
198 int *min_uV, int *max_uV) in regulator_check_consumers() argument
207 if (!regulator->min_uV && !regulator->max_uV) in regulator_check_consumers()
212 if (*min_uV < regulator->min_uV) in regulator_check_consumers()
213 *min_uV = regulator->min_uV; in regulator_check_consumers()
216 if (*min_uV > *max_uV) { in regulator_check_consumers()
218 *min_uV, *max_uV); in regulator_check_consumers()
461 return sprintf(buf, "%d\n", rdev->constraints->min_uV); in regulator_min_uV_show()
776 if (constraints->min_uV && constraints->max_uV) { in print_constraints()
777 if (constraints->min_uV == constraints->max_uV) in print_constraints()
779 constraints->min_uV / 1000); in print_constraints()
782 constraints->min_uV / 1000, in print_constraints()
786 if (!constraints->min_uV || in print_constraints()
787 constraints->min_uV != constraints->max_uV) { in print_constraints()
828 if ((constraints->min_uV != constraints->max_uV) && in print_constraints()
842 rdev->constraints->min_uV == rdev->constraints->max_uV) { in machine_constraints_voltage()
844 rdev->constraints->min_uV, in machine_constraints_voltage()
848 rdev->constraints->min_uV); in machine_constraints_voltage()
859 int min_uV = INT_MAX; in machine_constraints_voltage() local
861 int cmin = constraints->min_uV; in machine_constraints_voltage()
869 constraints->min_uV = cmin; in machine_constraints_voltage()
892 if (value >= cmin && value < min_uV) in machine_constraints_voltage()
893 min_uV = value; in machine_constraints_voltage()
899 if (max_uV < min_uV) { in machine_constraints_voltage()
902 min_uV, max_uV); in machine_constraints_voltage()
907 if (constraints->min_uV < min_uV) { in machine_constraints_voltage()
909 constraints->min_uV, min_uV); in machine_constraints_voltage()
910 constraints->min_uV = min_uV; in machine_constraints_voltage()
1159 ®ulator->min_uV); in create_regulator()
2034 rdev->constraints->min_uV && rdev->constraints->max_uV && in regulator_can_change_voltage()
2035 rdev->constraints->min_uV != rdev->constraints->max_uV) in regulator_can_change_voltage()
2079 return rdev->desc->min_uV + (rdev->desc->uV_step * selector); in regulator_list_voltage_linear()
2132 if (ret < rdev->constraints->min_uV) in regulator_list_voltage()
2152 int min_uV, int max_uV) in regulator_is_supported_voltage() argument
2161 return (min_uV <= ret && ret <= max_uV); in regulator_is_supported_voltage()
2168 return min_uV >= rdev->constraints->min_uV && in regulator_is_supported_voltage()
2179 if (ret >= min_uV && ret <= max_uV) in regulator_is_supported_voltage()
2254 int min_uV, int max_uV) in regulator_map_voltage_iterate() argument
2268 if (ret < best_val && ret >= min_uV && ret <= max_uV) { in regulator_map_voltage_iterate()
2292 int min_uV, int max_uV) in regulator_map_voltage_ascend() argument
2304 if (ret >= min_uV && ret <= max_uV) in regulator_map_voltage_ascend()
2323 int min_uV, int max_uV) in regulator_map_voltage_linear() argument
2329 if (min_uV <= rdev->desc->min_uV && rdev->desc->min_uV <= max_uV) in regulator_map_voltage_linear()
2340 if (min_uV < rdev->desc->min_uV) in regulator_map_voltage_linear()
2341 min_uV = rdev->desc->min_uV; in regulator_map_voltage_linear()
2343 ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); in regulator_map_voltage_linear()
2351 if (voltage < min_uV || voltage > max_uV) in regulator_map_voltage_linear()
2359 int min_uV, int max_uV) in _regulator_do_set_voltage() argument
2367 trace_regulator_set_voltage(rdev_get_name(rdev), min_uV, max_uV); in _regulator_do_set_voltage()
2369 min_uV += rdev->constraints->uV_offset; in _regulator_do_set_voltage()
2385 ret = rdev->desc->ops->set_voltage(rdev, min_uV, max_uV, in _regulator_do_set_voltage()
2398 ret = rdev->desc->ops->map_voltage(rdev, min_uV, in _regulator_do_set_voltage()
2404 min_uV, max_uV); in _regulator_do_set_voltage()
2407 min_uV, max_uV); in _regulator_do_set_voltage()
2412 if (min_uV <= best_val && max_uV >= best_val) { in _regulator_do_set_voltage()
2478 int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) in regulator_set_voltage() argument
2490 if (regulator->min_uV == min_uV && regulator->max_uV == max_uV) in regulator_set_voltage()
2501 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in regulator_set_voltage()
2506 old_min_uV = regulator->min_uV; in regulator_set_voltage()
2508 regulator->min_uV = min_uV; in regulator_set_voltage()
2511 ret = regulator_check_consumers(rdev, &min_uV, &max_uV); in regulator_set_voltage()
2515 ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); in regulator_set_voltage()
2523 regulator->min_uV = old_min_uV; in regulator_set_voltage()
2626 int ret, min_uV, max_uV; in regulator_sync_voltage() local
2637 if (!regulator->min_uV && !regulator->max_uV) { in regulator_sync_voltage()
2642 min_uV = regulator->min_uV; in regulator_sync_voltage()
2646 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in regulator_sync_voltage()
2650 ret = regulator_check_consumers(rdev, &min_uV, &max_uV); in regulator_sync_voltage()
2654 ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); in regulator_sync_voltage()