[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=Xm99c3t_LGiHCBaJVKfurD7_SO1Wcxk73gZgftS7jEcw@mail.gmail.com>
Date: Mon, 13 May 2024 09:49:31 -0700
From: Doug Anderson <dianders@...omium.org>
To: Cong Yang <yangcong5@...qin.corp-partner.google.com>
Cc: sam@...nborg.org, neil.armstrong@...aro.org, daniel@...ll.ch,
linus.walleij@...aro.org, krzysztof.kozlowski+dt@...aro.org,
robh+dt@...nel.org, conor+dt@...nel.org, airlied@...il.com,
dmitry.baryshkov@...aro.org, dri-devel@...ts.freedesktop.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
xuxinxiong@...qin.corp-partner.google.com
Subject: Re: [PATCH v6 2/7] drm/panel: himax-hx83102: Break out as separate driver
Hi,
On Fri, May 10, 2024 at 7:13 PM Cong Yang
<yangcong5@...qin.corp-partner.google.com> wrote:
>
> +static int hx83102_prepare(struct drm_panel *panel)
> +{
> + struct hx83102 *ctx = panel_to_hx83102(panel);
> + struct mipi_dsi_device *dsi = ctx->dsi;
> + struct device *dev = &dsi->dev;
> + int ret;
> +
> + gpiod_set_value(ctx->enable_gpio, 0);
> + usleep_range(1000, 1500);
> +
> + ret = regulator_enable(ctx->pp1800);
> + if (ret < 0)
> + return ret;
> +
> + usleep_range(3000, 5000);
> +
> + ret = regulator_enable(ctx->avdd);
> + if (ret < 0)
> + goto poweroff1v8;
> + ret = regulator_enable(ctx->avee);
> + if (ret < 0)
> + goto poweroffavdd;
> +
> + usleep_range(10000, 11000);
> +
> + mipi_dsi_dcs_nop(ctx->dsi);
> + usleep_range(1000, 2000);
> +
> + gpiod_set_value(ctx->enable_gpio, 1);
> + usleep_range(1000, 2000);
> + gpiod_set_value(ctx->enable_gpio, 0);
> + usleep_range(1000, 2000);
> + gpiod_set_value(ctx->enable_gpio, 1);
> + usleep_range(6000, 10000);
> +
> + ret = ctx->desc->init(ctx);
> + if (ret < 0)
> + goto poweroff;
> +
> + ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
> + if (ret) {
> + dev_err(dev, "Failed to exit sleep mode: %d\n", ret);
> + return ret;
> + }
The above should have been "goto poweroff", not "return ret".
> + msleep(120);
> +
> + ret = mipi_dsi_dcs_set_display_on(dsi);
> + if (ret) {
> + dev_err(dev, "Failed to turn on the display: %d\n", ret);
> + return ret;
> + }
The above should have been "goto poweroff", not "return ret".
Other than that:
Reviewed-by: Douglas Anderson <dianders@...omium.org>
Powered by blists - more mailing lists