Lines Matching refs:rcdev

52 	struct reset_controller_dev *rcdev;  member
87 static const char *rcdev_name(struct reset_controller_dev *rcdev) in rcdev_name() argument
89 if (rcdev->dev) in rcdev_name()
90 return dev_name(rcdev->dev); in rcdev_name()
92 if (rcdev->of_node) in rcdev_name()
93 return rcdev->of_node->full_name; in rcdev_name()
95 if (rcdev->of_args) in rcdev_name()
96 return rcdev->of_args->np->full_name; in rcdev_name()
111 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
114 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
124 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
126 if (rcdev->of_node && rcdev->of_args) in reset_controller_register()
129 if (!rcdev->of_xlate) { in reset_controller_register()
130 rcdev->of_reset_n_cells = 1; in reset_controller_register()
131 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
134 INIT_LIST_HEAD(&rcdev->reset_control_head); in reset_controller_register()
137 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
148 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
151 list_del(&rcdev->list); in reset_controller_unregister()
171 struct reset_controller_dev *rcdev) in devm_reset_controller_register() argument
181 ret = reset_controller_register(rcdev); in devm_reset_controller_register()
187 *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
763 list_for_each_entry(rstc, &rcdev->reset_control_head, list) { in __reset_control_get_internal()
785 if (!try_module_get(rcdev->owner)) { in __reset_control_get_internal()
790 rstc->rcdev = rcdev; in __reset_control_get_internal()
791 list_add(&rstc->list, &rcdev->reset_control_head); in __reset_control_get_internal()
796 get_device(rcdev->dev); in __reset_control_get_internal()
808 module_put(rstc->rcdev->owner); in __reset_control_release()
811 put_device(rstc->rcdev->dev); in __reset_control_release()
977 struct reset_controller_dev *rcdev; in __reset_find_rcdev() local
981 list_for_each_entry(rcdev, &reset_controller_list, list) { in __reset_find_rcdev()
983 if (rcdev->of_args && of_phandle_args_equal(args, in __reset_find_rcdev()
984 rcdev->of_args)) in __reset_find_rcdev()
985 return rcdev; in __reset_find_rcdev()
987 if (args->np == rcdev->of_node) in __reset_find_rcdev()
988 return rcdev; in __reset_find_rcdev()
1002 struct reset_controller_dev *rcdev; in __of_reset_control_get() local
1046 rcdev = __reset_find_rcdev(&args, gpio_fallback); in __of_reset_control_get()
1047 if (!rcdev) { in __of_reset_control_get()
1052 if (WARN_ON(args.args_count != rcdev->of_reset_n_cells)) { in __of_reset_control_get()
1057 rstc_id = rcdev->of_xlate(rcdev, &args); in __of_reset_control_get()
1066 rstc = __reset_control_get_internal(rcdev, rstc_id, flags); in __of_reset_control_get()