mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
clk: qcom: smd-rpm: Add support for clock handoff
During boot-up if the clock driver put across a initial high vote then there is no way to remove these votes which can cause the corresponding votes to be left always high till the CPU suspends causing power regression. Thus introduce a device property which can remove the initial votes from the clock driver and leave it up to the client to keep a vote. Change-Id: I068c87d06df908ee0ed0e58f69d46933b301ea6f Signed-off-by: Taniya Das <tdas@codeaurora.org>
This commit is contained in:
parent
3003ceb2bf
commit
a03c45d40e
1 changed files with 11 additions and 7 deletions
|
|
@ -912,7 +912,7 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct clk_hw **hw_clks;
|
||||
const struct rpm_smd_clk_desc *desc;
|
||||
int ret, i, is_holi;
|
||||
int ret, i, is_holi, hw_clk_handoff = false;
|
||||
|
||||
desc = of_device_get_match_data(&pdev->dev);
|
||||
if (!desc)
|
||||
|
|
@ -928,13 +928,17 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
|
|||
|
||||
hw_clks = desc->clks;
|
||||
|
||||
for (i = 0; i < desc->num_clks; i++) {
|
||||
if (!hw_clks[i])
|
||||
continue;
|
||||
hw_clk_handoff = of_property_read_bool(pdev->dev.of_node,
|
||||
"qcom,hw-clk-handoff");
|
||||
if (hw_clk_handoff) {
|
||||
for (i = 0; i < desc->num_clks; i++) {
|
||||
if (!hw_clks[i])
|
||||
continue;
|
||||
|
||||
ret = clk_smd_rpm_handoff(hw_clks[i]);
|
||||
if (ret)
|
||||
goto err;
|
||||
ret = clk_smd_rpm_handoff(hw_clks[i]);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
ret = clk_smd_rpm_enable_scaling();
|
||||
|
|
|
|||
Loading…
Reference in a new issue