Lines Matching full:parent

121 	 * between rates above the parent rate which would be rounded to
122 * what the parent can provide, but rates below will simply
321 * Test suite for a basic rate clock, without any parent.
442 * Test suite for a basic, uncached, rate clock, without any parent.
457 const char *parents[2] = { "parent-0", "parent-1"}; in clk_multiple_parents_mux_test_init()
465 ctx->parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_multiple_parents_mux_test_init()
473 ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_multiple_parents_mux_test_init()
512 struct clk *parent = clk_hw_get_clk(&ctx->parents_ctx[0].hw, NULL); in clk_test_multiple_parents_mux_get_parent() local
514 KUNIT_EXPECT_TRUE(test, clk_is_match(clk_get_parent(clk), parent)); in clk_test_multiple_parents_mux_get_parent()
516 clk_put(parent); in clk_test_multiple_parents_mux_get_parent()
530 struct clk *parent; in clk_test_multiple_parents_mux_has_parent() local
532 parent = clk_hw_get_clk(&ctx->parents_ctx[0].hw, NULL); in clk_test_multiple_parents_mux_has_parent()
533 KUNIT_EXPECT_TRUE(test, clk_has_parent(clk, parent)); in clk_test_multiple_parents_mux_has_parent()
534 clk_put(parent); in clk_test_multiple_parents_mux_has_parent()
536 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_multiple_parents_mux_has_parent()
537 KUNIT_EXPECT_TRUE(test, clk_has_parent(clk, parent)); in clk_test_multiple_parents_mux_has_parent()
538 clk_put(parent); in clk_test_multiple_parents_mux_has_parent()
545 * that clock and the parent is changed, its rate after the reparenting
621 const char *parents[2] = { "missing-parent", "proper-parent"}; in clk_orphan_transparent_multiple_parent_mux_test_init()
629 ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("proper-parent", in clk_orphan_transparent_multiple_parent_mux_test_init()
657 * Test that, for a mux whose current parent hasn't been registered yet and is
673 * Test that, for a mux whose current parent hasn't been registered yet,
674 * calling clk_set_parent() to a valid parent will properly update the
675 * mux parent and its orphan status.
683 struct clk *parent, *new_parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent() local
686 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
687 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
689 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
693 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
694 KUNIT_EXPECT_TRUE(test, clk_is_match(parent, new_parent)); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
696 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
702 * parent, calling clk_drop_range() on the mux won't affect the parent
711 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range() local
715 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
716 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
718 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
721 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
731 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
737 * parent, the rate of the mux and its new parent are consistent.
745 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate() local
749 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
750 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
752 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
755 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
762 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
768 * parent, calling clk_put() on the mux won't affect the parent rate.
774 struct clk *clk, *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put() local
778 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
779 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
784 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
787 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
792 new_parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
796 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
801 * parent, calling clk_set_rate_range() will affect the parent state if
810 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified() local
814 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
815 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
817 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
828 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
834 * parent, calling clk_set_rate_range() won't affect the parent state if
843 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched() local
847 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
848 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
850 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
853 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
861 new_parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
865 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
870 * Test that, for a mux whose current parent hasn't been registered yet,
896 * then got switched to a valid parent, its rate is eventually within
909 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate() local
917 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
918 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
920 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
928 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
946 * Test suite for a basic mux clock with two parents. The default parent
947 * isn't registered, only the second parent is. By default, the clock
952 * parent.
955 .name = "clk-orphan-transparent-multiple-parent-mux-test",
978 CLK_HW_INIT_NO_PARENT("parent-clk", in clk_single_parent_mux_test_init()
986 ctx->hw.init = CLK_HW_INIT("test-clk", "parent-clk", in clk_single_parent_mux_test_init()
1007 * Test that for a clock with a single parent, clk_get_parent() actually
1008 * returns the parent.
1016 struct clk *parent = clk_hw_get_clk(&ctx->parent_ctx.hw, NULL); in clk_test_single_parent_mux_get_parent() local
1018 KUNIT_EXPECT_TRUE(test, clk_is_match(clk_get_parent(clk), parent)); in clk_test_single_parent_mux_get_parent()
1020 clk_put(parent); in clk_test_single_parent_mux_get_parent()
1025 * Test that for a clock with a single parent, clk_has_parent() actually
1026 * reports it as a parent.
1034 struct clk *parent = clk_hw_get_clk(&ctx->parent_ctx.hw, NULL); in clk_test_single_parent_mux_has_parent() local
1036 KUNIT_EXPECT_TRUE(test, clk_has_parent(clk, parent)); in clk_test_single_parent_mux_has_parent()
1038 clk_put(parent); in clk_test_single_parent_mux_has_parent()
1044 * parent, if we set disjoints range on the parent and then the child,
1057 struct clk *parent; in clk_test_single_parent_mux_set_range_disjoint_child_last() local
1062 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_disjoint_child_last()
1063 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_disjoint_child_last()
1065 ret = clk_set_rate_range(parent, 1000, 2000); in clk_test_single_parent_mux_set_range_disjoint_child_last()
1076 * parent, if we set disjoints range on the child and then the parent,
1089 struct clk *parent; in clk_test_single_parent_mux_set_range_disjoint_parent_last() local
1094 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_disjoint_parent_last()
1095 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_disjoint_parent_last()
1100 ret = clk_set_rate_range(parent, 3000, 4000); in clk_test_single_parent_mux_set_range_disjoint_parent_last()
1108 * parent, if we set a range on the parent and then call
1109 * clk_round_rate(), the boundaries of the parent are taken into
1118 struct clk *parent; in clk_test_single_parent_mux_set_range_round_rate_parent_only() local
1122 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_round_rate_parent_only()
1123 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_round_rate_parent_only()
1125 ret = clk_set_rate_range(parent, DUMMY_CLOCK_RATE_1, DUMMY_CLOCK_RATE_2); in clk_test_single_parent_mux_set_range_round_rate_parent_only()
1138 * parent, if we set a range on the parent and a more restrictive one on
1148 struct clk *parent; in clk_test_single_parent_mux_set_range_round_rate_child_smaller() local
1152 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_round_rate_child_smaller()
1153 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_round_rate_child_smaller()
1155 ret = clk_set_rate_range(parent, DUMMY_CLOCK_RATE_1, DUMMY_CLOCK_RATE_2); in clk_test_single_parent_mux_set_range_round_rate_child_smaller()
1176 * parent, if we set a range on the child and a more restrictive one on
1177 * the parent, and then call clk_round_rate(), the boundaries of the
1186 struct clk *parent; in clk_test_single_parent_mux_set_range_round_rate_parent_smaller() local
1190 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_round_rate_parent_smaller()
1191 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_round_rate_parent_smaller()
1193 ret = clk_set_rate_range(parent, DUMMY_CLOCK_RATE_1 + 1000, DUMMY_CLOCK_RATE_2 - 1000); in clk_test_single_parent_mux_set_range_round_rate_parent_smaller()
1224 * Test suite for a basic mux clock with one parent, with
1228 * child and parent are sane and consistent.
1232 .name = "clk-single-parent-mux-test",
1310 * Test suite for a basic mux clock with one parent. The parent is
1318 .name = "clk-orphan-transparent-single-parent-test",
1342 CLK_HW_INIT("intermediate-parent", in clk_orphan_two_level_root_last_test_init()
1343 "root-parent", in clk_orphan_two_level_root_last_test_init()
1351 CLK_HW_INIT("test-clk", "intermediate-parent", in clk_orphan_two_level_root_last_test_init()
1360 CLK_HW_INIT_NO_PARENT("root-parent", in clk_orphan_two_level_root_last_test_init()
1381 * Test that, for a clock whose parent used to be orphan, clk_get_rate()
1399 * Test that, for a clock whose parent used to be orphan,
1435 * Test suite for a basic, transparent, clock with a parent that is also
1436 * such a clock. The parent's parent is registered last, while the
1437 * parent and its child are registered in that order. The intermediate
1439 * clock itself will always have its parent and will never be
1440 * reparented. Indeed, it's only orphan because its parent is.
1444 * parent.
1777 * Test suite for a basic rate clock, without any parent.
1964 * Test suite for a basic rate clock, without any parent.
2144 * Test suite for a basic rate clock, without any parent.
2160 struct clk_hw parent; member
2191 const char *top_parents[2] = { "parent-0", "parent-1" }; in clk_leaf_mux_set_rate_parent_test_init()
2199 ctx->mux_ctx.parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_leaf_mux_set_rate_parent_test_init()
2207 ctx->mux_ctx.parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_leaf_mux_set_rate_parent_test_init()
2223 ctx->parent.init = CLK_HW_INIT_HW("test-parent", &ctx->mux_ctx.hw, in clk_leaf_mux_set_rate_parent_test_init()
2225 ret = clk_hw_register(NULL, &ctx->parent); in clk_leaf_mux_set_rate_parent_test_init()
2229 ctx->hw.init = CLK_HW_INIT_HW("test-clock", &ctx->parent, in clk_leaf_mux_set_rate_parent_test_init()
2244 clk_hw_unregister(&ctx->parent); in clk_leaf_mux_set_rate_parent_test_exit()
2266 * Test that __clk_determine_rate() on the parent that can't
2268 * the best_parent_hw pointer pointing to the parent.
2275 * Test that __clk_mux_determine_rate() on the parent that
2278 * the parent.
2285 * Test that __clk_mux_determine_rate_closest() on the parent
2288 * the parent.
2295 * Test that clk_hw_determine_rate_no_reparent() on the parent
2298 * the parent.
2311 * __clk_determine_rate() on its parent it doesn't get back a clk_rate_request in KUNIT_ARRAY_PARAM()
2314 * forwarding clk_rate_requests to the parent") for more background. in KUNIT_ARRAY_PARAM()
2347 * Test suite for a clock whose parent is a pass-through clk whose parent is a
2350 * will then select which parent is the best fit for a given rate.
2356 .name = "clk-leaf-mux-set-rate-parent",
2407 const char *top_parents[2] = { "parent-0", "parent-1" }; in clk_mux_notifier_test_init()
2418 ctx->mux_ctx.parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_mux_notifier_test_init()
2426 ctx->mux_ctx.parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_mux_notifier_test_init()
2465 * will notify us when we switch to another parent, and with the proper
2521 const char *parents[2] = { "parent-0", "parent-1"}; in clk_mux_no_reparent_test_init()
2529 ctx->parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_mux_no_reparent_test_init()
2537 ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_mux_no_reparent_test_init()
2567 * Test that if the we have a mux that cannot change parent and we call
2569 * parent, it won't.
2576 struct clk *other_parent, *parent; in clk_mux_no_reparent_round_rate() local
2581 parent = clk_get_parent(clk); in clk_mux_no_reparent_round_rate()
2582 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_mux_no_reparent_round_rate()
2584 parent_rate = clk_get_rate(parent); in clk_mux_no_reparent_round_rate()
2589 KUNIT_ASSERT_FALSE(test, clk_is_match(parent, other_parent)); in clk_mux_no_reparent_round_rate()
2603 * Test that if the we have a mux that cannot change parent and we call
2605 * parent, it won't.
2612 struct clk *other_parent, *parent; in clk_mux_no_reparent_set_rate() local
2618 parent = clk_get_parent(clk); in clk_mux_no_reparent_set_rate()
2619 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_mux_no_reparent_set_rate()
2621 parent_rate = clk_get_rate(parent); in clk_mux_no_reparent_set_rate()
2626 KUNIT_ASSERT_FALSE(test, clk_is_match(parent, other_parent)); in clk_mux_no_reparent_set_rate()
2649 * Test suite for a clock mux that isn't allowed to change parent, using