clk: mxl: Add option to override gate clks
authorRahul Tanwar <rtanwar@maxlinear.com>
Thu, 13 Oct 2022 06:48:32 +0000 (14:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Feb 2023 10:25:38 +0000 (11:25 +0100)
commit77fee59653c63d3b771a28a4a0f76b80b330aa9a
tree223193ba37ba52c3144290ae7938a8c9272e959a
parent005b9a123c970d95bf97309d7397f8fa5e631358
clk: mxl: Add option to override gate clks

[ Upstream commit a5d49bd369b8588c0ee9d4d0a2c0160558a3ab69 ]

In MxL's LGM SoC, gate clocks can be controlled either from CGU clk driver
i.e. this driver or directly from power management driver/daemon. It is
dependent on the power policy/profile requirements of the end product.

To support such use cases, provide option to override gate clks enable/disable
by adding a flag GATE_CLK_HW which controls if these gate clks are controlled
by HW i.e. this driver or overridden in order to allow it to be controlled
by power profiles instead.

Reviewed-by: Yi xin Zhu <yzhu@maxlinear.com>
Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com>
Link: https://lore.kernel.org/r/bdc9c89317b5d338a6c4f1d49386b696e947a672.1665642720.git.rtanwar@maxlinear.com
[sboyd@kernel.org: Add braces on many line if-else]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Stable-dep-of: 106ef3bda210 ("clk: mxl: Fix a clk entry by adding relevant flags")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/x86/clk-cgu.c
drivers/clk/x86/clk-cgu.h