Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp528668ioo; Sat, 21 May 2022 06:14:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjnoFoWGUSPykO1BHsiYDRwsO2Bj38O1hbvbPkf2jznf/EvF72lP9hWB8DMoe8xeXlzg48 X-Received: by 2002:a17:907:da1:b0:6fe:a1a5:36b9 with SMTP id go33-20020a1709070da100b006fea1a536b9mr9207223ejc.728.1653138883130; Sat, 21 May 2022 06:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653138883; cv=none; d=google.com; s=arc-20160816; b=ZFLtg86hD9CLHbl4zYyODvAoTrYypcPYm60gm0rsk7y/erDKhOrj4oEdk8Xakhin/M ujmrjPxLiM544AV9c5RjwcsIuf3sO0D2L2mz1wSLJwPqNG3Q0AFahR2PptG7QaRdylbC cysLUrqbazKgO0vp2a7vd6uVv6fy2LHM+YiKGval6pGUM8EcrdyJABARcGM44ZsPxMZR aJkhkk4X608ZqDsJVi041SE1ERyezQraXxq7a/PEhCyImzz5pQQw1Wi9ZJc5M+ZLO2Np FMM4U4RCKTCTYLN4LUEwcA1SmJLc4poofss9//7dq1bikYLtRPNWTXlV3besQbsU3LUt YoyQ== 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 :references:message-id:subject:cc:to:from:date:dkim-signature; bh=udeMWIeImL8Et9KO+nQSrMb5ZhN50mdpj9tL8FAbJ98=; b=JMzh84IRBx7yFgeNrH6Ouji1RURqGv+5frhlyLTLNKA/Y6hGg6zQHSIgRFbLkiMV5J w1ZV5YGQNXcheaQiHOJdxShXxo4J0dAe9I4An8XixTvXdRIV139as4eI7q5NSLjeMhdS ghuAQl3P94vojqjbsJ6JiE+9lht97GjyjbQIWNhfyIpbwZyJb9x7Km16uSRqJYiSXOFL eP/LItj5bGHHsC0cVV3cdkQZdDcXA4H4ME9uxJoy26Tzkv1AF5Ga4TvscJrrAXdyb14Q 7ZKhk9PQ3bT3jclxGJ5bfIu5j66oxPcptV8n9OvfzxDWQarMR3F4romaoACK525mJR+j Y0Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dSjL9hAH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp6-20020a1709071b0600b006e803d493dcsi13034628ejc.989.2022.05.21.06.14.15; Sat, 21 May 2022 06:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dSjL9hAH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1349619AbiETQv3 (ORCPT + 99 others); Fri, 20 May 2022 12:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349426AbiETQu4 (ORCPT ); Fri, 20 May 2022 12:50:56 -0400 Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 384B417E2D for ; Fri, 20 May 2022 09:50:53 -0700 (PDT) Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-e5e433d66dso10936453fac.5 for ; Fri, 20 May 2022 09:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=udeMWIeImL8Et9KO+nQSrMb5ZhN50mdpj9tL8FAbJ98=; b=dSjL9hAHlZbIAXLFy2vchTxfjAqvwKvgE1MNoILsPw9WyYz0+UXNWHA0Bk8DDpr+Yy ulkoazNolUDBiOy5AGpy+c7A4tJWN1T6GpN++geAI5LfyRvjbhacoj37KDkh7v4gfs1f OLnuxI8/tnHwDzPtXMc1iLSM2V3W+FnGQkyINXLRrhJfigGM8PkuZN8FgNNoLChZW/jn 52BC/7Vg2ZYSvXmnO/mumTnDZcDxkO8zR4HcODOoI3HohQ5+2oDvQerdqLWXSs7c21Ui H3VBQs+lvfKAPGFoZgF+pilzfTFyb+VjwCY2EkAIlBdLxs7eYYaOr/FesMklva8Qn/NT iuFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=udeMWIeImL8Et9KO+nQSrMb5ZhN50mdpj9tL8FAbJ98=; b=K24uQznGH7tzSQWukYyHz/VNKz0M+gasa2t0dWBo5U91UJ19n2XhLzfIAjkmS+N1xj yOJ6uoKKLR5U14nu8kWF5im9kMGc/r8thfzMCFzye7GFYO9E9wwf3Kt6qBcpDUlptSji H68JC0IDpClrcIsIvkujcbuobdgHRTh7bXrgL5Tztg9ZUmOjO+SO01kRScmmhrDO7w9B HRN83ehn8oT9CpnMPu5cdaJQf82aqiOSK+1sf7ydgHDJ2mhPJxRI37d8n0tsGLH3CXuU iH2qG8OlxnytwaCqpM7h/pzi+n6B+lp67CHroOvdqHk975j7lWQgeUmss7jlrTAKDsoE YlHA== X-Gm-Message-State: AOAM532bDPWndOJ8Otn9NWnxXXOAIJo8f/X7dD+SGITp6pd5P50ui9XT UPrsGySdtKleb3tBjFDCB6nSKg== X-Received: by 2002:a05:6870:5b89:b0:f1:d956:dee2 with SMTP id em9-20020a0568705b8900b000f1d956dee2mr6659444oab.72.1653065452505; Fri, 20 May 2022 09:50:52 -0700 (PDT) Received: from ripper (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id g6-20020a056870214600b000f1b1ff7b8bsm1071185oae.51.2022.05.20.09.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 09:50:51 -0700 (PDT) Date: Fri, 20 May 2022 09:53:10 -0700 From: Bjorn Andersson To: Kuogee Hsieh Cc: dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, swboyd@chromium.org, dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch, airlied@linux.ie, agross@kernel.org, dmitry.baryshkov@linaro.org, quic_abhinavk@quicinc.com, quic_aravindh@quicinc.com, quic_sbillaka@quicinc.com, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 1/3] phy: qcom-edp: add regulator_set_load to edp phy Message-ID: References: <1653064021-25400-1-git-send-email-quic_khsieh@quicinc.com> <1653064021-25400-2-git-send-email-quic_khsieh@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1653064021-25400-2-git-send-email-quic_khsieh@quicinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 20 May 09:26 PDT 2022, Kuogee Hsieh wrote: > This patch add regulator_set_load() before enable regulator at > eDP phy driver. > > Signed-off-by: Kuogee Hsieh > --- > drivers/phy/qualcomm/phy-qcom-edp.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c > index cacd32f..afd9e17 100644 > --- a/drivers/phy/qualcomm/phy-qcom-edp.c > +++ b/drivers/phy/qualcomm/phy-qcom-edp.c > @@ -87,12 +87,17 @@ struct qcom_edp { > > struct clk_bulk_data clks[2]; > struct regulator_bulk_data supplies[2]; > + int enable_load[2]; > }; > > static int qcom_edp_phy_init(struct phy *phy) > { > struct qcom_edp *edp = phy_get_drvdata(phy); > int ret; > + int i; > + > + for (i = 0; i < ARRAY_SIZE(edp->supplies); i++) > + regulator_set_load(edp->supplies[i].consumer, edp->enable_load[i]); The regulator framework only accounts for the load of enabled regulator consumers, so you should be able to just call regulator_set_load() right after devm_regulator_bulk_get() and not carry the enable_load array of static constants. Regards, Bjorn > > ret = regulator_bulk_enable(ARRAY_SIZE(edp->supplies), edp->supplies); > if (ret) > @@ -635,6 +640,8 @@ static int qcom_edp_phy_probe(struct platform_device *pdev) > > edp->supplies[0].supply = "vdda-phy"; > edp->supplies[1].supply = "vdda-pll"; > + edp->enable_load[0] = 21800; /* load for 1.2 V vdda-phy supply */ > + edp->enable_load[1] = 36000; /* load for 0.9 V vdda-pll supply */ > ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(edp->supplies), edp->supplies); > if (ret) > return ret; > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >