Lines Matching refs:constraints
36 struct regulation_constraints *constraints) in of_get_regulator_prot_limits() argument
47 &constraints->over_curr_limits, in of_get_regulator_prot_limits()
48 &constraints->over_voltage_limits, in of_get_regulator_prot_limits()
49 &constraints->temp_limits, in of_get_regulator_prot_limits()
50 &constraints->under_voltage_limits, in of_get_regulator_prot_limits()
74 constraints->over_current_detection = set[0]; in of_get_regulator_prot_limits()
75 constraints->over_voltage_detection = set[1]; in of_get_regulator_prot_limits()
76 constraints->over_temp_detection = set[2]; in of_get_regulator_prot_limits()
77 constraints->under_voltage_detection = set[3]; in of_get_regulator_prot_limits()
85 struct regulation_constraints *constraints = &(*init_data)->constraints; in of_get_regulation_constraints() local
97 constraints->name = of_get_property(np, "regulator-name", NULL); in of_get_regulation_constraints()
100 constraints->min_uV = pval; in of_get_regulation_constraints()
103 constraints->max_uV = pval; in of_get_regulation_constraints()
106 if (constraints->min_uV != constraints->max_uV) in of_get_regulation_constraints()
107 constraints->valid_ops_mask |= REGULATOR_CHANGE_VOLTAGE; in of_get_regulation_constraints()
110 if (constraints->min_uV && constraints->max_uV) in of_get_regulation_constraints()
111 constraints->apply_uV = true; in of_get_regulation_constraints()
114 constraints->uV_offset = pval; in of_get_regulation_constraints()
116 constraints->min_uA = pval; in of_get_regulation_constraints()
118 constraints->max_uA = pval; in of_get_regulation_constraints()
122 constraints->ilim_uA = pval; in of_get_regulation_constraints()
125 if (constraints->min_uA != constraints->max_uA) in of_get_regulation_constraints()
126 constraints->valid_ops_mask |= REGULATOR_CHANGE_CURRENT; in of_get_regulation_constraints()
128 constraints->boot_on = of_property_read_bool(np, "regulator-boot-on"); in of_get_regulation_constraints()
129 constraints->always_on = of_property_read_bool(np, "regulator-always-on"); in of_get_regulation_constraints()
130 if (!constraints->always_on) /* status change should be possible. */ in of_get_regulation_constraints()
131 constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS; in of_get_regulation_constraints()
133 constraints->pull_down = of_property_read_bool(np, "regulator-pull-down"); in of_get_regulation_constraints()
136 constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS; in of_get_regulation_constraints()
139 constraints->valid_ops_mask |= REGULATOR_CHANGE_DRMS; in of_get_regulation_constraints()
144 constraints->ramp_delay = pval; in of_get_regulation_constraints()
146 constraints->ramp_disable = true; in of_get_regulation_constraints()
151 constraints->settling_time = pval; in of_get_regulation_constraints()
155 constraints->settling_time_up = pval; in of_get_regulation_constraints()
156 if (constraints->settling_time_up && constraints->settling_time) { in of_get_regulation_constraints()
159 constraints->settling_time_up = 0; in of_get_regulation_constraints()
165 constraints->settling_time_down = pval; in of_get_regulation_constraints()
166 if (constraints->settling_time_down && constraints->settling_time) { in of_get_regulation_constraints()
169 constraints->settling_time_down = 0; in of_get_regulation_constraints()
174 constraints->enable_time = pval; in of_get_regulation_constraints()
176 constraints->soft_start = of_property_read_bool(np, in of_get_regulation_constraints()
180 constraints->active_discharge = in of_get_regulation_constraints()
191 constraints->initial_mode = mode; in of_get_regulation_constraints()
215 constraints->valid_modes_mask |= mode; in of_get_regulation_constraints()
217 if (constraints->valid_modes_mask) in of_get_regulation_constraints()
218 constraints->valid_ops_mask in of_get_regulation_constraints()
226 constraints->system_load = pval; in of_get_regulation_constraints()
229 constraints->max_spread = devm_kzalloc(dev, in of_get_regulation_constraints()
230 sizeof(*constraints->max_spread) * n_phandles, in of_get_regulation_constraints()
233 if (!constraints->max_spread) in of_get_regulation_constraints()
237 constraints->max_spread, n_phandles); in of_get_regulation_constraints()
242 constraints->max_uV_step = pval; in of_get_regulation_constraints()
244 constraints->over_current_protection = of_property_read_bool(np, in of_get_regulation_constraints()
247 of_get_regulator_prot_limits(np, constraints); in of_get_regulation_constraints()
252 suspend_state = &constraints->state_mem; in of_get_regulation_constraints()
255 suspend_state = &constraints->state_disk; in of_get_regulation_constraints()
258 suspend_state = &constraints->state_standby; in of_get_regulation_constraints()
315 constraints->initial_state = PM_SUSPEND_MEM; in of_get_regulation_constraints()
626 int max_spread = rdev->constraints->max_spread[i]; in of_check_coupling_data()