[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <840f61fac35f28bbbbeed96502c5e351f1c9fefe.camel@pengutronix.de>
Date: Wed, 15 Jan 2020 16:08:34 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
gregkh@...uxfoundation.org, jackp@...eaurora.org, balbi@...nel.org,
bjorn.andersson@...aro.org
Cc: linux-kernel@...r.kernel.org, Shawn Guo <shawn.guo@...aro.org>,
Andy Gross <agross@...nel.org>,
Kishon Vijay Abraham I <kishon@...com>,
Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@...il.com>
Subject: Re: [PATCH 03/19] phy: qualcomm: Add Synopsys Hi-Speed USB PHY
driver
Hi Bryan,
On Wed, 2020-01-15 at 14:13 +0000, Bryan O'Donoghue wrote:
> From: Shawn Guo <shawn.guo@...aro.org>
>
> Adds Qualcomm QCS404 Hi-Speed USB PHY driver support. This PHY is usually
> is usually paired with Synopsys DWC3 USB controllers on Qualcomm SoCs.
>
> [bod: Updated qcom_snps_hsphy_set_mode to match new method signature
> Added disjunct on mode > 0
> Removed regulator_set_voltage() in favour of setting floor in dts
> Removed 'snps' and '28nm' from driver name]
>
> Signed-off-by: Shawn Guo <shawn.guo@...aro.org>
> Cc: Andy Gross <agross@...nel.org>
> Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
> Cc: Kishon Vijay Abraham I <kishon@...com>
> Cc: Philipp Zabel <p.zabel@...gutronix.de>
> Cc: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@...il.com>
> Cc: linux-arm-msm@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
> ---
> drivers/phy/qualcomm/Kconfig | 10 +
> drivers/phy/qualcomm/Makefile | 1 +
> drivers/phy/qualcomm/phy-qcom-qcs404-usb-hs.c | 415 ++++++++++++++++++
> 3 files changed, 426 insertions(+)
> create mode 100644 drivers/phy/qualcomm/phy-qcom-qcs404-usb-hs.c
>
[...]
> diff --git a/drivers/phy/qualcomm/phy-qcom-qcs404-usb-hs.c b/drivers/phy/qualcomm/phy-qcom-qcs404-usb-hs.c
> new file mode 100644
> index 000000000000..c09b786592b1
> --- /dev/null
> +++ b/drivers/phy/qualcomm/phy-qcom-qcs404-usb-hs.c
> @@ -0,0 +1,415 @@
[...]
> +static int qcom_snps_hsphy_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct phy_provider *provider;
> + struct hsphy_priv *priv;
> + struct phy *phy;
> + int ret;
> + int i;
> +
> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + priv->base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(priv->base))
> + return PTR_ERR(priv->base);
> +
> + priv->num_clks = ARRAY_SIZE(qcom_snps_hsphy_clks);
> + priv->clks = devm_kcalloc(dev, priv->num_clks, sizeof(*priv->clks),
> + GFP_KERNEL);
> + if (!priv->clks)
> + return -ENOMEM;
> +
> + for (i = 0; i < priv->num_clks; i++)
> + priv->clks[i].id = qcom_snps_hsphy_clks[i];
> +
> + ret = devm_clk_bulk_get(dev, priv->num_clks, priv->clks);
> + if (ret)
> + return ret;
> +
> + priv->phy_reset = devm_reset_control_get(dev, "phy");
Please use devm_reset_control_get_exclusive(). I'd like drivers to
explicitly state whether they request exclusive or shared control.
> + if (IS_ERR(priv->phy_reset))
> + return PTR_ERR(priv->phy_reset);
> +
> + priv->por_reset = devm_reset_control_get(dev, "por");
Same here.
regards
Philipp
Powered by blists - more mailing lists