Messages in this thread | | | Date | Thu, 4 Nov 2021 16:48:00 -0500 | From | Bjorn Helgaas <> | Subject | Re: [PATCH v15 01/13] PCI: kirin: Reorganize the PHY logic inside the driver |
| |
On Thu, Oct 21, 2021 at 11:45:08AM +0100, Mauro Carvalho Chehab wrote: > The pcie-kirin PCIe driver contains internally a PHY interface for > Kirin 960. > > As the next patches will add support for using an external PHY > driver, reorganize the driver in a way that the PHY part > will be self-contained. > > This could be moved to a separate PHY driver, but a change > like that would mean a non-backward-compatible DT schema > change. > > Cc: Kishon Vijay Abraham I <kishon@ti.com> > Acked-by: Xiaowei Song <songxiaowei@hisilicon.com> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> +static int hi3660_pcie_phy_init(struct platform_device *pdev, > + struct kirin_pcie *pcie) > +{ > + struct device *dev = &pdev->dev; > + struct hi3660_pcie_phy *phy; > + int ret; > + > + phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); > + if (!phy) > + return -ENOMEM; > + > + pcie->phy_priv = phy; > + phy->dev = dev; > + > + /* registers */ > + pdev = container_of(dev, struct platform_device, dev);
Is there something missing here? "pdev" isn't referenced below. Noticed by Krzysztof.
> + ret = hi3660_pcie_phy_get_clk(phy); > + if (ret) > + return ret; > + > + return hi3660_pcie_phy_get_resource(phy); > +}
| |