[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8657e44a-9c3e-492d-8485-44ff92c3bd74@linaro.org>
Date: Thu, 4 Sep 2025 15:52:04 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Konrad Dybcio <konradybcio@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Loic Poulain <loic.poulain@....qualcomm.com>,
Robert Foss <rfoss@...nel.org>, Andi Shyti <andi.shyti@...nel.org>
Cc: Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: Re: [PATCH 3/5] i2c: qcom-cci: Drop single-line wrappers
On 04/09/2025 15:31, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
>
> The CCI clock en/disable functions simply call bulk_ops, remove them.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> ---
> drivers/i2c/busses/i2c-qcom-cci.c | 20 ++++++--------------
> 1 file changed, 6 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
> index a3afa11a71a10dbb720ee9acb566991fe55b98a0..74fedfdec3ae4e034ec4d946179e963c783b5923 100644
> --- a/drivers/i2c/busses/i2c-qcom-cci.c
> +++ b/drivers/i2c/busses/i2c-qcom-cci.c
> @@ -466,21 +466,12 @@ static const struct i2c_algorithm cci_algo = {
> .functionality = cci_func,
> };
>
> -static int cci_enable_clocks(struct cci *cci)
> -{
> - return clk_bulk_prepare_enable(cci->nclocks, cci->clocks);
> -}
> -
> -static void cci_disable_clocks(struct cci *cci)
> -{
> - clk_bulk_disable_unprepare(cci->nclocks, cci->clocks);
> -}
> -
> static int __maybe_unused cci_suspend_runtime(struct device *dev)
> {
> struct cci *cci = dev_get_drvdata(dev);
>
> - cci_disable_clocks(cci);
> + clk_bulk_disable_unprepare(cci->nclocks, cci->clocks);
> +
> return 0;
> }
>
> @@ -489,11 +480,12 @@ static int __maybe_unused cci_resume_runtime(struct device *dev)
> struct cci *cci = dev_get_drvdata(dev);
> int ret;
>
> - ret = cci_enable_clocks(cci);
> + ret = clk_bulk_prepare_enable(cci->nclocks, cci->clocks);
> if (ret)
> return ret;
>
> cci_init(cci);
> +
> return 0;
> }
>
> @@ -592,7 +584,7 @@ static int cci_probe(struct platform_device *pdev)
> return dev_err_probe(dev, -EINVAL, "not enough clocks in DT\n");
> cci->nclocks = ret;
>
> - ret = cci_enable_clocks(cci);
> + ret = clk_bulk_prepare_enable(cci->nclocks, cci->clocks);
> if (ret < 0)
> return ret;
>
> @@ -651,7 +643,7 @@ static int cci_probe(struct platform_device *pdev)
> error:
> disable_irq(cci->irq);
> disable_clocks:
> - cci_disable_clocks(cci);
> + clk_bulk_disable_unprepare(cci->nclocks, cci->clocks);
>
> return ret;
> }
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Powered by blists - more mailing lists