summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-fsl-lpspi.c
diff options
context:
space:
mode:
authorFrank Oltmanns <frank@oltmanns.dev>2023-08-07 15:43:39 +0300
committerChen-Yu Tsai <wens@csie.org>2023-08-09 18:33:58 +0300
commitc0380d14745194906c378d2494fc494239e16a85 (patch)
treeb4fba792bf372a2e8bcbbc6dcc71a518cdd70f58 /drivers/spi/spi-fsl-lpspi.c
parente373315d8ff839543132d2a0dcea546fda8b5048 (diff)
downloadlinux-c0380d14745194906c378d2494fc494239e16a85.tar.xz
clk: sunxi-ng: nm: Support finding closest rate
Use the helper function ccu_is_better_rate() to determine the rate that is closest to the requested rate, thereby supporting rates that are higher than the requested rate if the clock uses the CCU_FEATURE_CLOSEST_RATE. Add the macro SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST which sets CCU_FEATURE_CLOSEST_RATE. To avoid code duplication, add the macros SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_FEAT that allows selecting arbitrary features and use it in the original SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX as well as the newly introduced SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX_CLOSEST macros. Acked-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Frank Oltmanns <frank@oltmanns.dev> Link: https://lore.kernel.org/r/20230807-pll-mipi_set_rate_parent-v6-6-f173239a4b59@oltmanns.dev Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'drivers/spi/spi-fsl-lpspi.c')
0 files changed, 0 insertions, 0 deletions