All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evan Green <evgreen@chromium.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Rob Herring <robh+dt@kernel.org>, Can Guo <cang@codeaurora.org>,
	Douglas Anderson <dianders@chromium.org>,
	Asutosh Das <asutoshd@codeaurora.org>,
	Vivek Gautam <vivek.gautam@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Manu Gautam <mgautam@codeaurora.org>
Subject: Re: [PATCH v1 6/8] phy: qcom-qmp: Utilize UFS reset controller
Date: Tue, 22 Jan 2019 14:41:29 -0800	[thread overview]
Message-ID: <CAE=gft4An9V8C-K-p8FtEpk5G6JsMvOAxGBHrgR_XuagGeMnXg@mail.gmail.com> (raw)
In-Reply-To: <154785081323.169631.13477061319849880987@swboyd.mtv.corp.google.com>

On Fri, Jan 18, 2019 at 2:33 PM Stephen Boyd <swboyd@chromium.org> wrote:
>
> Quoting Evan Green (2019-01-11 15:01:27)
> > @@ -1214,6 +1225,32 @@ static int qcom_qmp_phy_init(struct phy *phy)
> >
> >         dev_vdbg(qmp->dev, "Initializing QMP phy\n");
> >
> > +       if (cfg->has_ufsphy_reset) {
> > +               /*
> > +                * Get UFS reset, which is delayed until now to avoid a
> > +                * circular dependency where UFS needs its PHY, but the PHY
> > +                * needs this UFS reset.
> > +                */
> > +               if (!qmp->ufs_reset) {
> > +                       qmp->ufs_reset = of_reset_control_get(qmp->dev->of_node,
>
> Can you use devm_reset_control_get()? Put another way, why is this DT
> specific instead of using a firmware/platform agnostic API?

Sure, will fix. (Though sadly of_* is peppered all over the place in
this file for lane resets, pipe clocks, and more).

>
> > +                                                             "ufsphy");
> > +
> > +                       if (IS_ERR(qmp->ufs_reset)) {
> > +                               dev_err(qmp->dev,
> > +                                       "failed to get UFS reset: %d\n",
> > +                                       PTR_ERR(qmp->ufs_reset));
> > +
> > +                               return PTR_ERR(qmp->ufs_reset);
> > +                       }
> > +               }
> > +
> > +               ret = reset_control_assert(qmp->ufs_reset);
> > +               if (ret) {
> > +                       dev_err(qmp->dev, "ufsphy reset deassert failed\n");
>
> It's an assert though. Maybe just ignore the error message because the
> user won't be able to do anything anyway?
>

Fair enough. I'll remove the print from here and the deassert later.
-Evan

  reply	other threads:[~2019-01-22 22:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 23:01 [PATCH v1 0/8] phy: qcom-ufs: Enable regulators to be off in suspend Evan Green
2019-01-11 23:01 ` [PATCH v1 1/8] dt-bindings: phy-qcom-qmp: Add UFS PHY reset Evan Green
2019-01-22  0:21   ` Rob Herring
2019-01-22  0:21     ` Rob Herring
2019-01-11 23:01 ` [PATCH v1 2/8] dt-bindings: phy: qcom-ufs: Add resets property Evan Green
2019-01-16 21:29   ` Stephen Boyd
2019-01-16 21:29     ` Stephen Boyd
2019-01-22 18:34     ` Evan Green
2019-01-22  0:26   ` Rob Herring
2019-01-22  0:26     ` Rob Herring
2019-01-11 23:01 ` [PATCH v1 3/8] arm64: dts: sdm845: Add UFS PHY reset Evan Green
2019-01-18 22:20   ` Stephen Boyd
2019-01-18 22:20     ` Stephen Boyd
2019-01-22  0:25   ` Rob Herring
2019-01-22 18:13     ` Evan Green
2019-01-11 23:01 ` [PATCH v1 4/8] arm64: dts: msm8996: Add UFS PHY reset controller Evan Green
2019-01-18 22:20   ` Stephen Boyd
2019-01-18 22:20     ` Stephen Boyd
2019-01-11 23:01 ` [PATCH v1 5/8] scsi: ufs: qcom: Expose the reset controller for PHY Evan Green
2019-01-16  8:52   ` Kishon Vijay Abraham I
2019-01-16  8:52     ` Kishon Vijay Abraham I
2019-01-17  2:28     ` Martin K. Petersen
2019-01-17  2:28       ` Martin K. Petersen
2019-01-18 22:31   ` Stephen Boyd
2019-01-18 22:31     ` Stephen Boyd
2019-01-22 22:40     ` Evan Green
2019-01-11 23:01 ` [PATCH v1 6/8] phy: qcom-qmp: Utilize UFS reset controller Evan Green
2019-01-18 22:33   ` Stephen Boyd
2019-01-22 22:41     ` Evan Green [this message]
2019-01-11 23:01 ` [PATCH v1 7/8] phy: qcom-qmp: Move UFS phy to phy_poweron/off Evan Green
2019-01-18 22:39   ` Stephen Boyd
2019-01-22 22:42     ` Evan Green
2019-01-11 23:01 ` [PATCH v1 8/8] phy: qcom-ufs: Refactor all init steps into phy_poweron Evan Green
2019-01-18 23:50   ` Stephen Boyd
2019-01-22 22:44     ` Evan Green
2019-01-16 22:32 ` [PATCH v1 0/8] phy: qcom-ufs: Enable regulators to be off in suspend Stephen Boyd
2019-01-16 22:32   ` Stephen Boyd

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='CAE=gft4An9V8C-K-p8FtEpk5G6JsMvOAxGBHrgR_XuagGeMnXg@mail.gmail.com' \
    --to=evgreen@chromium.org \
    --cc=andy.gross@linaro.org \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=dianders@chromium.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgautam@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.org \
    --cc=vivek.gautam@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.