Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp234093ybx; Wed, 6 Nov 2019 16:12:35 -0800 (PST) X-Google-Smtp-Source: APXvYqweme95Nwq0xnLPZJ5HYpIxDr1f03eGwNcAPS5HfRMTI74XWiksz1RMdpLWlZq36oZ32NHY X-Received: by 2002:a17:906:e82:: with SMTP id p2mr326962ejf.237.1573085554924; Wed, 06 Nov 2019 16:12:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573085554; cv=none; d=google.com; s=arc-20160816; b=MztYKJhKW6gF7De5abDP+lOwjl5VUz2vAKMGYL4Sc8+9aCEcVFJ/GKlnnIB3AnRuwx Fpa//61ZQ4PypOoRS7RS43QWa+Rts76Ark9sYnyROI0zXvoalKa59NmMbxPBFI7FtVVm o3oWNbcHAx9VhV3D2hnKIPHlwezeKUW4rk+XJLZS+CzTn5ch/6TLu/CLlOy9lG+YOryI tkyKVWBA1Qy1MJBcRjkxnWzIzXuLcqfhQaXL5EnuM4l0xj5LVXfhp7v0//zwP5bvN+2T bnz6Ui0vlo2sXhtSCUVMDAdaOOaDCIiJesoXbA+daOi8VM2jErFVt7mtCOZWljNP4dfF grIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nkwrhUtOyjx0z9ia/8F33+h4qaYoxLjegmC7kxYQ68c=; b=KwYCgTIqhc3+BkcGC71S/v5nu2ww4RJqOkg9uvGwf15K6raI08N4VcMYd3m22By/wi HoZp/W/pbLWjoMXpH2Q60NOFB/DeaO2cTKgA4Wo2VekXd2bkPEhRl/nlnr1TobaJnK/u tg8h9ajyBYXrezzSlNiNaT7Km5ZpiUy3fEns2HhqybYcJkX1UyLxZdCeiczhp8cmNMKu P3+VdOs4/l25B9oTxnbcRKc0dGsATKS9HxY4+2HewmB+kP7hySp5dGV2UW796hPFbVJf 3tiilT59thMCUt6PPLssquXxreJQMvD1QDoIrgkf1WT0FQIBn1Rm7lswe2iqFKYeAC+A Ehjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G+nW4KyY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si367399ejr.90.2019.11.06.16.12.11; Wed, 06 Nov 2019 16:12:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G+nW4KyY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732543AbfKGAJ0 (ORCPT + 99 others); Wed, 6 Nov 2019 19:09:26 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44700 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732575AbfKGAJZ (ORCPT ); Wed, 6 Nov 2019 19:09:25 -0500 Received: by mail-pg1-f193.google.com with SMTP id f19so330531pgk.11 for ; Wed, 06 Nov 2019 16:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nkwrhUtOyjx0z9ia/8F33+h4qaYoxLjegmC7kxYQ68c=; b=G+nW4KyYZbSmZV1PjkTQItWl/2ynM7MjIg4xQoN3etiESrao5WSn8DqJrhbsEDXx7z VRSfFtgZrlUqjK/Am4eN6BvO9OeLveWVg2v7MGpYtHwP+zJQ6G/7leP8ahpXUESoxn5Q XLl/3rOmXsYBbPkbhJt8xebs2f8+J0E5sif/yBvUK99IXEoh7dCB4v8YN+7Q/xNqA3y5 Djg07z3+oZAxmuKIvyi8XQWEMsksPV4l6ekG6ORvL3vUUpsazEJbyC851Mk5mWVlgdmk op1GB6r68yrrb7k1aMnDqtJPXMRrrjkZKLE5D9cXZMYTb/WW5ujfVQnRSOwJ3zWMjD4Y dDlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nkwrhUtOyjx0z9ia/8F33+h4qaYoxLjegmC7kxYQ68c=; b=Ml9G/15ZaaB2Fyw7AdEAN2tWCfz63CeR4G9kzWq4pGJFQOY2kcEeOsgyclzVM9UFlm WZP4LFNAguJpIcU5GSaTnXhHKullYbWafoG7Ucm22u1Su/vs+aNfTkMrdlcW6YDMHnQV ytA4zRrarUHuwct8fCynYeFcETAC2K+zHo+8yKmHa6psxecnyllZD+Nq0P7AtS29lAbv aKt0NZDXWk/Zxb10rBU1DeEdq16YBXRpq2wct3hgvoLjjxFUXwLvzZ94idZPp2QVfziZ IzAVcjSC0FIaOekEhiUNPywcjIUst83tRHGhhmJ8gxathqE6WDDCumYbly+TtoMChIR4 tEGA== X-Gm-Message-State: APjAAAUbiYIAvN4j+OqL+USv0sNNGgHjJGur2Iuu5zUoWRolge5bZELD x3993qCzEuRm9ygiodV2GmbSkwhPvAU= X-Received: by 2002:aa7:930c:: with SMTP id 12mr90008pfj.33.1573085364599; Wed, 06 Nov 2019 16:09:24 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id z23sm216549pgj.43.2019.11.06.16.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 16:09:23 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3 3/5] phy: qcom: qmp: Use power_on/off ops for PCIe Date: Wed, 6 Nov 2019 16:09:15 -0800 Message-Id: <20191107000917.1092409-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191107000917.1092409-1-bjorn.andersson@linaro.org> References: <20191107000917.1092409-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PCIe PHY initialization requires the attached device to be present, which is primarily achieved by the PCI controller driver. So move the logic from init/exit to power_on/power_off. Signed-off-by: Bjorn Andersson --- Changes since v2: - None drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 66f91726b8b2..b9f849d86795 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -1968,7 +1968,7 @@ static const struct phy_ops qcom_qmp_phy_gen_ops = { .owner = THIS_MODULE, }; -static const struct phy_ops qcom_qmp_ufs_ops = { +static const struct phy_ops qcom_qmp_pcie_ufs_ops = { .power_on = qcom_qmp_phy_enable, .power_off = qcom_qmp_phy_disable, .set_mode = qcom_qmp_phy_set_mode, @@ -2068,8 +2068,8 @@ int qcom_qmp_phy_create(struct device *dev, struct device_node *np, int id) } } - if (qmp->cfg->type == PHY_TYPE_UFS) - ops = &qcom_qmp_ufs_ops; + if (qmp->cfg->type == PHY_TYPE_UFS || qmp->cfg->type == PHY_TYPE_PCIE) + ops = &qcom_qmp_pcie_ufs_ops; generic_phy = devm_phy_create(dev, np, ops); if (IS_ERR(generic_phy)) { -- 2.23.0