Lines Matching refs:control
68 struct ti_sci_reset_control *control; in ti_sci_reset_set() local
72 control = idr_find(&data->idr, id); in ti_sci_reset_set()
73 if (!control) in ti_sci_reset_set()
76 mutex_lock(&control->lock); in ti_sci_reset_set()
78 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state); in ti_sci_reset_set()
83 reset_state |= control->reset_mask; in ti_sci_reset_set()
85 reset_state &= ~control->reset_mask; in ti_sci_reset_set()
87 ret = dev_ops->set_device_resets(sci, control->dev_id, reset_state); in ti_sci_reset_set()
89 mutex_unlock(&control->lock); in ti_sci_reset_set()
149 struct ti_sci_reset_control *control; in ti_sci_reset_status() local
153 control = idr_find(&data->idr, id); in ti_sci_reset_status()
154 if (!control) in ti_sci_reset_status()
157 ret = dev_ops->get_device_resets(sci, control->dev_id, &reset_state); in ti_sci_reset_status()
161 return reset_state & control->reset_mask; in ti_sci_reset_status()
188 struct ti_sci_reset_control *control; in ti_sci_reset_of_xlate() local
193 control = devm_kzalloc(data->dev, sizeof(*control), GFP_KERNEL); in ti_sci_reset_of_xlate()
194 if (!control) in ti_sci_reset_of_xlate()
197 control->dev_id = reset_spec->args[0]; in ti_sci_reset_of_xlate()
198 control->reset_mask = reset_spec->args[1]; in ti_sci_reset_of_xlate()
199 mutex_init(&control->lock); in ti_sci_reset_of_xlate()
201 return idr_alloc(&data->idr, control, 0, 0, GFP_KERNEL); in ti_sci_reset_of_xlate()