Lines Matching full:min_uv
92 int min_uV, int max_uV);
422 int *min_uV, int *max_uV) in regulator_check_voltage() argument
424 BUG_ON(*min_uV > *max_uV); in regulator_check_voltage()
433 if (*min_uV < rdev->constraints->min_uV) in regulator_check_voltage()
434 *min_uV = rdev->constraints->min_uV; in regulator_check_voltage()
436 if (*min_uV > *max_uV) { in regulator_check_voltage()
438 *min_uV, *max_uV); in regulator_check_voltage()
455 int *min_uV, int *max_uV, in regulator_check_consumers() argument
467 if (!voltage->min_uV && !voltage->max_uV) in regulator_check_consumers()
472 if (*min_uV < voltage->min_uV) in regulator_check_consumers()
473 *min_uV = voltage->min_uV; in regulator_check_consumers()
476 if (*min_uV > *max_uV) { in regulator_check_consumers()
478 *min_uV, *max_uV); in regulator_check_consumers()
751 return sprintf(buf, "%d\n", rdev->constraints->min_uV); in min_microvolts_show()
1096 if (constraints->min_uV && constraints->max_uV) { in print_constraints_debug()
1097 if (constraints->min_uV == constraints->max_uV) in print_constraints_debug()
1099 constraints->min_uV / 1000); in print_constraints_debug()
1103 constraints->min_uV / 1000, in print_constraints_debug()
1107 if (!constraints->min_uV || in print_constraints_debug()
1108 constraints->min_uV != constraints->max_uV) { in print_constraints_debug()
1167 if ((constraints->min_uV != constraints->max_uV) && in print_constraints()
1181 rdev->constraints->min_uV && rdev->constraints->max_uV) { in machine_constraints_voltage()
1188 rdev->constraints->min_uV, in machine_constraints_voltage()
1191 rdev->constraints->min_uV, in machine_constraints_voltage()
1212 if (current_uV < rdev->constraints->min_uV) { in machine_constraints_voltage()
1213 target_min = rdev->constraints->min_uV; in machine_constraints_voltage()
1214 target_max = rdev->constraints->min_uV; in machine_constraints_voltage()
1242 int min_uV = INT_MAX; in machine_constraints_voltage() local
1244 int cmin = constraints->min_uV; in machine_constraints_voltage()
1253 constraints->min_uV = cmin; in machine_constraints_voltage()
1271 /* initial: [cmin..cmax] valid, [min_uV..max_uV] not */ in machine_constraints_voltage()
1279 /* maybe adjust [min_uV..max_uV] */ in machine_constraints_voltage()
1280 if (value >= cmin && value < min_uV) in machine_constraints_voltage()
1281 min_uV = value; in machine_constraints_voltage()
1286 /* final: [min_uV..max_uV] valid iff constraints valid */ in machine_constraints_voltage()
1287 if (max_uV < min_uV) { in machine_constraints_voltage()
1290 min_uV, max_uV); in machine_constraints_voltage()
1295 if (constraints->min_uV < min_uV) { in machine_constraints_voltage()
1296 rdev_dbg(rdev, "override min_uV, %d -> %d\n", in machine_constraints_voltage()
1297 constraints->min_uV, min_uV); in machine_constraints_voltage()
1298 constraints->min_uV = min_uV; in machine_constraints_voltage()
1847 debugfs_create_u32("min_uV", 0444, regulator->debugfs, in create_regulator()
1848 ®ulator->voltage[PM_SUSPEND_ON].min_uV); in create_regulator()
3167 if (ret < rdev->constraints->min_uV) in _regulator_list_voltage()
3333 * @min_uV: Minimum required voltage in uV.
3339 int min_uV, int max_uV) in regulator_is_supported_voltage() argument
3348 return min_uV <= ret && ret <= max_uV; in regulator_is_supported_voltage()
3355 return min_uV >= rdev->constraints->min_uV && in regulator_is_supported_voltage()
3366 if (ret >= min_uV && ret <= max_uV) in regulator_is_supported_voltage()
3374 static int regulator_map_voltage(struct regulator_dev *rdev, int min_uV, in regulator_map_voltage() argument
3380 return desc->ops->map_voltage(rdev, min_uV, max_uV); in regulator_map_voltage()
3383 return regulator_map_voltage_linear(rdev, min_uV, max_uV); in regulator_map_voltage()
3386 return regulator_map_voltage_linear_range(rdev, min_uV, max_uV); in regulator_map_voltage()
3391 min_uV, max_uV); in regulator_map_voltage()
3393 return regulator_map_voltage_iterate(rdev, min_uV, max_uV); in regulator_map_voltage()
3397 int min_uV, int max_uV, in _regulator_call_set_voltage() argument
3404 data.min_uV = min_uV; in _regulator_call_set_voltage()
3411 ret = rdev->desc->ops->set_voltage(rdev, min_uV, max_uV, selector); in _regulator_call_set_voltage()
3428 data.min_uV = uV; in _regulator_call_set_voltage_sel()
3530 int min_uV, int max_uV) in _regulator_do_set_voltage() argument
3540 trace_regulator_set_voltage(rdev_get_name(rdev), min_uV, max_uV); in _regulator_do_set_voltage()
3542 min_uV += rdev->constraints->uV_offset; in _regulator_do_set_voltage()
3557 ret = _regulator_call_set_voltage(rdev, min_uV, max_uV, in _regulator_do_set_voltage()
3569 ret = regulator_map_voltage(rdev, min_uV, max_uV); in _regulator_do_set_voltage()
3572 if (min_uV <= best_val && max_uV >= best_val) { in _regulator_do_set_voltage()
3635 int min_uV, int max_uV, suspend_state_t state) in _regulator_do_set_suspend_voltage() argument
3644 if (min_uV < rstate->min_uV) in _regulator_do_set_suspend_voltage()
3645 min_uV = rstate->min_uV; in _regulator_do_set_suspend_voltage()
3649 sel = regulator_map_voltage(rdev, min_uV, max_uV); in _regulator_do_set_suspend_voltage()
3654 if (uV >= min_uV && uV <= max_uV) in _regulator_do_set_suspend_voltage()
3661 int min_uV, int max_uV, in regulator_set_voltage_unlocked() argument
3674 if (voltage->min_uV == min_uV && voltage->max_uV == max_uV) in regulator_set_voltage_unlocked()
3683 if (min_uV <= current_uV && current_uV <= max_uV) { in regulator_set_voltage_unlocked()
3684 voltage->min_uV = min_uV; in regulator_set_voltage_unlocked()
3698 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in regulator_set_voltage_unlocked()
3703 old_min_uV = voltage->min_uV; in regulator_set_voltage_unlocked()
3705 voltage->min_uV = min_uV; in regulator_set_voltage_unlocked()
3711 voltage->min_uV = old_min_uV; in regulator_set_voltage_unlocked()
3719 int regulator_set_voltage_rdev(struct regulator_dev *rdev, int min_uV, in regulator_set_voltage_rdev() argument
3734 selector = regulator_map_voltage(rdev, min_uV, max_uV); in regulator_set_voltage_rdev()
3768 ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); in regulator_set_voltage_rdev()
3770 ret = _regulator_do_set_suspend_voltage(rdev, min_uV, in regulator_set_voltage_rdev()
3791 int *current_uV, int *min_uV) in regulator_limit_voltage_step() argument
3806 if (abs(*current_uV - *min_uV) <= constraints->max_uV_step) in regulator_limit_voltage_step()
3810 if (*current_uV < *min_uV) in regulator_limit_voltage_step()
3811 *min_uV = min(*current_uV + constraints->max_uV_step, in regulator_limit_voltage_step()
3812 *min_uV); in regulator_limit_voltage_step()
3814 *min_uV = max(*current_uV - constraints->max_uV_step, in regulator_limit_voltage_step()
3815 *min_uV); in regulator_limit_voltage_step()
3822 int *min_uV, int *max_uV, in regulator_get_optimal_voltage() argument
3844 * to min_uV in regulator_get_optimal_voltage()
3846 desired_min_uV = constraints->min_uV; in regulator_get_optimal_voltage()
3957 *min_uV = desired_min_uV; in regulator_get_optimal_voltage()
4075 * @min_uV: Minimum required voltage in uV
4090 int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) in regulator_set_voltage() argument
4097 ret = regulator_set_voltage_unlocked(regulator, min_uV, max_uV, in regulator_set_voltage()
4142 if (voltage->min_uV || voltage->max_uV) in regulator_suspend_disable()
4151 int min_uV, int max_uV, in _regulator_set_suspend_voltage() argument
4161 if (rstate->min_uV == rstate->max_uV) { in _regulator_set_suspend_voltage()
4166 return regulator_set_voltage_unlocked(regulator, min_uV, max_uV, state); in _regulator_set_suspend_voltage()
4169 int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV, in regulator_set_suspend_voltage() argument
4181 ret = _regulator_set_suspend_voltage(regulator, min_uV, in regulator_set_suspend_voltage()
4313 int ret, min_uV, max_uV; in regulator_sync_voltage() local
4327 if (!voltage->min_uV && !voltage->max_uV) { in regulator_sync_voltage()
4332 min_uV = voltage->min_uV; in regulator_sync_voltage()
4336 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in regulator_sync_voltage()
4340 ret = regulator_check_consumers(rdev, &min_uV, &max_uV, 0); in regulator_sync_voltage()
4348 ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); in regulator_sync_voltage()
5915 c->min_uV / 1000, c->max_uV / 1000); in regulator_summary_show_subtree()
5943 consumer->voltage[PM_SUSPEND_ON].min_uV / 1000, in regulator_summary_show_subtree()