Lines Matching refs:rcdev
42 struct reset_controller_dev *rcdev; member
65 static const char *rcdev_name(struct reset_controller_dev *rcdev) in rcdev_name() argument
67 if (rcdev->dev) in rcdev_name()
68 return dev_name(rcdev->dev); in rcdev_name()
70 if (rcdev->of_node) in rcdev_name()
71 return rcdev->of_node->full_name; in rcdev_name()
86 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
89 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
99 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
101 if (!rcdev->of_xlate) { in reset_controller_register()
102 rcdev->of_reset_n_cells = 1; in reset_controller_register()
103 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
106 INIT_LIST_HEAD(&rcdev->reset_control_head); in reset_controller_register()
109 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
120 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
123 list_del(&rcdev->list); in reset_controller_unregister()
143 struct reset_controller_dev *rcdev) in devm_reset_controller_register() argument
153 ret = reset_controller_register(rcdev); in devm_reset_controller_register()
159 *rcdevp = rcdev; in devm_reset_controller_register()
306 if (!rstc->rcdev->ops->reset) in reset_control_reset()
320 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
369 if (!rstc->rcdev->ops->assert) in reset_control_assert()
377 if (!rstc->rcdev->ops->assert) in reset_control_assert()
382 rcdev_name(rstc->rcdev), rstc->id); in reset_control_assert()
387 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); in reset_control_assert()
422 rcdev_name(rstc->rcdev), rstc->id); in reset_control_deassert()
434 if (!rstc->rcdev->ops->deassert) in reset_control_deassert()
437 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); in reset_control_deassert()
455 if (rstc->rcdev->ops->status) in reset_control_status()
456 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); in reset_control_status()
502 list_for_each_entry(rc, &rstc->rcdev->reset_control_head, list) { in reset_control_acquire()
541 struct reset_controller_dev *rcdev, in __reset_control_get_internal() argument
548 list_for_each_entry(rstc, &rcdev->reset_control_head, list) { in __reset_control_get_internal()
570 if (!try_module_get(rcdev->owner)) { in __reset_control_get_internal()
575 rstc->rcdev = rcdev; in __reset_control_get_internal()
576 list_add(&rstc->list, &rcdev->reset_control_head); in __reset_control_get_internal()
592 module_put(rstc->rcdev->owner); in __reset_control_release()
610 struct reset_controller_dev *r, *rcdev; in __of_reset_control_get() local
635 rcdev = NULL; in __of_reset_control_get()
638 rcdev = r; in __of_reset_control_get()
643 if (!rcdev) { in __of_reset_control_get()
648 if (WARN_ON(args.args_count != rcdev->of_reset_n_cells)) { in __of_reset_control_get()
653 rstc_id = rcdev->of_xlate(rcdev, &args); in __of_reset_control_get()
660 rstc = __reset_control_get_internal(rcdev, rstc_id, shared, acquired); in __of_reset_control_get()
673 struct reset_controller_dev *rcdev; in __reset_controller_by_name() local
677 list_for_each_entry(rcdev, &reset_controller_list, list) { in __reset_controller_by_name()
678 if (!rcdev->dev) in __reset_controller_by_name()
681 if (!strcmp(name, dev_name(rcdev->dev))) in __reset_controller_by_name()
682 return rcdev; in __reset_controller_by_name()
693 struct reset_controller_dev *rcdev; in __reset_control_get_from_lookup() local
707 rcdev = __reset_controller_by_name(lookup->provider); in __reset_control_get_from_lookup()
708 if (!rcdev) { in __reset_control_get_from_lookup()
715 rstc = __reset_control_get_internal(rcdev, in __reset_control_get_from_lookup()