mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Douglas Anderson <dianders@chromium.org>,
	Rob Clark <robdclark@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <dri-devel@lists.freedesktop.org>,
	Mark Brown <broonie@kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<freedreno@lists.freedesktop.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	Jonathan Marek <jonathan@marek.ca>,
	Rajeev Nandan <quic_rajeevny@quicinc.com>,
	Sean Paul <sean@poorly.run>, Stephen Boyd <swboyd@chromium.org>,
	Vinod Koul <vkoul@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/6] drm/msm/dsi: Use the new regulator bulk feature to specify the load
Date: Wed, 3 Aug 2022 17:18:32 -0700	[thread overview]
Message-ID: <ce929e8d-cecb-b06d-507d-2d411c98c46f@quicinc.com> (raw)
In-Reply-To: <20220802153434.v3.4.I7b3c72949883846badb073cfeae985c55239da1d@changeid>



On 8/2/2022 3:37 PM, Douglas Anderson wrote:
> As of commit 6eabfc018e8d ("regulator: core: Allow specifying an
> initial load w/ the bulk API") we can now specify the initial load in
> the bulk data rather than having to manually call regulator_set_load()
> on each regulator. Let's use it.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> 
> Changes in v3:
> - Update commit message to point at the git hash of the regulator change.
> 
> Changes in v2:
> - ("Use the new regulator bulk feature to specify the load") new for v2.
> 
>   drivers/gpu/drm/msm/dsi/dsi_host.c    | 13 +++----------
>   drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 13 +++----------
>   2 files changed, 6 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 9df278d39559..a0a1b6d61d05 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -260,8 +260,10 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host)
>   	int num = msm_host->cfg_hnd->cfg->reg_cfg.num;
>   	int i, ret;
>   
> -	for (i = 0; i < num; i++)
> +	for (i = 0; i < num; i++) {
>   		s[i].supply = regs[i].name;
> +		s[i].init_load_uA = regs[i].enable_load;
> +	}
>   
>   	ret = devm_regulator_bulk_get(&msm_host->pdev->dev, num, s);
>   	if (ret < 0) {
> @@ -270,15 +272,6 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host)
>   		return ret;
>   	}
>   
> -	for (i = 0; i < num; i++) {
> -		if (regs[i].enable_load >= 0) {
> -			ret = regulator_set_load(s[i].consumer,
> -						 regs[i].enable_load);
> -			if (ret < 0)
> -				return ret;
> -		}
> -	}
> -
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> index 7c105120d73e..efb6b1726cdb 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
> @@ -515,8 +515,10 @@ static int dsi_phy_regulator_init(struct msm_dsi_phy *phy)
>   	int num = phy->cfg->reg_cfg.num;
>   	int i, ret;
>   
> -	for (i = 0; i < num; i++)
> +	for (i = 0; i < num; i++) {
>   		s[i].supply = regs[i].name;
> +		s[i].init_load_uA = regs[i].enable_load;
> +	}
>   
>   	ret = devm_regulator_bulk_get(dev, num, s);
>   	if (ret < 0) {
> @@ -529,15 +531,6 @@ static int dsi_phy_regulator_init(struct msm_dsi_phy *phy)
>   		return ret;
>   	}
>   
> -	for (i = 0; i < num; i++) {
> -		if (regs[i].enable_load >= 0) {
> -			ret = regulator_set_load(s[i].consumer,
> -							regs[i].enable_load);
> -			if (ret < 0)
> -				return ret;
> -		}
> -	}
> -
>   	return 0;
>   }
>   

  parent reply	other threads:[~2022-08-04  0:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 22:37 [PATCH v3 0/6] drm/msm/dsi regulator improvements Douglas Anderson
2022-08-02 22:37 ` [PATCH v3 1/6] drm/msm/dsi: Fix number of regulators for msm8996_dsi_cfg Douglas Anderson
2022-08-03  7:01   ` Dmitry Baryshkov
2022-08-04  0:12   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 2/6] drm/msm/dsi: Fix number of regulators for SDM660 Douglas Anderson
2022-08-03  7:02   ` Dmitry Baryshkov
2022-08-03 14:25   ` Marijn Suijten
2022-08-04  0:14   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 3/6] drm/msm/dsi: Don't set a load before disabling a regulator Douglas Anderson
2022-08-03  7:07   ` Dmitry Baryshkov
2022-08-04  0:16   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 4/6] drm/msm/dsi: Use the new regulator bulk feature to specify the load Douglas Anderson
2022-08-03  7:12   ` Dmitry Baryshkov
2022-08-03 13:50     ` Doug Anderson
2022-08-04  0:18   ` Abhinav Kumar [this message]
2022-08-02 22:37 ` [PATCH v3 5/6] drm/msm/dsi: Take advantage of devm_regulator_bulk_get_const() Douglas Anderson
2022-08-03  7:18   ` Dmitry Baryshkov
2022-08-03 13:53     ` Doug Anderson
2022-08-04  2:00   ` Abhinav Kumar
2022-08-02 22:37 ` [PATCH v3 6/6] drm/msm/dsi: Improve dsi_phy_driver_probe() probe error handling Douglas Anderson
2022-08-03  7:32   ` Dmitry Baryshkov
2022-08-03 13:54     ` Doug Anderson
2022-08-04  2:13   ` Abhinav Kumar
2022-08-03  7:37 ` [PATCH v3 0/6] drm/msm/dsi regulator improvements Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce929e8d-cecb-b06d-507d-2d411c98c46f@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@linux.ie \
    --cc=broonie@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jonathan@marek.ca \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_rajeevny@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®