/* * Test the maximum denominator case for fd clock without flags. * * Expect the highest possible denominator to be used in order to get as close as possible to the * requested rate.
*/ staticvoid clk_fd_test_approximation_max_denominator(struct kunit *test)
{ struct clk_fractional_divider *fd; unsignedlong rate, parent_rate, parent_rate_before, m, n, max_n;
KUNIT_EXPECT_EQ(test, m, 1);
KUNIT_EXPECT_EQ(test, n, max_n);
}
/* * Test the maximum numerator case for fd clock without flags. * * Expect the highest possible numerator to be used in order to get as close as possible to the * requested rate.
*/ staticvoid clk_fd_test_approximation_max_numerator(struct kunit *test)
{ struct clk_fractional_divider *fd; unsignedlong rate, parent_rate, parent_rate_before, m, n, max_m;
KUNIT_EXPECT_EQ(test, m, max_m);
KUNIT_EXPECT_EQ(test, n, 1);
}
/* * Test the maximum denominator case for zero based fd clock. * * Expect the highest possible denominator to be used in order to get as close as possible to the * requested rate.
*/ staticvoid clk_fd_test_approximation_max_denominator_zero_based(struct kunit *test)
{ struct clk_fractional_divider *fd; unsignedlong rate, parent_rate, parent_rate_before, m, n, max_n;
KUNIT_EXPECT_EQ(test, m, 1);
KUNIT_EXPECT_EQ(test, n, max_n);
}
/* * Test the maximum numerator case for zero based fd clock. * * Expect the highest possible numerator to be used in order to get as close as possible to the * requested rate.
*/ staticvoid clk_fd_test_approximation_max_numerator_zero_based(struct kunit *test)
{ struct clk_fractional_divider *fd; unsignedlong rate, parent_rate, parent_rate_before, m, n, max_m;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.