[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b572981-7e63-4052-8186-4ba17f530cca@linaro.org>
Date: Fri, 21 Mar 2025 15:34:57 +0100
From: neil.armstrong@...aro.org
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
Ivaylo Ivanov <ivo.ivanov.ivanov1@...il.com>
Cc: Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I
<kishon@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Sylwester Nawrocki <s.nawrocki@...sung.com>, Abel Vesa
<abel.vesa@...aro.org>, linux-arm-msm@...r.kernel.org,
linux-phy@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH v3 05/10] phy: phy-snps-eusb2: split phy init code
On 21/03/2025 15:31, Dmitry Baryshkov wrote:
> On Fri, Mar 21, 2025 at 03:58:49PM +0200, Ivaylo Ivanov wrote:
>> The current phy init consists of hardware power-up, as well as
>> QCOM-specific eUSB2 init code. Split it into two parts, to make room
>> for such non-QCOM init code.
>>
>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@...il.com>
>> ---
>> drivers/phy/phy-snps-eusb2.c | 96 +++++++++++++++++++++++-------------
>> 1 file changed, 63 insertions(+), 33 deletions(-)
>>
>> @@ -378,6 +401,11 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
>> if (!phy)
>> return -ENOMEM;
>>
>> + drv_data = of_device_get_match_data(dev);
>> + if (!drv_data)
>> + return -EINVAL;
>> + phy->data = drv_data;
>
> Nit and completely bikeshedding, but this looks simpler:
>
> phy->data = of_device_get_match_data(dev);
> if (!phy->data)
> return -EINVAL;
Please use device_get_match_data() instead.
Neil
>
>
> Anyway:
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
>
>
>> +
>> phy->base = devm_platform_ioremap_resource(pdev, 0);
>> if (IS_ERR(phy->base))
>> return PTR_ERR(phy->base);
>> @@ -424,8 +452,10 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
>> }
>>
>> static const struct of_device_id snps_eusb2_hsphy_of_match_table[] = {
>> - { .compatible = "qcom,sm8550-snps-eusb2-phy", },
>> - { },
>> + {
>> + .compatible = "qcom,sm8550-snps-eusb2-phy",
>> + .data = &sm8550_snps_eusb2_phy,
>> + }, { },
>> };
>> MODULE_DEVICE_TABLE(of, snps_eusb2_hsphy_of_match_table);
>>
>> --
>> 2.43.0
>>
>
Powered by blists - more mailing lists