Lines Matching full:parent

119 	 * between rates above the parent rate which would be rounded to
120 * what the parent can provide, but rates below will simply
319 * Test suite for a basic rate clock, without any parent.
440 * Test suite for a basic, uncached, rate clock, without any parent.
455 const char *parents[2] = { "parent-0", "parent-1"}; in clk_multiple_parents_mux_test_init()
463 ctx->parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_multiple_parents_mux_test_init()
471 ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_multiple_parents_mux_test_init()
510 struct clk *parent = clk_hw_get_clk(&ctx->parents_ctx[0].hw, NULL); in clk_test_multiple_parents_mux_get_parent() local
512 KUNIT_EXPECT_TRUE(test, clk_is_match(clk_get_parent(clk), parent)); in clk_test_multiple_parents_mux_get_parent()
514 clk_put(parent); in clk_test_multiple_parents_mux_get_parent()
528 struct clk *parent; in clk_test_multiple_parents_mux_has_parent() local
530 parent = clk_hw_get_clk(&ctx->parents_ctx[0].hw, NULL); in clk_test_multiple_parents_mux_has_parent()
531 KUNIT_EXPECT_TRUE(test, clk_has_parent(clk, parent)); in clk_test_multiple_parents_mux_has_parent()
532 clk_put(parent); in clk_test_multiple_parents_mux_has_parent()
534 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_multiple_parents_mux_has_parent()
535 KUNIT_EXPECT_TRUE(test, clk_has_parent(clk, parent)); in clk_test_multiple_parents_mux_has_parent()
536 clk_put(parent); in clk_test_multiple_parents_mux_has_parent()
543 * that clock and the parent is changed, its rate after the reparenting
619 const char *parents[2] = { "missing-parent", "proper-parent"}; in clk_orphan_transparent_multiple_parent_mux_test_init()
627 ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("proper-parent", in clk_orphan_transparent_multiple_parent_mux_test_init()
655 * Test that, for a mux whose current parent hasn't been registered yet and is
671 * Test that, for a mux whose current parent hasn't been registered yet,
672 * calling clk_set_parent() to a valid parent will properly update the
673 * mux parent and its orphan status.
681 struct clk *parent, *new_parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent() local
684 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
685 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
687 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
691 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
692 KUNIT_EXPECT_TRUE(test, clk_is_match(parent, new_parent)); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
694 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent()
700 * parent, calling clk_drop_range() on the mux won't affect the parent
709 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range() local
713 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
714 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
716 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
719 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
729 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range()
735 * parent, the rate of the mux and its new parent are consistent.
743 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate() local
747 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
748 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
750 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
753 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
760 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate()
766 * parent, calling clk_put() on the mux won't affect the parent rate.
772 struct clk *clk, *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put() local
776 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
777 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
782 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
785 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
790 new_parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
794 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_put()
799 * parent, calling clk_set_rate_range() will affect the parent state if
808 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified() local
812 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
813 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
815 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
826 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified()
832 * parent, calling clk_set_rate_range() won't affect the parent state if
841 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched() local
845 parent = clk_hw_get_clk(&ctx->parents_ctx[1].hw, NULL); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
846 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
848 parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
851 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
859 new_parent_rate = clk_get_rate(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
863 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched()
868 * Test that, for a mux whose current parent hasn't been registered yet,
894 * then got switched to a valid parent, its rate is eventually within
907 struct clk *parent; in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate() local
915 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()
916 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
918 ret = clk_set_parent(clk, parent); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
926 clk_put(parent); in clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate()
944 * Test suite for a basic mux clock with two parents. The default parent
945 * isn't registered, only the second parent is. By default, the clock
950 * parent.
953 .name = "clk-orphan-transparent-multiple-parent-mux-test",
976 CLK_HW_INIT_NO_PARENT("parent-clk", in clk_single_parent_mux_test_init()
984 ctx->hw.init = CLK_HW_INIT("test-clk", "parent-clk", in clk_single_parent_mux_test_init()
1005 * Test that for a clock with a single parent, clk_get_parent() actually
1006 * returns the parent.
1014 struct clk *parent = clk_hw_get_clk(&ctx->parent_ctx.hw, NULL); in clk_test_single_parent_mux_get_parent() local
1016 KUNIT_EXPECT_TRUE(test, clk_is_match(clk_get_parent(clk), parent)); in clk_test_single_parent_mux_get_parent()
1018 clk_put(parent); in clk_test_single_parent_mux_get_parent()
1023 * Test that for a clock with a single parent, clk_has_parent() actually
1024 * reports it as a parent.
1032 struct clk *parent = clk_hw_get_clk(&ctx->parent_ctx.hw, NULL); in clk_test_single_parent_mux_has_parent() local
1034 KUNIT_EXPECT_TRUE(test, clk_has_parent(clk, parent)); in clk_test_single_parent_mux_has_parent()
1036 clk_put(parent); in clk_test_single_parent_mux_has_parent()
1042 * parent, if we set disjoints range on the parent and then the child,
1055 struct clk *parent; in clk_test_single_parent_mux_set_range_disjoint_child_last() local
1060 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_disjoint_child_last()
1061 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_disjoint_child_last()
1063 ret = clk_set_rate_range(parent, 1000, 2000); in clk_test_single_parent_mux_set_range_disjoint_child_last()
1074 * parent, if we set disjoints range on the child and then the parent,
1087 struct clk *parent; in clk_test_single_parent_mux_set_range_disjoint_parent_last() local
1092 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_disjoint_parent_last()
1093 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_disjoint_parent_last()
1098 ret = clk_set_rate_range(parent, 3000, 4000); in clk_test_single_parent_mux_set_range_disjoint_parent_last()
1106 * parent, if we set a range on the parent and then call
1107 * clk_round_rate(), the boundaries of the parent are taken into
1116 struct clk *parent; in clk_test_single_parent_mux_set_range_round_rate_parent_only() local
1120 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_round_rate_parent_only()
1121 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_round_rate_parent_only()
1123 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()
1136 * parent, if we set a range on the parent and a more restrictive one on
1146 struct clk *parent; in clk_test_single_parent_mux_set_range_round_rate_child_smaller() local
1150 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_round_rate_child_smaller()
1151 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_round_rate_child_smaller()
1153 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()
1174 * parent, if we set a range on the child and a more restrictive one on
1175 * the parent, and then call clk_round_rate(), the boundaries of the
1184 struct clk *parent; in clk_test_single_parent_mux_set_range_round_rate_parent_smaller() local
1188 parent = clk_get_parent(clk); in clk_test_single_parent_mux_set_range_round_rate_parent_smaller()
1189 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_test_single_parent_mux_set_range_round_rate_parent_smaller()
1191 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()
1222 * Test suite for a basic mux clock with one parent, with
1226 * child and parent are sane and consistent.
1230 .name = "clk-single-parent-mux-test",
1308 * Test suite for a basic mux clock with one parent. The parent is
1316 .name = "clk-orphan-transparent-single-parent-test",
1340 CLK_HW_INIT("intermediate-parent", in clk_orphan_two_level_root_last_test_init()
1341 "root-parent", in clk_orphan_two_level_root_last_test_init()
1349 CLK_HW_INIT("test-clk", "intermediate-parent", in clk_orphan_two_level_root_last_test_init()
1358 CLK_HW_INIT_NO_PARENT("root-parent", in clk_orphan_two_level_root_last_test_init()
1379 * Test that, for a clock whose parent used to be orphan, clk_get_rate()
1397 * Test that, for a clock whose parent used to be orphan,
1433 * Test suite for a basic, transparent, clock with a parent that is also
1434 * such a clock. The parent's parent is registered last, while the
1435 * parent and its child are registered in that order. The intermediate
1437 * clock itself will always have its parent and will never be
1438 * reparented. Indeed, it's only orphan because its parent is.
1442 * parent.
1775 * Test suite for a basic rate clock, without any parent.
1962 * Test suite for a basic rate clock, without any parent.
2142 * Test suite for a basic rate clock, without any parent.
2164 const char *top_parents[2] = { "parent-0", "parent-1" }; in clk_leaf_mux_set_rate_parent_test_init()
2172 ctx->mux_ctx.parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_leaf_mux_set_rate_parent_test_init()
2180 ctx->mux_ctx.parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_leaf_mux_set_rate_parent_test_init()
2218 * parent, the rate request structure returned by __clk_determine_rate
2251 * Test suite for a clock whose parent is a mux with multiple parents.
2253 * requests to the mux, which will then select which parent is the best
2260 .name = "clk-leaf-mux-set-rate-parent",
2311 const char *top_parents[2] = { "parent-0", "parent-1" }; in clk_mux_notifier_test_init()
2322 ctx->mux_ctx.parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_mux_notifier_test_init()
2330 ctx->mux_ctx.parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_mux_notifier_test_init()
2369 * will notify us when we switch to another parent, and with the proper
2425 const char *parents[2] = { "parent-0", "parent-1"}; in clk_mux_no_reparent_test_init()
2433 ctx->parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0", in clk_mux_no_reparent_test_init()
2441 ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1", in clk_mux_no_reparent_test_init()
2471 * Test that if the we have a mux that cannot change parent and we call
2473 * parent, it won't.
2480 struct clk *other_parent, *parent; in clk_mux_no_reparent_round_rate() local
2485 parent = clk_get_parent(clk); in clk_mux_no_reparent_round_rate()
2486 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_mux_no_reparent_round_rate()
2488 parent_rate = clk_get_rate(parent); in clk_mux_no_reparent_round_rate()
2493 KUNIT_ASSERT_FALSE(test, clk_is_match(parent, other_parent)); in clk_mux_no_reparent_round_rate()
2507 * Test that if the we have a mux that cannot change parent and we call
2509 * parent, it won't.
2516 struct clk *other_parent, *parent; in clk_mux_no_reparent_set_rate() local
2522 parent = clk_get_parent(clk); in clk_mux_no_reparent_set_rate()
2523 KUNIT_ASSERT_PTR_NE(test, parent, NULL); in clk_mux_no_reparent_set_rate()
2525 parent_rate = clk_get_rate(parent); in clk_mux_no_reparent_set_rate()
2530 KUNIT_ASSERT_FALSE(test, clk_is_match(parent, other_parent)); in clk_mux_no_reparent_set_rate()
2553 * Test suite for a clock mux that isn't allowed to change parent, using