On Wed, Feb 26, 2020 at 06:09:53PM +0800, Dilip Kota wrote:Yes, OF is not required. I will remove it.
Combophy subsystem provides PHYs for variousThanks for an update, my comments below.
controllers like PCIe, SATA and EMAC.
...
+config PHY_INTEL_COMBOI guess it would be better to have like this:
+ bool "Intel Combo PHY driver"
+ depends on OF && HAS_IOMEM && (X86 || COMPILE_TEST)
depends on X86 || COMPILE_TEST
depends on OF && HAS_IOMEM
But do you still have a dependency to OF?
My bad. I will update it.
+ select MFD_SYSCON...
+ select GENERIC_PHY
+ select REGMAP
+ * Copyright (C) 2019 Intel Corporation.2019-2020
...
...
+};But here we don't need it since it's a terminator line.
+
+enum {
+ PHY_0,
+ PHY_1,
+ PHY_MAX_NUM,
Ditto for the rest of enumerators with a terminator / max entry.
...Sure, it looks appropriate for intel_cbphy_iphy_dt_parse() -> intel_cbphy_iphy_fwnode_parse().
+static int intel_cbphy_iphy_dt_parse(struct intel_combo_phy *cbphy,dt -> fwnode
Ditto for other similar function names.
+ struct fwnode_handle *fwnode, int idx)I don't see where you drop reference count to the struct device object.
+{
+ dev = get_dev_from_fwnode(fwnode);
...In the v2 patch, for int i = 0 you mentioned to do initialization at the user, instead of doing at declaration.
+ struct fwnode_reference_args ref;I guess the following would be better:
+ struct device *dev = cbphy->dev;
+ struct fwnode_handle *fwnode;
+ struct platform_device *pdev;
+ int i, ret;
+ u32 prop;
Regards,
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.