Lines Matching refs:rcdev
44 struct reset_controller_dev *rcdev; member
75 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
78 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
88 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
90 if (!rcdev->of_xlate) { in reset_controller_register()
91 rcdev->of_reset_n_cells = 1; in reset_controller_register()
92 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
95 INIT_LIST_HEAD(&rcdev->reset_control_head); in reset_controller_register()
98 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
109 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
112 list_del(&rcdev->list); in reset_controller_unregister()
132 struct reset_controller_dev *rcdev) in devm_reset_controller_register() argument
142 ret = reset_controller_register(rcdev); in devm_reset_controller_register()
144 *rcdevp = rcdev; in devm_reset_controller_register()
266 if (!rstc->rcdev->ops->reset) in reset_control_reset()
277 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
327 if (!rstc->rcdev->ops->assert) in reset_control_assert()
335 if (!rstc->rcdev->ops->assert) in reset_control_assert()
339 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); in reset_control_assert()
381 if (!rstc->rcdev->ops->deassert) in reset_control_deassert()
384 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); in reset_control_deassert()
402 if (rstc->rcdev->ops->status) in reset_control_status()
403 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); in reset_control_status()
410 struct reset_controller_dev *rcdev, in __reset_control_get_internal() argument
417 list_for_each_entry(rstc, &rcdev->reset_control_head, list) { in __reset_control_get_internal()
431 try_module_get(rcdev->owner); in __reset_control_get_internal()
433 rstc->rcdev = rcdev; in __reset_control_get_internal()
434 list_add(&rstc->list, &rcdev->reset_control_head); in __reset_control_get_internal()
449 module_put(rstc->rcdev->owner); in __reset_control_release()
467 struct reset_controller_dev *r, *rcdev; in __of_reset_control_get() local
492 rcdev = NULL; in __of_reset_control_get()
495 rcdev = r; in __of_reset_control_get()
501 if (!rcdev) { in __of_reset_control_get()
506 if (WARN_ON(args.args_count != rcdev->of_reset_n_cells)) { in __of_reset_control_get()
511 rstc_id = rcdev->of_xlate(rcdev, &args); in __of_reset_control_get()
518 rstc = __reset_control_get_internal(rcdev, rstc_id, shared); in __of_reset_control_get()
529 struct reset_controller_dev *rcdev; in __reset_controller_by_name() local
533 list_for_each_entry(rcdev, &reset_controller_list, list) { in __reset_controller_by_name()
534 if (!rcdev->dev) in __reset_controller_by_name()
537 if (!strcmp(name, dev_name(rcdev->dev))) in __reset_controller_by_name()
538 return rcdev; in __reset_controller_by_name()
549 struct reset_controller_dev *rcdev; in __reset_control_get_from_lookup() local
566 rcdev = __reset_controller_by_name(lookup->provider); in __reset_control_get_from_lookup()
567 if (!rcdev) { in __reset_control_get_from_lookup()
574 rstc = __reset_control_get_internal(rcdev, in __reset_control_get_from_lookup()