lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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);
> +}

\
 
 \ /
  Last update: 2021-11-04 22:48    [W:0.215 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site