Lines Matching defs:control
26 * struct ti_sci_reset_control - reset control structure
42 * @idr: idr structure for mapping ids to reset control structures
76 struct ti_sci_reset_control *control;
80 control = idr_find(&data->idr, id);
81 if (!control)
84 mutex_lock(&control->lock);
86 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state);
91 reset_state |= control->reset_mask;
93 reset_state &= ~control->reset_mask;
95 ret = dev_ops->set_device_resets(sci, control->dev_id, reset_state);
97 mutex_unlock(&control->lock);
157 struct ti_sci_reset_control *control;
161 control = idr_find(&data->idr, id);
162 if (!control)
165 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state);
169 return reset_state & control->reset_mask;
185 * reset control structure for that device reset, and will be used by the
187 * is allocated and used to map to the reset control structure. This idr
196 struct ti_sci_reset_control *control;
201 control = devm_kzalloc(data->dev, sizeof(*control), GFP_KERNEL);
202 if (!control)
205 control->dev_id = reset_spec->args[0];
206 control->reset_mask = reset_spec->args[1];
207 mutex_init(&control->lock);
209 return idr_alloc(&data->idr, control, 0, 0, GFP_KERNEL);