Lines Matching full:min_uv

94 				     int min_uV, int max_uV);
426 int *min_uV, int *max_uV) in regulator_check_voltage() argument
428 BUG_ON(*min_uV > *max_uV); in regulator_check_voltage()
437 if (*min_uV < rdev->constraints->min_uV) in regulator_check_voltage()
438 *min_uV = rdev->constraints->min_uV; in regulator_check_voltage()
440 if (*min_uV > *max_uV) { in regulator_check_voltage()
442 *min_uV, *max_uV); in regulator_check_voltage()
459 int *min_uV, int *max_uV, in regulator_check_consumers() argument
471 if (!voltage->min_uV && !voltage->max_uV) in regulator_check_consumers()
476 if (*min_uV < voltage->min_uV) in regulator_check_consumers()
477 *min_uV = voltage->min_uV; in regulator_check_consumers()
480 if (*min_uV > *max_uV) { in regulator_check_consumers()
482 *min_uV, *max_uV); in regulator_check_consumers()
755 return sprintf(buf, "%d\n", rdev->constraints->min_uV); in min_microvolts_show()
1100 if (constraints->min_uV && constraints->max_uV) { in print_constraints_debug()
1101 if (constraints->min_uV == constraints->max_uV) in print_constraints_debug()
1103 constraints->min_uV / 1000); in print_constraints_debug()
1107 constraints->min_uV / 1000, in print_constraints_debug()
1111 if (!constraints->min_uV || in print_constraints_debug()
1112 constraints->min_uV != constraints->max_uV) { in print_constraints_debug()
1171 if ((constraints->min_uV != constraints->max_uV) && in print_constraints()
1185 rdev->constraints->min_uV && rdev->constraints->max_uV) { in machine_constraints_voltage()
1192 rdev->constraints->min_uV, in machine_constraints_voltage()
1195 rdev->constraints->min_uV, in machine_constraints_voltage()
1216 if (current_uV < rdev->constraints->min_uV) { in machine_constraints_voltage()
1217 target_min = rdev->constraints->min_uV; in machine_constraints_voltage()
1218 target_max = rdev->constraints->min_uV; in machine_constraints_voltage()
1246 int min_uV = INT_MAX; in machine_constraints_voltage() local
1248 int cmin = constraints->min_uV; in machine_constraints_voltage()
1257 constraints->min_uV = cmin; in machine_constraints_voltage()
1275 /* initial: [cmin..cmax] valid, [min_uV..max_uV] not */ in machine_constraints_voltage()
1283 /* maybe adjust [min_uV..max_uV] */ in machine_constraints_voltage()
1284 if (value >= cmin && value < min_uV) in machine_constraints_voltage()
1285 min_uV = value; in machine_constraints_voltage()
1290 /* final: [min_uV..max_uV] valid iff constraints valid */ in machine_constraints_voltage()
1291 if (max_uV < min_uV) { in machine_constraints_voltage()
1294 min_uV, max_uV); in machine_constraints_voltage()
1299 if (constraints->min_uV < min_uV) { in machine_constraints_voltage()
1300 rdev_dbg(rdev, "override min_uV, %d -> %d\n", in machine_constraints_voltage()
1301 constraints->min_uV, min_uV); in machine_constraints_voltage()
1302 constraints->min_uV = min_uV; in machine_constraints_voltage()
1867 debugfs_create_u32("min_uV", 0444, regulator->debugfs, in create_regulator()
1868 &regulator->voltage[PM_SUSPEND_ON].min_uV); in create_regulator()
3244 if (ret < rdev->constraints->min_uV) in _regulator_list_voltage()
3445 * @min_uV: Minimum required voltage in uV.
3453 int min_uV, int max_uV) in regulator_is_supported_voltage() argument
3462 return min_uV <= ret && ret <= max_uV; in regulator_is_supported_voltage()
3469 return min_uV >= rdev->constraints->min_uV && in regulator_is_supported_voltage()
3480 if (ret >= min_uV && ret <= max_uV) in regulator_is_supported_voltage()
3488 static int regulator_map_voltage(struct regulator_dev *rdev, int min_uV, in regulator_map_voltage() argument
3494 return desc->ops->map_voltage(rdev, min_uV, max_uV); in regulator_map_voltage()
3497 return regulator_map_voltage_linear(rdev, min_uV, max_uV); in regulator_map_voltage()
3500 return regulator_map_voltage_linear_range(rdev, min_uV, max_uV); in regulator_map_voltage()
3505 min_uV, max_uV); in regulator_map_voltage()
3507 return regulator_map_voltage_iterate(rdev, min_uV, max_uV); in regulator_map_voltage()
3511 int min_uV, int max_uV, in _regulator_call_set_voltage() argument
3518 data.min_uV = min_uV; in _regulator_call_set_voltage()
3525 ret = rdev->desc->ops->set_voltage(rdev, min_uV, max_uV, selector); in _regulator_call_set_voltage()
3542 data.min_uV = uV; in _regulator_call_set_voltage_sel()
3644 int min_uV, int max_uV) in _regulator_do_set_voltage() argument
3654 trace_regulator_set_voltage(rdev_get_name(rdev), min_uV, max_uV); in _regulator_do_set_voltage()
3656 min_uV += rdev->constraints->uV_offset; in _regulator_do_set_voltage()
3671 ret = _regulator_call_set_voltage(rdev, min_uV, max_uV, in _regulator_do_set_voltage()
3683 ret = regulator_map_voltage(rdev, min_uV, max_uV); in _regulator_do_set_voltage()
3686 if (min_uV <= best_val && max_uV >= best_val) { in _regulator_do_set_voltage()
3749 int min_uV, int max_uV, suspend_state_t state) in _regulator_do_set_suspend_voltage() argument
3758 if (min_uV < rstate->min_uV) in _regulator_do_set_suspend_voltage()
3759 min_uV = rstate->min_uV; in _regulator_do_set_suspend_voltage()
3763 sel = regulator_map_voltage(rdev, min_uV, max_uV); in _regulator_do_set_suspend_voltage()
3768 if (uV >= min_uV && uV <= max_uV) in _regulator_do_set_suspend_voltage()
3775 int min_uV, int max_uV, in regulator_set_voltage_unlocked() argument
3788 if (voltage->min_uV == min_uV && voltage->max_uV == max_uV) in regulator_set_voltage_unlocked()
3797 if (min_uV <= current_uV && current_uV <= max_uV) { in regulator_set_voltage_unlocked()
3798 voltage->min_uV = min_uV; in regulator_set_voltage_unlocked()
3812 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in regulator_set_voltage_unlocked()
3817 old_min_uV = voltage->min_uV; in regulator_set_voltage_unlocked()
3819 voltage->min_uV = min_uV; in regulator_set_voltage_unlocked()
3825 voltage->min_uV = old_min_uV; in regulator_set_voltage_unlocked()
3833 int regulator_set_voltage_rdev(struct regulator_dev *rdev, int min_uV, in regulator_set_voltage_rdev() argument
3848 selector = regulator_map_voltage(rdev, min_uV, max_uV); in regulator_set_voltage_rdev()
3882 ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); in regulator_set_voltage_rdev()
3884 ret = _regulator_do_set_suspend_voltage(rdev, min_uV, in regulator_set_voltage_rdev()
3905 int *current_uV, int *min_uV) in regulator_limit_voltage_step() argument
3920 if (abs(*current_uV - *min_uV) <= constraints->max_uV_step) in regulator_limit_voltage_step()
3924 if (*current_uV < *min_uV) in regulator_limit_voltage_step()
3925 *min_uV = min(*current_uV + constraints->max_uV_step, in regulator_limit_voltage_step()
3926 *min_uV); in regulator_limit_voltage_step()
3928 *min_uV = max(*current_uV - constraints->max_uV_step, in regulator_limit_voltage_step()
3929 *min_uV); in regulator_limit_voltage_step()
3936 int *min_uV, int *max_uV, in regulator_get_optimal_voltage() argument
3958 * to min_uV in regulator_get_optimal_voltage()
3960 desired_min_uV = constraints->min_uV; in regulator_get_optimal_voltage()
4070 *min_uV = desired_min_uV; in regulator_get_optimal_voltage()
4188 * @min_uV: Minimum required voltage in uV
4205 int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) in regulator_set_voltage() argument
4212 ret = regulator_set_voltage_unlocked(regulator, min_uV, max_uV, in regulator_set_voltage()
4257 if (voltage->min_uV || voltage->max_uV) in regulator_suspend_disable()
4266 int min_uV, int max_uV, in _regulator_set_suspend_voltage() argument
4276 if (rstate->min_uV == rstate->max_uV) { in _regulator_set_suspend_voltage()
4281 return regulator_set_voltage_unlocked(regulator, min_uV, max_uV, state); in _regulator_set_suspend_voltage()
4284 int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV, in regulator_set_suspend_voltage() argument
4296 ret = _regulator_set_suspend_voltage(regulator, min_uV, in regulator_set_suspend_voltage()
4434 int ret, min_uV, max_uV; in regulator_sync_voltage() local
4448 if (!voltage->min_uV && !voltage->max_uV) { in regulator_sync_voltage()
4453 min_uV = voltage->min_uV; in regulator_sync_voltage()
4457 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in regulator_sync_voltage()
4461 ret = regulator_check_consumers(rdev, &min_uV, &max_uV, 0); in regulator_sync_voltage()
4469 ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); in regulator_sync_voltage()
6123 c->min_uV / 1000, c->max_uV / 1000); in regulator_summary_show_subtree()
6151 consumer->voltage[PM_SUSPEND_ON].min_uV / 1000, in regulator_summary_show_subtree()