static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
{
- struct mipi_dsi_device *dsi = wuxga_nt->dsi;
- int ret;
-
- ret = mipi_dsi_turn_on_peripheral(dsi);
- if (ret < 0)
- return ret;
-
- return 0;
+ return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
}
static int wuxga_nt_panel_disable(struct drm_panel *panel)
{
struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
- int ret;
+ int mipi_ret, bl_ret = 0;
if (!wuxga_nt->enabled)
return 0;
- ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
+ mipi_ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
if (wuxga_nt->backlight) {
wuxga_nt->backlight->props.power = FB_BLANK_POWERDOWN;
wuxga_nt->backlight->props.state |= BL_CORE_FBBLANK;
- backlight_update_status(wuxga_nt->backlight);
+ bl_ret = backlight_update_status(wuxga_nt->backlight);
}
wuxga_nt->enabled = false;
- return ret;
+ return mipi_ret ? mipi_ret : bl_ret;
}
static int wuxga_nt_panel_unprepare(struct drm_panel *panel)