Lines Matching refs:rcdev
32 struct reset_controller_dev *rcdev; member
46 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
49 if (WARN_ON(reset_spec->args_count != rcdev->of_reset_n_cells)) in of_reset_simple_xlate()
52 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
62 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
64 if (!rcdev->of_xlate) { in reset_controller_register()
65 rcdev->of_reset_n_cells = 1; in reset_controller_register()
66 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
70 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
81 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
84 list_del(&rcdev->list); in reset_controller_unregister()
95 if (rstc->rcdev->ops->reset) in reset_control_reset()
96 return rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
108 if (rstc->rcdev->ops->assert) in reset_control_assert()
109 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); in reset_control_assert()
121 if (rstc->rcdev->ops->deassert) in reset_control_deassert()
122 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); in reset_control_deassert()
136 if (rstc->rcdev->ops->status) in reset_control_status()
137 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); in reset_control_status()
156 struct reset_controller_dev *r, *rcdev; in of_reset_control_get() local
171 rcdev = NULL; in of_reset_control_get()
174 rcdev = r; in of_reset_control_get()
180 if (!rcdev) { in of_reset_control_get()
185 rstc_id = rcdev->of_xlate(rcdev, &args); in of_reset_control_get()
191 try_module_get(rcdev->owner); in of_reset_control_get()
196 module_put(rcdev->owner); in of_reset_control_get()
200 rstc->rcdev = rcdev; in of_reset_control_get()
241 module_put(rstc->rcdev->owner); in reset_control_put()