lkml.org 
[lkml]   [2019]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v1 6/8] phy: qcom-qmp: Utilize UFS reset controller
    From
    Date
    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?

    > + "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?

    \
     
     \ /
      Last update: 2019-01-18 23:34    [W:4.280 / U:0.476 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site