All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Olivier Louvignes" <olivier@mgcrea.io>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 5/5] drm/panel: Add the HiBy LG35583
Date: Fri, 06 Nov 2026 11:33:35 +0000	[thread overview]
Message-ID: <sashiko-outbox-201317@kernel.org> (raw)
In-Reply-To: <20261106112000.1612-6-olivier@mgcrea.io>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/panel: hiby-lg35583: reverse regulator disable order in
  lg35583_unprepare()
--

commit d7b0c5c3d496f641bc7958504a4bf1c7175af30f
Author: Olivier Louvignes <olivier@mgcrea.io>

drm/panel: Add the HiBy LG35583

This commit adds a DRM panel driver for the HiBy LG35583 480x800 parallel
RGB panel configured over a 3-wire SPI bus.

> diff --git a/drivers/gpu/drm/panel/panel-hiby-lg35583.c b/drivers/gpu/drm/panel/panel-hiby-lg35583.c
> new file mode 100644
> index 0000000000000..47aba09e91a4c
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-hiby-lg35583.c
[ ... ]
> +static int lg35583_prepare(struct drm_panel *panel)
> +{
> +	struct lg35583 *ctx = to_lg35583(panel);
> +	unsigned int i;
> +	int ret;
> +
> +	ret = regulator_enable(ctx->vccio);
> +	if (ret)
> +		return ret;
> +	usleep_range(5000, 6000);
> +
> +	ret = regulator_enable(ctx->vcc);
> +	if (ret)
> +		goto err_vccio;
[ ... ]
> +err_vcc:
> +	gpiod_set_value_cansleep(ctx->reset, 1);
> +	regulator_disable(ctx->vcc);
> +err_vccio:
> +	regulator_disable(ctx->vccio);
> +	return ret;
> +}
[ ... ]
> +static int lg35583_unprepare(struct drm_panel *panel)
> +{
> +	struct lg35583 *ctx = to_lg35583(panel);
> +
> +	lg35583_cmd(ctx, LG35583_SLPIN);
> +	usleep_range(5000, 6000);
> +
> +	gpiod_set_value_cansleep(ctx->reset, 1);
> +	regulator_disable(ctx->vccio);
> +	regulator_disable(ctx->vcc);
> +	return 0;
> +}

[Severity: Low]
Should lg35583_unprepare() disable ctx->vcc before ctx->vccio?
lg35583_prepare() enables ctx->vccio before ctx->vcc and disables ctx->vcc
first in its error path, whereas lg35583_unprepare() turns off the I/O
supply while the main panel supply is still enabled.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106112000.1612-1-olivier@mgcrea.io?part=5

      reply	other threads:[~2026-11-06 11:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 11:19 [PATCH v3 0/5] drm/ingenic: Add the X1600 display controller and the HiBy R1 panel Olivier Louvignes
2026-11-06 11:19 ` [PATCH v3 1/5] dt-bindings: vendor-prefixes: Add HiBy Olivier Louvignes
2026-11-06 11:19 ` [PATCH v3 2/5] dt-bindings: display: Add the Ingenic X1600 display controller Olivier Louvignes
2026-11-06 11:19 ` [PATCH v3 3/5] drm/ingenic: Add a driver for the " Olivier Louvignes
2026-11-06 13:34   ` Paul Cercueil
2026-11-06 14:38     ` Olivier Louvignes
2026-11-06 15:06       ` Paul Cercueil
2026-11-06 19:13         ` Olivier Louvignes
2026-11-06 11:19 ` [PATCH v3 4/5] dt-bindings: display: panel: Add the HiBy LG35583 Olivier Louvignes
2026-11-06 11:20 ` [PATCH v3 5/5] drm/panel: " Olivier Louvignes
2026-11-06 11:33   ` sashiko-bot [this message]

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=sashiko-outbox-201317@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=olivier@mgcrea.io \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.