Lines Matching defs:control
18 * struct ti_sci_reset_control - reset control structure
34 * @idr: idr structure for mapping ids to reset control structures
68 struct ti_sci_reset_control *control;
72 control = idr_find(&data->idr, id);
73 if (!control)
76 mutex_lock(&control->lock);
78 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state);
83 reset_state |= control->reset_mask;
85 reset_state &= ~control->reset_mask;
87 ret = dev_ops->set_device_resets(sci, control->dev_id, reset_state);
89 mutex_unlock(&control->lock);
149 struct ti_sci_reset_control *control;
153 control = idr_find(&data->idr, id);
154 if (!control)
157 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state);
161 return reset_state & control->reset_mask;
177 * reset control structure for that device reset, and will be used by the
179 * is allocated and used to map to the reset control structure. This idr
188 struct ti_sci_reset_control *control;
193 control = devm_kzalloc(data->dev, sizeof(*control), GFP_KERNEL);
194 if (!control)
197 control->dev_id = reset_spec->args[0];
198 control->reset_mask = reset_spec->args[1];
199 mutex_init(&control->lock);
201 return idr_alloc(&data->idr, control, 0, 0, GFP_KERNEL);