@@ -91,18 +91,17 @@ static int send_mipi_cmds(struct drm_panel *panel, const struct panel_cmd *cmds)
const struct panel_cmd *cmd = &cmds[i];
if (cmd->len == 2)
- err = mipi_dsi_dcs_write(pinfo->link,
- cmd->data[1], NULL, 0);
+ err = mipi_dsi_dcs_write(pinfo->link, cmd->data[1],
+ NULL, 0);
else
- err = mipi_dsi_dcs_write(pinfo->link,
- cmd->data[1], cmd->data + 2,
- cmd->len - 2);
+ err = mipi_dsi_dcs_write(pinfo->link, cmd->data[1],
+ cmd->data + 2,
+ cmd->len - 2);
if (err < 0)
return err;
- usleep_range((cmd->data[0]) * 1000,
- (1 + cmd->data[0]) * 1000);
+ usleep_range((cmd->data[0]) * 1000, (1 + cmd->data[0]) * 1000);
}
return 0;
@@ -130,8 +129,8 @@ static int boe_panel_unprepare(struct drm_panel *panel)
/* send off code */
err = send_mipi_cmds(panel, pinfo->desc->off_cmds);
if (err < 0) {
- DRM_DEV_ERROR(panel->dev,
- "failed to send DCS Off Code: %d\n", err);
+ DRM_DEV_ERROR(panel->dev, "failed to send DCS Off Code: %d\n",
+ err);
goto poweroff;
}
@@ -175,8 +174,8 @@ static int boe_panel_prepare(struct drm_panel *panel)
/* send init code */
err = send_mipi_cmds(panel, pinfo->desc->on_cmds);
if (err < 0) {
- DRM_DEV_ERROR(panel->dev,
- "failed to send DCS Init Code: %d\n", err);
+ DRM_DEV_ERROR(panel->dev, "failed to send DCS Init Code: %d\n",
+ err);
goto poweroff;
}
@@ -200,7 +199,7 @@ static int boe_panel_enable(struct drm_panel *panel)
ret = backlight_enable(pinfo->backlight);
if (ret) {
DRM_DEV_ERROR(panel->drm->dev,
- "Failed to enable backlight %d\n", ret);
+ "Failed to enable backlight %d\n", ret);
return ret;
}
@@ -218,7 +217,7 @@ static int boe_panel_get_modes(struct drm_panel *panel)
mode = drm_mode_duplicate(panel->drm, m);
if (!mode) {
DRM_DEV_ERROR(panel->drm->dev, "failed to add mode %ux%u@%u\n",
- m->hdisplay, m->vdisplay, m->vrefresh);
+ m->hdisplay, m->vdisplay, m->vrefresh);
return -ENOMEM;
}
@@ -926,31 +925,30 @@ static int panel_add(struct panel_info *pinfo)
struct device *dev = &pinfo->link->dev;
int ret;
- pinfo->pp18_gpio = devm_gpiod_get_optional(dev, "pp18", GPIOD_OUT_HIGH);
+ pinfo->pp18_gpio = devm_gpiod_get(dev, "pp18", GPIOD_OUT_HIGH);
if (IS_ERR(pinfo->pp18_gpio)) {
ret = PTR_ERR(pinfo->pp18_gpio);
if (ret != -EPROBE_DEFER)
DRM_DEV_ERROR(dev, "failed to get pp18 gpio: %d\n",
- ret);
+ ret);
return ret;
}
- pinfo->pp33_gpio = devm_gpiod_get_optional(dev, "pp33", GPIOD_OUT_HIGH);
+ pinfo->pp33_gpio = devm_gpiod_get(dev, "pp33", GPIOD_OUT_HIGH);
if (IS_ERR(pinfo->pp33_gpio)) {
ret = PTR_ERR(pinfo->pp33_gpio);
if (ret != -EPROBE_DEFER)
DRM_DEV_ERROR(dev, "failed to get pp33 gpio: %d\n",
- ret);
+ ret);
return ret;
}
- pinfo->enable_gpio = devm_gpiod_get_optional(dev, "enable",
- GPIOD_OUT_HIGH);
+ pinfo->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
if (IS_ERR(pinfo->enable_gpio)) {
ret = PTR_ERR(pinfo->enable_gpio);
if (ret != -EPROBE_DEFER)
DRM_DEV_ERROR(dev, "failed to get enable gpio: %d\n",
- ret);
+ ret);
return ret;
}
@@ -1009,16 +1007,17 @@ static int panel_remove(struct mipi_dsi_device *dsi)
err = boe_panel_unprepare(&pinfo->base);
if (err < 0)
DRM_DEV_ERROR(&dsi->dev, "failed to unprepare panel: %d\n",
- err);
+ err);
err = boe_panel_disable(&pinfo->base);
if (err < 0)
- DRM_DEV_ERROR(&dsi->dev, "failed to disable panel: %d\n", err);
+ DRM_DEV_ERROR(&dsi->dev, "failed to disable panel: %d\n",
+ err);
err = mipi_dsi_detach(dsi);
if (err < 0)
DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n",
- err);
+ err);
drm_panel_detach(&pinfo->base);
panel_del(pinfo);