From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Dilip Kota <eswara.kota@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
kishon@ti.com, robh@kernel.org, cheol.yong.kim@intel.com,
chuanhua.lei@linux.intel.com, qi-ming.wu@intel.com,
yixin.zhu@intel.com
Subject: Re: [PATCH v4 3/3] phy: intel: Add driver support for ComboPhy
Date: Mon, 2 Mar 2020 13:19:01 +0200 [thread overview]
Message-ID: <20200302111901.GT1224808@smile.fi.intel.com> (raw)
In-Reply-To: <4e55050985ef0ab567415625f5d14ab1c9b33994.1583127977.git.eswara.kota@linux.intel.com>
On Mon, Mar 02, 2020 at 04:43:25PM +0800, Dilip Kota wrote:
> ComboPhy subsystem provides PHYs for various
> controllers like PCIe, SATA and EMAC.
Thanks for an update, my (few minor) comments below.
...
> +enum intel_phy_mode {
> + PHY_PCIE_MODE = 0,
> + PHY_XPCS_MODE,
> + PHY_SATA_MODE
From here it's not visible that above is the only possible values.
Maybe in the future you will have another mode.
So, I suggest to leave comma here...
> +};
> +enum intel_combo_mode {
> + PCIE0_PCIE1_MODE = 0,
> + PCIE_DL_MODE,
> + RXAUI_MODE,
> + XPCS0_XPCS1_MODE,
> + SATA0_SATA1_MODE
...and here...
> +};
> +
> +enum aggregated_mode {
> + PHY_SL_MODE,
> + PHY_DL_MODE
...and here.
> +};
...
> +static int intel_cbphy_iphy_cfg(struct intel_cbphy_iphy *iphy,
> + int (*phy_cfg)(struct intel_cbphy_iphy *))
> +{
> + struct intel_combo_phy *cbphy = iphy->parent;
> + struct intel_cbphy_iphy *sphy;
> + int ret;
> +
> + ret = phy_cfg(iphy);
> + if (ret)
> + return ret;
> +
> + if (cbphy->aggr_mode != PHY_DL_MODE)
> + return 0;
> +
> + sphy = &cbphy->iphy[PHY_1];
Do you really need temporary variable here?
> +
> + return phy_cfg(sphy);
> +}
...
> + if (!cbphy->init_cnt) {
if (init_cnt)
return 0;
?
> + clk_disable_unprepare(cbphy->core_clk);
> + intel_cbphy_rst_assert(cbphy);
> + }
> +
> + return 0;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-03-02 11:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 8:43 [PATCH v4 0/3] Add Intel ComboPhy driver Dilip Kota
2020-03-02 8:43 ` [PATCH v4 1/3] mfd: syscon: Add fwnode_to_regmap Dilip Kota
2020-03-02 8:43 ` [PATCH v4 2/3] dt-bindings: phy: Add YAML schemas for Intel Combophy Dilip Kota
2020-03-03 1:50 ` Rob Herring
2020-03-03 9:24 ` Dilip Kota
2020-03-03 16:26 ` Rob Herring
2020-03-04 9:16 ` Dilip Kota
2020-03-13 8:36 ` Dilip Kota
2020-03-02 8:43 ` [PATCH v4 3/3] phy: intel: Add driver support for ComboPhy Dilip Kota
2020-03-02 11:19 ` Andy Shevchenko [this message]
2020-03-03 8:41 ` Dilip Kota
2020-03-03 10:07 ` Andy Shevchenko
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=20200302111901.GT1224808@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=cheol.yong.kim@intel.com \
--cc=chuanhua.lei@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=eswara.kota@linux.intel.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qi-ming.wu@intel.com \
--cc=robh@kernel.org \
--cc=yixin.zhu@intel.com \
/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