Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2152169pxb; Thu, 4 Nov 2021 15:00:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ0o2rYuXBqg7cNwkEUPj4FoAJgnMtEiprL3YV9ugBrotlR0kwz+nRA5/UyeuQE3hqgmXh X-Received: by 2002:a05:6e02:1d9d:: with SMTP id h29mr33809055ila.29.1636063240240; Thu, 04 Nov 2021 15:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636063240; cv=none; d=google.com; s=arc-20160816; b=HOtChTWcNs1xi9HfAnH6Wlm9yBtBvPYm5qU8yAB8ACdC7d37qTB+AFXbHO3XqJZm3K xa8GGlgmMS6tYvvOZhXw+bPPqzD/CKQwVCLKYjJ6JlQYw3wevkY5sXSzgwySmdjxZW/m 9AG5pdLkne0/qXh/4l8c/FZKV/NGZM10I4jE8X3wZn2MSbIe0SqWKI4bZ++i/ROtWxtQ uzVMSiuGZ4oeWV2ndfy8M+AwxIhLfTINE7j9S69dqhHxe0pNiaSNHlXkfqco3gukk2Vn xZpCXEBSuLP4BmP8Jypz3NQrcjqDy6vKLbnjrNG0eCclhdrfks4qh/DqMOyy7T2KEw8q DOyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=Gzc6ksMH+v4h+M1VIef79nq9tzXgxfqPaLbNZYO5nZ8=; b=jWcZx1lnlprZNdKB4nMjeYK753PPiFJ1zfCTpZkYZtFrpwWEr+BOHaCJuXpRHjXSly 0hShZXb+qKODbXOdu97e/T8Yxo1x750/XA3p3qmmmQiJ4a+JCivpLS2zx6QgCB9tzdnU X0FET/LD3EpKG+YZGsL2/rg0V6LerExJEUpdzszdIjasLWo2vydvHEzuEvAf/ui47yYX e5y/OWYgpXFbR5B98D7AdxOHMgJS5Ppe73JJ3qr2G+wyr323CJq4OYrFKEZN+MBei9uc H5Zy/welCbtrut+mfC3OPW5Rmxx8laa3Fs5vL1L5mrlq0fKqfo9QtbU3xqAYZLZs1OSs haEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qLZa9FaC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si12382054ilb.134.2021.11.04.15.00.08; Thu, 04 Nov 2021 15:00:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qLZa9FaC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232086AbhKDVul (ORCPT + 99 others); Thu, 4 Nov 2021 17:50:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:55244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231950AbhKDVuk (ORCPT ); Thu, 4 Nov 2021 17:50:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B627F60F45; Thu, 4 Nov 2021 21:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636062482; bh=XUWkBUYQH1sVQ6/UxiW1zJVuZf29aMTBuB8+gR8Mgco=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=qLZa9FaCjMfC5DSo1Cq5o12BkRNaLMha2tFsgq9zmB17Q2y9SkQwJpvuLBzsG9W9b Snv69wAgNvlrxuacq5H/XmPoICBJ0R7qemZdolOBZQLPyvc3ciL64JGPIoH3c4wZp0 A1xWwvHeLbaTBnINUbGUktuCUPVMcXt/dZ4BawX073QixG/l507+vYgdBOx6Hw6rh8 LDOt+46C6qf05s33LD18qibSUqqll10yUFy0OOKe4m1dhz7odkqYIiY3IXQdldoyf5 Oc6wsb/GqQGbPKH+OJUbKI215ceDRdcBwc0o+Q3W4PQmYYpzgVZjIBBc26/JwxgBiC wWBpnBjvoWmLg== Date: Thu, 4 Nov 2021 16:48:00 -0500 From: Bjorn Helgaas To: Mauro Carvalho Chehab Cc: Lorenzo Pieralisi , linuxarm@huawei.com, mauro.chehab@huawei.com, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Binghui Wang , Bjorn Helgaas , Rob Herring , Xiaowei Song , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Kishon Vijay Abraham I Subject: Re: [PATCH v15 01/13] PCI: kirin: Reorganize the PHY logic inside the driver Message-ID: <20211104214800.GA814298@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Acked-by: Xiaowei Song > Signed-off-by: Mauro Carvalho Chehab > +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); > +}