Lines Matching refs:control
76 struct ti_sci_reset_control *control; in ti_sci_reset_set() local
80 control = idr_find(&data->idr, id); in ti_sci_reset_set()
81 if (!control) in ti_sci_reset_set()
84 mutex_lock(&control->lock); in ti_sci_reset_set()
86 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state); in ti_sci_reset_set()
91 reset_state |= control->reset_mask; in ti_sci_reset_set()
93 reset_state &= ~control->reset_mask; in ti_sci_reset_set()
95 ret = dev_ops->set_device_resets(sci, control->dev_id, reset_state); in ti_sci_reset_set()
97 mutex_unlock(&control->lock); in ti_sci_reset_set()
157 struct ti_sci_reset_control *control; in ti_sci_reset_status() local
161 control = idr_find(&data->idr, id); in ti_sci_reset_status()
162 if (!control) in ti_sci_reset_status()
165 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state); in ti_sci_reset_status()
169 return reset_state & control->reset_mask; in ti_sci_reset_status()
196 struct ti_sci_reset_control *control; in ti_sci_reset_of_xlate() local
201 control = devm_kzalloc(data->dev, sizeof(*control), GFP_KERNEL); in ti_sci_reset_of_xlate()
202 if (!control) in ti_sci_reset_of_xlate()
205 control->dev_id = reset_spec->args[0]; in ti_sci_reset_of_xlate()
206 control->reset_mask = reset_spec->args[1]; in ti_sci_reset_of_xlate()
207 mutex_init(&control->lock); in ti_sci_reset_of_xlate()
209 return idr_alloc(&data->idr, control, 0, 0, GFP_KERNEL); in ti_sci_reset_of_xlate()