lkml.org 
[lkml]   [2020]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 05/19] phy: qualcomm: usb: Add SuperSpeed PHY driver
From
Date
On Wed, 2020-01-15 at 14:13 +0000, Bryan O'Donoghue wrote:
> From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>
> Controls Qualcomm's SS phy 1.0.0 implemented in the QCS404 and some
> other Qualcomm platforms.
>
> Based on Sriharsha Allenki's <sallenki@codeaurora.org> original code.
>
> [bod: Removed dependency on extcon.
> Switched to gpio-usb-conn to handle VBUS On/Off
> Switched to usb-role-switch to bind gpio-usb-conn to DWC3]
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Cc: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
> Cc: Sriharsha Allenki's <sallenki@codeaurora.org>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> drivers/phy/qualcomm/Kconfig | 11 ++
> drivers/phy/qualcomm/Makefile | 1 +
> drivers/phy/qualcomm/phy-qcom-usb-ss.c | 246 +++++++++++++++++++++++++
> 3 files changed, 258 insertions(+)
> create mode 100644 drivers/phy/qualcomm/phy-qcom-usb-ss.c
>
[...]
> diff --git a/drivers/phy/qualcomm/phy-qcom-usb-ss.c b/drivers/phy/qualcomm/phy-qcom-usb-ss.c
> new file mode 100644
> index 000000000000..109e455cb509
> --- /dev/null
> +++ b/drivers/phy/qualcomm/phy-qcom-usb-ss.c
> @@ -0,0 +1,246 @@
[...]
> +static int qcom_ssphy_init_reset(struct ssphy_priv *priv)
> +{
> + priv->reset_com = devm_reset_control_get_optional(priv->dev, "com");
Please use devm_reset_control_get_optional_exclusive() here ...

> + if (IS_ERR(priv->reset_com)) {
> + dev_err(priv->dev, "Failed to get reset control com\n");
> + return PTR_ERR(priv->reset_com);
> + }
> +
> + if (priv->reset_com) {
> + /* if reset_com is present, reset_phy is no longer optional */
> + priv->reset_phy = devm_reset_control_get(priv->dev, "phy");

... and devm_reset_control_get_exclusive() here.

regards
Philipp

\
 
 \ /
  Last update: 2020-01-15 16:09    [W:0.121 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site