From 2f16b89737e24b729305dcd4a3573c175615aa4c Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Tue, 5 Aug 2014 11:15:15 +0200 Subject: drm/dsi: Implement DCS soft_reset command Provide a small convenience wrapper that transmits a DCS soft_reset command. Reviewed-by: Sean Paul Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_mipi_dsi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/gpu/drm/drm_mipi_dsi.c') diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index d953b7fe5013..b3c28feff650 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -584,6 +584,24 @@ int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi) } EXPORT_SYMBOL(mipi_dsi_dcs_nop); +/** + * mipi_dsi_dcs_soft_reset() - perform a software reset of the display module + * @dsi: DSI peripheral device + * + * Return: 0 on success or a negative error code on failure. + */ +int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi) +{ + ssize_t err; + + err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SOFT_RESET, NULL, 0); + if (err < 0) + return err; + + return 0; +} +EXPORT_SYMBOL(mipi_dsi_dcs_soft_reset); + /** * mipi_dsi_dcs_enter_sleep_mode() - disable all unnecessary blocks inside the * display module except interface communication -- cgit v1.2.2