Hi Shawn,
On 07/14/2017 02:33 PM, Shawn Lin wrote:
+static struct phy *rockchip_pcie_phy_of_xlate(struct device *dev,
+ struct of_phandle_args *args)
+{
+ struct rockchip_pcie_phy *rk_phy = dev_get_drvdata(dev);
+
+ if (!rk_phy)
+ return ERR_PTR(-ENODEV);
Shouldn't you just check args->args_count to determine legacy vs. new
style?
args_count is 1 for legacy mode but could also means you just add one
phy with the new per-lane mode?
The new per-lane mode should follow by a lane number, so their
args_count should be 1, while in the legacy mode it should be 0.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html