Lines Matching refs:rcdev
43 struct reset_controller_dev *rcdev; member
66 static const char *rcdev_name(struct reset_controller_dev *rcdev) in rcdev_name() argument
68 if (rcdev->dev) in rcdev_name()
69 return dev_name(rcdev->dev); in rcdev_name()
71 if (rcdev->of_node) in rcdev_name()
72 return rcdev->of_node->full_name; in rcdev_name()
87 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
90 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
100 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
102 if (!rcdev->of_xlate) { in reset_controller_register()
103 rcdev->of_reset_n_cells = 1; in reset_controller_register()
104 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
107 INIT_LIST_HEAD(&rcdev->reset_control_head); in reset_controller_register()
110 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
121 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
124 list_del(&rcdev->list); in reset_controller_unregister()
144 struct reset_controller_dev *rcdev) in devm_reset_controller_register() argument
154 ret = reset_controller_register(rcdev); in devm_reset_controller_register()
160 *rcdevp = rcdev; in devm_reset_controller_register()
340 if (!rstc->rcdev->ops->reset) in reset_control_reset()
354 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
467 if (!rstc->rcdev->ops->assert) in reset_control_assert()
475 if (!rstc->rcdev->ops->assert) in reset_control_assert()
480 rcdev_name(rstc->rcdev), rstc->id); in reset_control_assert()
485 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); in reset_control_assert()
550 rcdev_name(rstc->rcdev), rstc->id); in reset_control_deassert()
562 if (!rstc->rcdev->ops->deassert) in reset_control_deassert()
565 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); in reset_control_deassert()
613 if (rstc->rcdev->ops->status) in reset_control_status()
614 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); in reset_control_status()
660 list_for_each_entry(rc, &rstc->rcdev->reset_control_head, list) { in reset_control_acquire()
749 __reset_control_get_internal(struct reset_controller_dev *rcdev, in __reset_control_get_internal() argument
756 list_for_each_entry(rstc, &rcdev->reset_control_head, list) { in __reset_control_get_internal()
778 if (!try_module_get(rcdev->owner)) { in __reset_control_get_internal()
783 rstc->rcdev = rcdev; in __reset_control_get_internal()
784 list_add(&rstc->list, &rcdev->reset_control_head); in __reset_control_get_internal()
800 module_put(rstc->rcdev->owner); in __reset_control_release()
818 struct reset_controller_dev *r, *rcdev; in __of_reset_control_get() local
843 rcdev = NULL; in __of_reset_control_get()
846 rcdev = r; in __of_reset_control_get()
851 if (!rcdev) { in __of_reset_control_get()
856 if (WARN_ON(args.args_count != rcdev->of_reset_n_cells)) { in __of_reset_control_get()
861 rstc_id = rcdev->of_xlate(rcdev, &args); in __of_reset_control_get()
868 rstc = __reset_control_get_internal(rcdev, rstc_id, shared, acquired); in __of_reset_control_get()
881 struct reset_controller_dev *rcdev; in __reset_controller_by_name() local
885 list_for_each_entry(rcdev, &reset_controller_list, list) { in __reset_controller_by_name()
886 if (!rcdev->dev) in __reset_controller_by_name()
889 if (!strcmp(name, dev_name(rcdev->dev))) in __reset_controller_by_name()
890 return rcdev; in __reset_controller_by_name()
901 struct reset_controller_dev *rcdev; in __reset_control_get_from_lookup() local
915 rcdev = __reset_controller_by_name(lookup->provider); in __reset_control_get_from_lookup()
916 if (!rcdev) { in __reset_control_get_from_lookup()
923 rstc = __reset_control_get_internal(rcdev, in __reset_control_get_from_lookup()