Lines Matching refs:rcdev
41 struct reset_controller_dev *rcdev; member
64 static const char *rcdev_name(struct reset_controller_dev *rcdev) in rcdev_name() argument
66 if (rcdev->dev) in rcdev_name()
67 return dev_name(rcdev->dev); in rcdev_name()
69 if (rcdev->of_node) in rcdev_name()
70 return rcdev->of_node->full_name; in rcdev_name()
83 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
86 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
96 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
98 if (!rcdev->of_xlate) { in reset_controller_register()
99 rcdev->of_reset_n_cells = 1; in reset_controller_register()
100 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
103 INIT_LIST_HEAD(&rcdev->reset_control_head); in reset_controller_register()
106 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
117 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
120 list_del(&rcdev->list); in reset_controller_unregister()
140 struct reset_controller_dev *rcdev) in devm_reset_controller_register() argument
150 ret = reset_controller_register(rcdev); in devm_reset_controller_register()
152 *rcdevp = rcdev; in devm_reset_controller_register()
302 if (!rstc->rcdev->ops->reset) in reset_control_reset()
316 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
366 if (!rstc->rcdev->ops->assert) in reset_control_assert()
374 if (!rstc->rcdev->ops->assert) in reset_control_assert()
379 rcdev_name(rstc->rcdev), rstc->id); in reset_control_assert()
384 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); in reset_control_assert()
420 rcdev_name(rstc->rcdev), rstc->id); in reset_control_deassert()
432 if (!rstc->rcdev->ops->deassert) in reset_control_deassert()
435 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); in reset_control_deassert()
453 if (rstc->rcdev->ops->status) in reset_control_status()
454 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); in reset_control_status()
500 list_for_each_entry(rc, &rstc->rcdev->reset_control_head, list) { in reset_control_acquire()
539 struct reset_controller_dev *rcdev, in __reset_control_get_internal() argument
546 list_for_each_entry(rstc, &rcdev->reset_control_head, list) { in __reset_control_get_internal()
568 try_module_get(rcdev->owner); in __reset_control_get_internal()
570 rstc->rcdev = rcdev; in __reset_control_get_internal()
571 list_add(&rstc->list, &rcdev->reset_control_head); in __reset_control_get_internal()
587 module_put(rstc->rcdev->owner); in __reset_control_release()
605 struct reset_controller_dev *r, *rcdev; in __of_reset_control_get() local
630 rcdev = NULL; in __of_reset_control_get()
633 rcdev = r; in __of_reset_control_get()
638 if (!rcdev) { in __of_reset_control_get()
643 if (WARN_ON(args.args_count != rcdev->of_reset_n_cells)) { in __of_reset_control_get()
648 rstc_id = rcdev->of_xlate(rcdev, &args); in __of_reset_control_get()
655 rstc = __reset_control_get_internal(rcdev, rstc_id, shared, acquired); in __of_reset_control_get()
668 struct reset_controller_dev *rcdev; in __reset_controller_by_name() local
672 list_for_each_entry(rcdev, &reset_controller_list, list) { in __reset_controller_by_name()
673 if (!rcdev->dev) in __reset_controller_by_name()
676 if (!strcmp(name, dev_name(rcdev->dev))) in __reset_controller_by_name()
677 return rcdev; in __reset_controller_by_name()
688 struct reset_controller_dev *rcdev; in __reset_control_get_from_lookup() local
702 rcdev = __reset_controller_by_name(lookup->provider); in __reset_control_get_from_lookup()
703 if (!rcdev) { in __reset_control_get_from_lookup()
710 rstc = __reset_control_get_internal(rcdev, in __reset_control_get_from_lookup()