Re: [PATCH 2/2] clk: qcom: Introduce SM8350 VIDEOCC

From: Konrad Dybcio
Date: Fri Apr 14 2023 - 07:14:36 EST




On 13.04.2023 21:04, Stephen Boyd wrote:
> Quoting Konrad Dybcio (2023-04-13 11:44:59)
>> diff --git a/drivers/clk/qcom/videocc-sm8350.c b/drivers/clk/qcom/videocc-sm8350.c
>> new file mode 100644
>> index 000000000000..186a5bd9e184
>> --- /dev/null
>> +++ b/drivers/clk/qcom/videocc-sm8350.c
>> @@ -0,0 +1,575 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
>> + * Copyright (c) 2023, Linaro Limited
>> + */
>> +

[...]

>> +enum {
>> + P_BI_TCXO,
>> + P_BI_TCXO_AO,
>> + P_SLEEP_CLK,
>> + P_VIDEO_PLL0_OUT_MAIN,
>> + P_VIDEO_PLL1_OUT_MAIN,
>> +};
>> +
>> +static struct pll_vco lucid_5lpe_vco[] = {
>
> const
>
>> + { 249600000, 1750000000, 0 },
>> +};
>> +
[...]

>> +static struct clk_alpha_pll video_pll0 = {
>> + .offset = 0x42c,
>> + .vco_table = lucid_5lpe_vco,
>> + .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
>> + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
>> + .clkr = {
>> + .hw.init = &(struct clk_init_data){
>
> const
Ack to both

[...]
>> +
>> +static int video_cc_sm8350_probe(struct platform_device *pdev)
>> +{
>> + struct regmap *regmap;
>> + int ret;
>> +
>> + pm_runtime_enable(&pdev->dev);
>> +
>> + ret = devm_add_action_or_reset(&pdev->dev, video_cc_sm8350_pm_runtime_disable, &pdev->dev);
>
> devm_pm_runtime_enable()?
Right.

Konrad
>
>> + if (ret)
>> + return ret;
>> +