[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <90da3361-6b11-7a1c-a845-af33ba03a686@linaro.org>
Date: Mon, 14 Aug 2023 12:04:51 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Varadarajan Narayanan <quic_varada@...cinc.com>, agross@...nel.org,
andersson@...nel.org, konrad.dybcio@...aro.org, vkoul@...nel.org,
kishon@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
catalin.marinas@....com, will@...nel.org, p.zabel@...gutronix.de,
arnd@...db.de, geert+renesas@...der.be, nfraprado@...labora.com,
rafal@...ecki.pl, peng.fan@....com, quic_srichara@...cinc.com,
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
Subject: Re: [PATCH v7 2/5] phy: qcom-m31: Introduce qcom,m31 USB phy driver
On 10/08/2023 11:56, Varadarajan Narayanan wrote:
> Add the M31 USB2 phy driver.
>
> Signed-off-by: Varadarajan Narayanan <quic_varada@...cinc.com>
> ---
...
> +static int m31usb_phy_probe(struct platform_device *pdev)
> +{
> + struct phy_provider *phy_provider;
> + const struct m31_priv_data *data;
> + struct device *dev = &pdev->dev;
> + struct m31usb_phy *qphy;
> +
> + qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL);
> + if (!qphy)
> + return -ENOMEM;
> +
> + qphy->base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(qphy->base))
> + return PTR_ERR(qphy->base);
> +
> + qphy->reset = devm_reset_control_get_exclusive_by_index(dev, 0);
> + if (IS_ERR(qphy->reset))
> + return PTR_ERR(qphy->reset);
> +
> + qphy->clk = devm_clk_get(dev, NULL);
> + if (IS_ERR(qphy->clk))
> + return dev_err_probe(dev, PTR_ERR(qphy->clk),
> + "failed to get clk\n");
This looks misaligned.
> +
> + data = of_device_get_match_data(dev);
> + qphy->regs = data->regs;
> + qphy->nregs = data->nregs;
> + qphy->ulpi_mode = data->ulpi_mode;
> +
> + qphy->phy = devm_phy_create(dev, NULL, &m31usb_phy_gen_ops);
> + if (IS_ERR(qphy->phy))
> + return dev_err_probe(dev, PTR_ERR(qphy->phy),
> + "failed to create phy\n");
Ditto... and in other places.
> +
> + qphy->vreg = devm_regulator_get(dev, "vdda-phy");
> + if (IS_ERR(qphy->vreg))
> + return dev_err_probe(dev, PTR_ERR(qphy->phy),
> + "failed to get vreg\n");
> +
> + phy_set_drvdata(qphy->phy, qphy);
> +
> + phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> + if (!IS_ERR(phy_provider))
> + dev_info(dev, "Registered M31 USB phy\n");
Drop simple success messages. Kernel has other means to do it.
Best regards,
Krzysztof
Powered by blists - more mailing lists