From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: <dri-devel@lists.freedesktop.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Casey Connolly <casey.connolly@linaro.org>
Subject: Re: [PATCH v2 4/6] drm/panel: visionox-rm69299: switch to devm_regulator_bulk_get_const()
Date: Fri, 9 May 2025 15:48:23 -0700 [thread overview]
Message-ID: <6a9933d0-8020-4296-a0bb-676246ded6f3@quicinc.com> (raw)
In-Reply-To: <20250509-topic-misc-shift6-panel-v2-4-c2c2d52abd51@linaro.org>
On 5/9/2025 1:59 AM, Neil Armstrong wrote:
> Switch to devm_regulator_bulk_get_const() to move the supply
> data to const.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> ---
> drivers/gpu/drm/panel/panel-visionox-rm69299.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> index c3c14150a5546512151fb15c8e9a91269ca21c65..fe921d5fb1942c47c5b849e827c244d7fbde25a3 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> @@ -24,12 +24,17 @@ struct visionox_rm69299_panel_desc {
>
> struct visionox_rm69299 {
> struct drm_panel panel;
> - struct regulator_bulk_data supplies[2];
> + struct regulator_bulk_data *supplies;
> struct gpio_desc *reset_gpio;
> struct mipi_dsi_device *dsi;
> const struct visionox_rm69299_panel_desc *desc;
> };
>
> +static const struct regulator_bulk_data visionox_rm69299_supplies[] = {
> + { .supply = "vdda", .init_load_uA = 32000 },
> + { .supply = "vdd3p3", .init_load_uA = 13200 },
> +};
> +
> static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2] = {
> { 0xfe, 0x00 }, { 0xc2, 0x08 }, { 0x35, 0x00 }, { 0x51, 0xff },
> };
> @@ -43,7 +48,8 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx)
> {
> int ret;
>
> - ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> + ret = regulator_bulk_enable(ARRAY_SIZE(visionox_rm69299_supplies),
> + ctx->supplies);
> if (ret < 0)
> return ret;
>
> @@ -66,7 +72,8 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx)
> {
> gpiod_set_value(ctx->reset_gpio, 0);
>
> - return regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> + return regulator_bulk_disable(ARRAY_SIZE(visionox_rm69299_supplies),
> + ctx->supplies);
> }
>
> static int visionox_rm69299_unprepare(struct drm_panel *panel)
> @@ -172,12 +179,8 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
>
> ctx->dsi = dsi;
>
> - ctx->supplies[0].supply = "vdda";
> - ctx->supplies[0].init_load_uA = 32000;
> - ctx->supplies[1].supply = "vdd3p3";
> - ctx->supplies[1].init_load_uA = 13200;
> -
> - ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies);
> + ret = devm_regulator_bulk_get_const(dev, ARRAY_SIZE(visionox_rm69299_supplies),
> + visionox_rm69299_supplies, &ctx->supplies);
> if (ret < 0)
> return ret;
>
>
next prev parent reply other threads:[~2025-05-09 22:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 8:59 [PATCH v2 0/6] panel: visionox-rm69299: modernize & support the variant found in the SHIFT6mq Neil Armstrong
2025-05-09 8:59 ` [PATCH v2 1/6] dt-bindings: display: visionox-rm69299: document new compatible string Neil Armstrong
2025-05-09 8:59 ` [PATCH v2 2/6] drm/panel: visionox-rm69299: add plumbing to support panel variants Neil Armstrong
2025-05-09 22:45 ` Jessica Zhang
2025-05-09 8:59 ` [PATCH v2 3/6] drm/panel: visionox-rm69299: switch to _multi variants Neil Armstrong
2025-05-09 22:46 ` Jessica Zhang
2025-05-09 8:59 ` [PATCH v2 4/6] drm/panel: visionox-rm69299: switch to devm_regulator_bulk_get_const() Neil Armstrong
2025-05-09 22:48 ` Jessica Zhang [this message]
2025-05-09 8:59 ` [PATCH v2 5/6] drm/panel: visionox-rm69299: switch to devm_drm_panel_alloc() Neil Armstrong
2025-05-09 22:48 ` Jessica Zhang
2025-05-09 8:59 ` [PATCH v2 6/6] drm/panel: visionox-rm69299: support the variant found in the SHIFT6mq Neil Armstrong
2025-05-09 22:50 ` Jessica Zhang
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=6a9933d0-8020-4296-a0bb-676246ded6f3@quicinc.com \
--to=quic_jesszhan@quicinc.com \
--cc=airlied@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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®