From patchwork Wed Aug 3 12:33:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 595114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5D62C19F28 for ; Wed, 3 Aug 2022 12:34:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237730AbiHCMei (ORCPT ); Wed, 3 Aug 2022 08:34:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235025AbiHCMeh (ORCPT ); Wed, 3 Aug 2022 08:34:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F3911CB0A; Wed, 3 Aug 2022 05:34:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1D030B8225D; Wed, 3 Aug 2022 12:34:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C210DC433B5; Wed, 3 Aug 2022 12:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659530073; bh=cjlE0FBFyWe53Ldcvjg0DL1JexEytGR7NT8J4Bje9cc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feZngJJTY0tNOTzjj8N2qtbNbFIcfLhpfgYzUNvQg9zG7X6Gdh/uGsNNJDrOJBWeG n/q09Y68ifunJQPBxdHbde3WIipPnVO9KEpe88ey8vP5mdyYCKShJVR4GXMq6FqRy+ lC4MfMGTp1aTykXmSruXunqgQyasGkyTbtQqKFkWLSmFsMww4HGFkqmgaGslAVC/nv wPa90AlEHY1l2vQ62S1jzXLUAzNcXoSbpzxVqjhuyvHSr1SrrkFDfqw8zvMyYUFt1a FVPz9pNYjrLx/xA3+J89yvL0cYSUFN63oGciekd0y5Wi2QcFggFsfTOUFVvo7XmDbD QNGfE78M+IxxA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oJDaO-00028B-My; Wed, 03 Aug 2022 14:34:52 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Kuogee Hsieh , Douglas Anderson , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/2] phy: qcom-qmp-combo: drop regulator loads Date: Wed, 3 Aug 2022 14:33:31 +0200 Message-Id: <20220803123332.8138-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220803123332.8138-1-johan+linaro@kernel.org> References: <20220803123332.8138-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Drivers should not be specifying active-mode regulator loads unless supporting an idle mode where the load is reduced during runtime. This effectively reverts commit 85936d4f3815 ("phy: qcom-qmp: add regulator_set_load to dp phy"). Link: https://lore.kernel.org/r/YuPps+cvVAMugWmy@sirena.org.uk Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 40 +++++------------------ 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 4b1828976104..3663252622be 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -607,17 +607,6 @@ static const struct qmp_phy_init_tbl qmp_v4_dp_tx_tbl[] = { }; -/* list of regulators */ -struct qmp_regulator_data { - const char *name; - unsigned int enable_load; -}; - -static struct qmp_regulator_data qmp_phy_vreg_l[] = { - { .name = "vdda-phy", .enable_load = 21800 }, - { .name = "vdda-pll", .enable_load = 36000 }, -}; - struct qmp_phy; /* struct qmp_phy_cfg - per-PHY initialization config */ @@ -662,7 +651,7 @@ struct qmp_phy_cfg { const char * const *reset_list; int num_resets; /* regulators to be requested */ - const struct qmp_regulator_data *vreg_list; + const char * const *vreg_list; int num_vregs; /* array of registers with different offsets */ @@ -831,6 +820,11 @@ static const char * const sc7180_usb3phy_reset_l[] = { "phy", }; +/* list of regulators */ +static const char * const qmp_phy_vreg_l[] = { + "vdda-phy", "vdda-pll", +}; + static const struct qmp_phy_cfg sc7180_usb3phy_cfg = { .type = PHY_TYPE_USB3, .nlanes = 1, @@ -1992,32 +1986,16 @@ static int qcom_qmp_phy_combo_vreg_init(struct device *dev, const struct qmp_phy { struct qcom_qmp *qmp = dev_get_drvdata(dev); int num = cfg->num_vregs; - int ret, i; + int i; qmp->vregs = devm_kcalloc(dev, num, sizeof(*qmp->vregs), GFP_KERNEL); if (!qmp->vregs) return -ENOMEM; for (i = 0; i < num; i++) - qmp->vregs[i].supply = cfg->vreg_list[i].name; + qmp->vregs[i].supply = cfg->vreg_list[i]; - ret = devm_regulator_bulk_get(dev, num, qmp->vregs); - if (ret) { - dev_err(dev, "failed at devm_regulator_bulk_get\n"); - return ret; - } - - for (i = 0; i < num; i++) { - ret = regulator_set_load(qmp->vregs[i].consumer, - cfg->vreg_list[i].enable_load); - if (ret) { - dev_err(dev, "failed to set load at %s\n", - qmp->vregs[i].supply); - return ret; - } - } - - return 0; + return devm_regulator_bulk_get(dev, num, qmp->vregs); } static int qcom_qmp_phy_combo_reset_init(struct device *dev, const struct qmp_phy_cfg *cfg) From patchwork Wed Aug 3 12:33:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 595362 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 486B2C19F2B for ; Wed, 3 Aug 2022 12:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236273AbiHCMeg (ORCPT ); Wed, 3 Aug 2022 08:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233057AbiHCMef (ORCPT ); Wed, 3 Aug 2022 08:34:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA67628E0F; Wed, 3 Aug 2022 05:34:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 711D861378; Wed, 3 Aug 2022 12:34:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE2C6C433D6; Wed, 3 Aug 2022 12:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659530073; bh=msh6rGbtOmkvBZUPclv6+UinjCPJTZ0keeEvElEwjSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LUjazEmu4ouTtCOZNf92NowWYMERm7oiSTSewuuHFHXIbMhiyrpR5tY5jxuOLV3Zm J0FR1QWQleRyiYExEZ3cAiQ9jzdtxkNPrRD0as5iTXOIxsLR2nAaIc30766Oa0Czj0 6CgL5PMFSw0HpzSH9vHyCrkZkHlRBof4NLLNzmb2w0Dp9137I61kCoa7Yn7W9pLDOp qacGgLSUeB9DqD/dbtm9HWPG6IgS6TrxEQOVYSNt51ZSkZ7Y5XlyOzAsHi5NlHTDUC rSh/RY3O9qURMVkMYWLtw3YMRE7kiIPU5CHB8EoRD8Ux55a8FAnglcsfeAB7McINvb ERnUKqq1q7epg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oJDaO-00028D-PU; Wed, 03 Aug 2022 14:34:52 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Kuogee Hsieh , Douglas Anderson , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/2] phy: qcom-edp: drop regulator loads Date: Wed, 3 Aug 2022 14:33:32 +0200 Message-Id: <20220803123332.8138-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220803123332.8138-1-johan+linaro@kernel.org> References: <20220803123332.8138-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Drivers should not be specifying active-mode regulator loads unless supporting an idle mode where the load is reduced during runtime. This effectively reverts commit a4888b2005d1 ("phy: qcom-edp: add regulator_set_load to edp phy") Link: https://lore.kernel.org/r/YuPps+cvVAMugWmy@sirena.org.uk Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-edp.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c index 7e3570789845..cacd32f6e0cc 100644 --- a/drivers/phy/qualcomm/phy-qcom-edp.c +++ b/drivers/phy/qualcomm/phy-qcom-edp.c @@ -639,18 +639,6 @@ static int qcom_edp_phy_probe(struct platform_device *pdev) if (ret) return ret; - ret = regulator_set_load(edp->supplies[0].consumer, 21800); /* 1.2 V vdda-phy */ - if (ret) { - dev_err(dev, "failed to set load at %s\n", edp->supplies[0].supply); - return ret; - } - - ret = regulator_set_load(edp->supplies[1].consumer, 36000); /* 0.9 V vdda-pll */ - if (ret) { - dev_err(dev, "failed to set load at %s\n", edp->supplies[1].supply); - return ret; - } - ret = qcom_edp_clks_register(edp, pdev->dev.of_node); if (ret) return ret;