lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a9933d0-8020-4296-a0bb-676246ded6f3@quicinc.com>
Date: Fri, 9 May 2025 15:48:23 -0700
From: Jessica Zhang <quic_jesszhan@...cinc.com>
To: Neil Armstrong <neil.armstrong@...aro.org>,
        David Airlie
	<airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
        Maarten Lankhorst
	<maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>, Rob Herring <robh@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Abhinav Kumar <quic_abhinavk@...cinc.com>
CC: <dri-devel@...ts.freedesktop.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Casey Connolly <casey.connolly@...aro.org>
Subject: Re: [PATCH v2 4/6] drm/panel: visionox-rm69299: switch to
 devm_regulator_bulk_get_const()



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@...aro.org>

Reviewed-by: Jessica Zhang <quic_jesszhan@...cinc.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;
>   
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ