mirror of https://lore.kernel.org/lkml/
 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 v3 3/3] phy: intel: Add driver support for Combophy
Date: Thu, 27 Feb 2020 15:52:13 +0800	[thread overview]
Message-ID: <371e50f1-cab6-56f4-d12d-371d1b1f9c67@linux.intel.com> (raw)
In-Reply-To: <20200226144147.GQ10400@smile.fi.intel.com>


Thanks Andy for reviewing and giving the inputs.
I will update them as per your comments, but for couple of cases of i 
have a different opinion. Please check and give your inputs.

On 2/26/2020 10:41 PM, Andy Shevchenko wrote:
> On Wed, Feb 26, 2020 at 06:09:53PM +0800, Dilip Kota wrote:
>> Combophy subsystem provides PHYs for various
>> controllers like PCIe, SATA and EMAC.
> Thanks for an update, my comments below.
>
> ...
>
>> +config PHY_INTEL_COMBO
>> +	bool "Intel Combo PHY driver"
>> +	depends on OF && HAS_IOMEM && (X86 || COMPILE_TEST)
> I guess it would be better to have like this:
>
> 	depends on X86 || COMPILE_TEST
> 	depends on OF && HAS_IOMEM
>
> But do you still have a dependency to OF?
Yes, OF is not required. I will remove it.
>
>> +	select MFD_SYSCON
>> +	select GENERIC_PHY
>> +	select REGMAP
> ...
>
>> + * Copyright (C) 2019 Intel Corporation.
> 2019-2020
My bad. I will update it.
>
> ...
>
...
>> +};
>> +
>> +enum {
>> +	PHY_0,
>> +	PHY_1,
>> +	PHY_MAX_NUM,
> But here we don't need it since it's a terminator line.
> Ditto for the rest of enumerators with a terminator / max entry.

Sure i will remove them.

To be meaningful, i will remove the max entry for the enums representing 
the value of register bitfields.

...
> ...
>
>> +static int intel_cbphy_iphy_dt_parse(struct intel_combo_phy *cbphy,
> dt -> fwnode
> Ditto for other similar function names.
Sure, it looks appropriate for intel_cbphy_iphy_dt_parse() -> 
intel_cbphy_iphy_fwnode_parse().
Whereas for intel_cbphy_dt_parse() i will keep it unchanged, because it 
is calling devm_*, devm_platform_*, fwnode_* APIs to traverse dt node.
>
>> +				     struct fwnode_handle *fwnode, int idx)
>> +{
>> +	dev = get_dev_from_fwnode(fwnode);
> I don't see where you drop reference count to the struct device object.

I will add it. Thanks for pointing it.

...

> ...
>
>> +	struct fwnode_reference_args ref;
>> +	struct device *dev = cbphy->dev;
>> +	struct fwnode_handle *fwnode;
>> +	struct platform_device *pdev;
>> +	int i, ret;
>> +	u32 prop;
> I guess the following would be better:
In the v2 patch, for int i = 0 you mentioned to do initialization at the 
user, instead of doing at declaration.
So i followed the same for "pdev" and "fwnode" which are being used 
after few lines of the code . It looked good in the perspective of code 
readability.
>
> 	struct device *dev = cbphy->dev;
> 	struct platform_device *pdev = to_platform_device(dev);
> 	struct fwnode_handle *fwnode = dev_fwnode(dev);
> 	struct fwnode_reference_args ref;
> 	int i, ret;
> 	u32 prop;
>
>> +	pdev = to_platform_device(dev);
> See above.
>
>> +	fwnode = dev_fwnode(dev);
> See above.
>
>
Regards,
Dilip


  parent reply	other threads:[~2020-02-27  7:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 10:09 [PATCH v3 0/3] Add Intel ComboPhy driver Dilip Kota
2020-02-26 10:09 ` [PATCH v3 1/3] mfd: syscon: Add fwnode_to_regmap Dilip Kota
2020-02-26 10:09 ` [PATCH v3 2/3] dt-bindings: phy: Add YAML schemas for Intel Combophy Dilip Kota
2020-02-26 10:09 ` [PATCH v3 3/3] phy: intel: Add driver support for Combophy Dilip Kota
2020-02-26 14:41   ` Andy Shevchenko
2020-02-26 14:45     ` Andy Shevchenko
2020-02-27  7:52     ` Dilip Kota [this message]
2020-02-27  9:43       ` Andy Shevchenko
2020-02-28  9:20         ` Dilip Kota

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=371e50f1-cab6-56f4-d12d-371d1b1f9c67@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

all inboxes | Powered by JetHome®