Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e05d425f authored by Sandeep Panda's avatar Sandeep Panda
Browse files

drm/msm/dsi-staging: defer dsi probe if backlight device not found



For display panels which need backlight update through wled, defer
dsi probe until backlight device list is populated by wled driver.

Change-Id: Ida02bbb1b87c5171ee4f3de49ec496e7dc63308f
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent 65205701
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -593,17 +593,16 @@ static int dsi_panel_pinctrl_init(struct dsi_panel *panel)
static int dsi_panel_wled_register(struct dsi_panel *panel,
		struct dsi_backlight_config *bl)
{
	int rc = 0;
	struct backlight_device *bd;

	bd = backlight_device_get_by_type(BACKLIGHT_RAW);
	if (!bd) {
		pr_err("[%s] fail raw backlight register\n", panel->name);
		rc = -EINVAL;
		pr_debug("[%s] backlight device list empty\n", panel->name);
		return -EPROBE_DEFER;
	}

	bl->raw_bd = bd;
	return rc;
	return 0;
}

static int dsi_panel_update_backlight(struct dsi_panel *panel,