Lines Matching full:obj
23 static void resettable_phase_enter(Object *obj, void *opaque, ResetType type);
24 static void resettable_phase_hold(Object *obj, void *opaque, ResetType type);
25 static void resettable_phase_exit(Object *obj, void *opaque, ResetType type);
42 void resettable_reset(Object *obj, ResetType type) in resettable_reset() argument
44 trace_resettable_reset(obj, type); in resettable_reset()
45 resettable_assert_reset(obj, type); in resettable_reset()
46 resettable_release_reset(obj, type); in resettable_reset()
49 void resettable_assert_reset(Object *obj, ResetType type) in resettable_assert_reset() argument
51 trace_resettable_reset_assert_begin(obj, type); in resettable_assert_reset()
55 resettable_phase_enter(obj, NULL, type); in resettable_assert_reset()
58 resettable_phase_hold(obj, NULL, type); in resettable_assert_reset()
60 trace_resettable_reset_assert_end(obj); in resettable_assert_reset()
63 void resettable_release_reset(Object *obj, ResetType type) in resettable_release_reset() argument
65 trace_resettable_reset_release_begin(obj, type); in resettable_release_reset()
69 resettable_phase_exit(obj, NULL, type); in resettable_release_reset()
72 trace_resettable_reset_release_end(obj); in resettable_release_reset()
75 bool resettable_is_in_reset(Object *obj) in resettable_is_in_reset() argument
77 ResettableClass *rc = RESETTABLE_GET_CLASS(obj); in resettable_is_in_reset()
78 ResettableState *s = rc->get_state(obj); in resettable_is_in_reset()
87 static void resettable_child_foreach(ResettableClass *rc, Object *obj, in resettable_child_foreach() argument
92 rc->child_foreach(obj, cb, opaque, type); in resettable_child_foreach()
96 static void resettable_phase_enter(Object *obj, void *opaque, ResetType type) in resettable_phase_enter() argument
98 ResettableClass *rc = RESETTABLE_GET_CLASS(obj); in resettable_phase_enter()
99 ResettableState *s = rc->get_state(obj); in resettable_phase_enter()
100 const char *obj_typename = object_get_typename(obj); in resettable_phase_enter()
106 trace_resettable_phase_enter_begin(obj, obj_typename, s->count, type); in resettable_phase_enter()
129 resettable_child_foreach(rc, obj, resettable_phase_enter, NULL, type); in resettable_phase_enter()
133 trace_resettable_phase_enter_exec(obj, obj_typename, type, in resettable_phase_enter()
136 rc->phases.enter(obj, type); in resettable_phase_enter()
140 trace_resettable_phase_enter_end(obj, obj_typename, s->count); in resettable_phase_enter()
143 static void resettable_phase_hold(Object *obj, void *opaque, ResetType type) in resettable_phase_hold() argument
145 ResettableClass *rc = RESETTABLE_GET_CLASS(obj); in resettable_phase_hold()
146 ResettableState *s = rc->get_state(obj); in resettable_phase_hold()
147 const char *obj_typename = object_get_typename(obj); in resettable_phase_hold()
152 trace_resettable_phase_hold_begin(obj, obj_typename, s->count, type); in resettable_phase_hold()
155 resettable_child_foreach(rc, obj, resettable_phase_hold, NULL, type); in resettable_phase_hold()
160 trace_resettable_phase_hold_exec(obj, obj_typename, !!rc->phases.hold); in resettable_phase_hold()
162 rc->phases.hold(obj, type); in resettable_phase_hold()
165 trace_resettable_phase_hold_end(obj, obj_typename, s->count); in resettable_phase_hold()
168 static void resettable_phase_exit(Object *obj, void *opaque, ResetType type) in resettable_phase_exit() argument
170 ResettableClass *rc = RESETTABLE_GET_CLASS(obj); in resettable_phase_exit()
171 ResettableState *s = rc->get_state(obj); in resettable_phase_exit()
172 const char *obj_typename = object_get_typename(obj); in resettable_phase_exit()
175 trace_resettable_phase_exit_begin(obj, obj_typename, s->count, type); in resettable_phase_exit()
179 resettable_child_foreach(rc, obj, resettable_phase_exit, NULL, type); in resettable_phase_exit()
183 trace_resettable_phase_exit_exec(obj, obj_typename, !!rc->phases.exit); in resettable_phase_exit()
185 rc->phases.exit(obj, type); in resettable_phase_exit()
189 trace_resettable_phase_exit_end(obj, obj_typename, s->count); in resettable_phase_exit()
194 * Get the count of the Resettable object @obj. Return 0 if @obj is NULL.
196 static unsigned resettable_get_count(Object *obj) in resettable_get_count() argument
198 if (obj) { in resettable_get_count()
199 ResettableClass *rc = RESETTABLE_GET_CLASS(obj); in resettable_get_count()
200 return rc->get_state(obj)->count; in resettable_get_count()
205 void resettable_change_parent(Object *obj, Object *newp, Object *oldp) in resettable_change_parent() argument
207 ResettableClass *rc = RESETTABLE_GET_CLASS(obj); in resettable_change_parent()
208 ResettableState *s = rc->get_state(obj); in resettable_change_parent()
221 trace_resettable_change_parent(obj, oldp, oldp_count, newp, newp_count); in resettable_change_parent()
229 resettable_assert_reset(obj, RESET_TYPE_COLD); in resettable_change_parent()
232 * if obj is leaving a bus under reset, we need to ensure in resettable_change_parent()
236 resettable_phase_hold(obj, NULL, RESET_TYPE_COLD); in resettable_change_parent()
240 resettable_release_reset(obj, RESET_TYPE_COLD); in resettable_change_parent()