[v7 2/7] drm/panel: himax-hx83102: Break out as separate driver
Doug Anderson
dianders at chromium.org
Wed May 15 21:13:13 UTC 2024
Hi,
On Tue, May 14, 2024 at 6:47 PM Cong Yang
<yangcong5 at huaqin.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 "return ret" should be "goto poweroff". Please send a v8.
-Doug
More information about the dri-devel
mailing list