clk: qcom: clk-rcg2: Fail Duty-Cycle configuration if MND divider is not enabled.
authorNikita Travkin <nikita@trvn.ru>
Sun, 12 Jun 2022 14:59:52 +0000 (19:59 +0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:47 +0000 (14:23 +0200)
commit522e13ebbf48de0b193d7cf2977d274a9be52aa4
treebc5b9831d28a391e4a196ffbe080418c014f3a95
parent433a22104012bca12d7f7dbe450de1559b18a6e2
clk: qcom: clk-rcg2: Fail Duty-Cycle configuration if MND divider is not enabled.

[ Upstream commit bdafb609c3bb848d710ad9cd4debd2ee9d6a4049 ]

In cases when MND is not enabled (e.g. when only Half Integer Divider is
used), setting D registers makes no effect.

Fail instead of making ineffective write.

Fixes: 7f891faf596e ("clk: qcom: clk-rcg2: Add support for duty-cycle for RCG")
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220612145955.385787-2-nikita@trvn.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/clk-rcg2.c