clk: sprd: check its parent status before reading gate clock
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Wed, 27 May 2020 05:36:35 +0000 (13:36 +0800)
committerStephen Boyd <sboyd@kernel.org>
Wed, 27 May 2020 06:41:14 +0000 (23:41 -0700)
commit8b4f6b8d59c614477ce65da15a4f5ddc31b2c398
tree6ce63204cf6ca568ebbbf41c12cf746cbe009cdf
parentc2f30986d418f26abefc2eec90ebf06716c970d2
clk: sprd: check its parent status before reading gate clock

Some clocks only can be accessed if their parent is enabled. mipi_csi_xx
clocks on SC9863A are an examples. We have to ensure the parent clock is
enabled when reading those clocks.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lkml.kernel.org/r/20200527053638.31439-2-zhang.lyra@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/sprd/gate.c
drivers/clk/sprd/gate.h