Skip to content

Commit d894992

Browse files
jbrun3tbebarino
authored andcommitted
clk: rockchip: fix mmc get phase
If the mmc clock has no rate, it can be assumed to be constant. In such case, there is no measurable phase shift. Just return 0 in this case instead of returning an error. Fixes: 2760878 ("clk: Bail out when calculating phase fails during clk registration") Tested-by: Markus Reichl <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent c3944ec commit d894992

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/rockchip/clk-mmc-phase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw)
5151
u16 degrees;
5252
u32 delay_num = 0;
5353

54-
/* See the comment for rockchip_mmc_set_phase below */
54+
/* Constant signal, no measurable phase shift */
5555
if (!rate)
56-
return -EINVAL;
56+
return 0;
5757

5858
raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift);
5959

0 commit comments

Comments
 (0)