Lines Matching refs:rcdev

53 	struct reset_controller_dev *rcdev;  member
86 static const char *rcdev_name(struct reset_controller_dev *rcdev) in rcdev_name() argument
88 if (rcdev->dev) in rcdev_name()
89 return dev_name(rcdev->dev); in rcdev_name()
91 if (rcdev->of_node) in rcdev_name()
92 return rcdev->of_node->full_name; in rcdev_name()
94 if (rcdev->of_args) in rcdev_name()
95 return rcdev->of_args->np->full_name; in rcdev_name()
110 static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, in of_reset_simple_xlate() argument
113 if (reset_spec->args[0] >= rcdev->nr_resets) in of_reset_simple_xlate()
123 int reset_controller_register(struct reset_controller_dev *rcdev) in reset_controller_register() argument
125 if (rcdev->of_node && rcdev->of_args) in reset_controller_register()
128 if (!rcdev->of_xlate) { in reset_controller_register()
129 rcdev->of_reset_n_cells = 1; in reset_controller_register()
130 rcdev->of_xlate = of_reset_simple_xlate; in reset_controller_register()
133 INIT_LIST_HEAD(&rcdev->reset_control_head); in reset_controller_register()
136 list_add(&rcdev->list, &reset_controller_list); in reset_controller_register()
147 void reset_controller_unregister(struct reset_controller_dev *rcdev) in reset_controller_unregister() argument
150 list_del(&rcdev->list); in reset_controller_unregister()
170 struct reset_controller_dev *rcdev) in devm_reset_controller_register() argument
180 ret = reset_controller_register(rcdev); in devm_reset_controller_register()
186 *rcdevp = rcdev; in devm_reset_controller_register()
366 if (!rstc->rcdev->ops->reset) in reset_control_reset()
380 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
493 if (!rstc->rcdev->ops->assert) in reset_control_assert()
501 if (!rstc->rcdev->ops->assert) in reset_control_assert()
506 rcdev_name(rstc->rcdev), rstc->id); in reset_control_assert()
511 return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); in reset_control_assert()
576 rcdev_name(rstc->rcdev), rstc->id); in reset_control_deassert()
588 if (!rstc->rcdev->ops->deassert) in reset_control_deassert()
591 return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); in reset_control_deassert()
639 if (rstc->rcdev->ops->status) in reset_control_status()
640 return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); in reset_control_status()
686 list_for_each_entry(rc, &rstc->rcdev->reset_control_head, list) { in reset_control_acquire()
775 __reset_control_get_internal(struct reset_controller_dev *rcdev, in __reset_control_get_internal() argument
782 list_for_each_entry(rstc, &rcdev->reset_control_head, list) { in __reset_control_get_internal()
804 if (!try_module_get(rcdev->owner)) { in __reset_control_get_internal()
809 rstc->rcdev = rcdev; in __reset_control_get_internal()
810 list_add(&rstc->list, &rcdev->reset_control_head); in __reset_control_get_internal()
815 get_device(rcdev->dev); in __reset_control_get_internal()
827 module_put(rstc->rcdev->owner); in __reset_control_release()
830 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()
1001 struct reset_controller_dev *rcdev; in __of_reset_control_get() local
1045 rcdev = __reset_find_rcdev(&args, gpio_fallback); in __of_reset_control_get()
1046 if (!rcdev) { in __of_reset_control_get()
1051 if (WARN_ON(args.args_count != rcdev->of_reset_n_cells)) { in __of_reset_control_get()
1056 rstc_id = rcdev->of_xlate(rcdev, &args); in __of_reset_control_get()
1063 rstc = __reset_control_get_internal(rcdev, rstc_id, shared, acquired); in __of_reset_control_get()
1077 struct reset_controller_dev *rcdev; in __reset_controller_by_name() local
1081 list_for_each_entry(rcdev, &reset_controller_list, list) { in __reset_controller_by_name()
1082 if (!rcdev->dev) in __reset_controller_by_name()
1085 if (!strcmp(name, dev_name(rcdev->dev))) in __reset_controller_by_name()
1086 return rcdev; in __reset_controller_by_name()
1097 struct reset_controller_dev *rcdev; in __reset_control_get_from_lookup() local
1111 rcdev = __reset_controller_by_name(lookup->provider); in __reset_control_get_from_lookup()
1112 if (!rcdev) { in __reset_control_get_from_lookup()
1119 rstc = __reset_control_get_internal(rcdev, in __reset_control_get_from_lookup()