linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] clk: fractional-divider: Improve approximation when zero based and export
@ 2023-06-17 10:29 Frank Oltmanns
  2023-06-17 10:29 ` [PATCH v4 1/2] " Frank Oltmanns
  2023-06-17 10:29 ` [PATCH v4 2/2] clk: fractional-divider: tests: Add test suite for edge cases Frank Oltmanns
  0 siblings, 2 replies; 6+ messages in thread
From: Frank Oltmanns @ 2023-06-17 10:29 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Frank Oltmanns, A.s. Dong, Abel Vesa, Fabio Estevam,
	linux-arm-kernel, linux-clk, linux-kernel, NXP Linux Team,
	Peng Fan, Pengutronix Kernel Team, Sascha Hauer, Shawn Guo,
	Elaine Zhang

The fractional divider approximation does not utilize the full available
range for clocks that are flagged CLK_FRAC_DIVIDER_ZERO_BASED. This
patchset aims to fix that.

It also adds test cases for the edge cases of fractional divider clocks
with and without the CLK_FRAC_DIVIDER_ZERO_BASED flag to highlight the
changes.

Finally, it also exports clk_fractional_divider_general_approximation so
that the test cases (but also other users like rockchip clk driver) can
be compiled as a module.

Unfortunately, I have no boards to test this patch. So all we have are
the unit tests. It seems the only user of this flag in mainline is
drivers/clk/imx/clk-composite-7ulp.c, therefore I'm cc-ing
get_maintainers.pl --git-blame -f drivers/clk/imx/clk-composite-7ulp.c
in the hopes of a wider audience.

Thank you for considering this contribution,
  Frank

V3: https://lore.kernel.org/all/20230614185521.477924-1-frank@oltmanns.dev/
V2: https://lore.kernel.org/lkml/20230613083626.227476-1-frank@oltmanns.dev/
V1: https://lore.kernel.org/lkml/20230529133433.56215-1-frank@oltmanns.dev/

Changes in V4 (since V3):
 - Export clk_fractional_divider_general_approximation so that users
   (e.g., the testcases) can be compiled as modules.
 - Change test cases so that they test
   clk_fractional_divider_general_approximation again (like in V2)
   instead of clk_fd_round_rate (like in V3), but keeping the structure
   of V3 with separate file and individual test cases for each edge
   case.

Changes in V3 (since V2):
 - Completely reworked the test cases
   - Moved tests to separate file as per Stephen's request
   - Move each edge case into their individual test case as per
     Stephen's request
   - Test clk_fd_round_rate instead of
     clk_fractional_divider_general_approximation as testing the latter
     broke builds

Changes in V2 (since V1):
 - Added test case as requested by Stephen Boyd
 - Fixed commit message as the Cc: was missing a closing bracket, so that the
   original mail unfortunately did not go out to A. s. Dong.

Frank Oltmanns (2):
  clk: fractional-divider: Improve approximation when zero based and
    export
  clk: fractional-divider: tests: Add test suite for edge cases

 drivers/clk/.kunitconfig                  |   1 +
 drivers/clk/Kconfig                       |   7 +
 drivers/clk/Makefile                      |   1 +
 drivers/clk/clk-fractional-divider.c      |  27 +++-
 drivers/clk/clk-fractional-divider_test.c | 161 ++++++++++++++++++++++
 5 files changed, 190 insertions(+), 7 deletions(-)
 create mode 100644 drivers/clk/clk-fractional-divider_test.c

-- 
2.41.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-17 13:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-17 10:29 [PATCH v4 0/2] clk: fractional-divider: Improve approximation when zero based and export Frank Oltmanns
2023-06-17 10:29 ` [PATCH v4 1/2] " Frank Oltmanns
2023-06-17 10:29 ` [PATCH v4 2/2] clk: fractional-divider: tests: Add test suite for edge cases Frank Oltmanns
2023-06-17 11:54   ` kernel test robot
2023-06-17 12:15   ` kernel test robot
2023-06-17 13:32     ` Frank Oltmanns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).