linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dilip Kota <eswara.kota@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@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: Tue, 3 Mar 2020 16:41:17 +0800	[thread overview]
Message-ID: <b0f7742d-7d61-9743-4047-c5352dd7495d@linux.intel.com> (raw)
In-Reply-To: <20200302111901.GT1224808@smile.fi.intel.com>


On 3/2/2020 7:19 PM, Andy Shevchenko wrote:
> 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...
There won't be no further modes,...
i can still add the comma at all the places pointed.
>
>> +};
>> +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?
Can be removed, i will update in the next patch.
>
>> +
>> +	return phy_cfg(sphy);
>> +}
> ...
>
>> +	if (!cbphy->init_cnt) {
> 	if (init_cnt)
> 		return 0;
>
> ?

Sure, will do the same.


Thanks,
Dilip

>> +		clk_disable_unprepare(cbphy->core_clk);
>> +		intel_cbphy_rst_assert(cbphy);
>> +	}
>> +
>> +	return 0;

  reply	other threads:[~2020-03-03  8:41 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
2020-03-03  8:41     ` Dilip Kota [this message]
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=b0f7742d-7d61-9743-4047-c5352dd7495d@linux.intel.com \
    --to=eswara.kota@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=cheol.yong.kim@intel.com \
    --cc=chuanhua.lei@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).