/* * 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;
/* * Test suite for clk_fractional_divider_general_approximation().
*/ staticstruct kunit_suite clk_fd_approximation_suite = {
.name = "clk-fd-approximation",
.test_cases = clk_fd_approximation_test_cases,
};
kunit_test_suites(
&clk_fd_approximation_suite
);
MODULE_DESCRIPTION("Kunit tests for clk fractional divider");
MODULE_LICENSE("GPL");
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.9Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-04-29)
¤
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.