From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Varadarajan Narayanan <quic_varada@quicinc.com>,
agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, vkoul@kernel.org, kishon@kernel.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, catalin.marinas@arm.com, will@kernel.org,
p.zabel@pengutronix.de, arnd@arndb.de, geert+renesas@glider.be,
nfraprado@collabora.com, rafal@milecki.pl, peng.fan@nxp.com,
quic_srichara@quicinc.com, linux-arm-msm@vger.kernel.org,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 2/5] phy: qcom-m31: Introduce qcom,m31 USB phy driver
Date: Mon, 14 Aug 2023 12:04:51 +0200 [thread overview]
Message-ID: <90da3361-6b11-7a1c-a845-af33ba03a686@linaro.org> (raw)
In-Reply-To: <b17b55b2ff2277bb9bfa99acdb2f98ed420dfb6e.1691660905.git.quic_varada@quicinc.com>
On 10/08/2023 11:56, Varadarajan Narayanan wrote:
> Add the M31 USB2 phy driver.
>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.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
next prev parent reply other threads:[~2023-08-14 10:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 9:56 [PATCH v7 0/5] Enable IPQ5332 USB2 Varadarajan Narayanan
2023-08-10 9:56 ` [PATCH v7 1/5] dt-bindings: phy: qcom,m31: Document qcom,m31 USB phy Varadarajan Narayanan
2023-08-10 10:21 ` Rob Herring
2023-08-10 20:51 ` Rob Herring
2023-08-10 9:56 ` [PATCH v7 2/5] phy: qcom-m31: Introduce qcom,m31 USB phy driver Varadarajan Narayanan
2023-08-10 13:00 ` Konrad Dybcio
2023-08-10 15:19 ` Bjorn Andersson
2023-08-11 8:30 ` Vinod Koul
2023-08-14 8:35 ` Varadarajan Narayanan
2023-08-14 10:04 ` Krzysztof Kozlowski [this message]
2023-08-10 9:56 ` [PATCH v7 3/5] arm64: dts: qcom: ipq5332: Add USB related nodes Varadarajan Narayanan
2023-08-14 10:01 ` Krzysztof Kozlowski
2023-08-10 9:56 ` [PATCH v7 4/5] arm64: dts: qcom: ipq5332: Enable USB Varadarajan Narayanan
2023-08-14 10:01 ` Krzysztof Kozlowski
2023-08-10 9:56 ` [PATCH v7 5/5] arm64: defconfig: Enable M31 USB phy driver Varadarajan Narayanan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90da3361-6b11-7a1c-a845-af33ba03a686@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=nfraprado@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=peng.fan@nxp.com \
--cc=quic_srichara@quicinc.com \
--cc=quic_varada@quicinc.com \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=vkoul@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).