Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit aac1ed30 authored by Maxime Ripard's avatar Maxime Ripard Committed by Greg Kroah-Hartman
Browse files

clk: bcm-2835: Pick the closest clock rate



[ Upstream commit 5517357a4733d7cf7c17fc79d0530cfa47add372 ]

The driver currently tries to pick the closest rate that is lower than
the rate being requested.

This causes an issue with clk_set_min_rate() since it actively checks
for the rounded rate to be above the minimum that was just set.

Let's change the logic a bit to pick the closest rate to the requested
rate, no matter if it's actually higher or lower.

Fixes: 6d18b8ad ("clk: bcm2835: Support for clock parent selection")
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Reviewed-by: default avatarNicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Nicolas Saenz Julienne <nsaenz@kernel.org> # boot and basic functionality
Tested-by: default avatarMichael Stapelberg <michael@stapelberg.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210922125419.4125779-2-maxime@cerno.tech


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ba4cc496
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment