[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210825122613.v3.7.Idbb4727ddf00ba2fe796b630906baff10d994d89@changeid>
Date: Wed, 25 Aug 2021 12:26:32 +0200
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
To: linux-kernel@...r.kernel.org
Cc: matthias.bgg@...il.com, hsinyi@...omium.org,
linux-mediatek@...ts.infradead.org, jitao.shi@...iatek.com,
eizan@...omium.org, drinkcat@...omium.org, chunkuang.hu@...nel.org,
kernel@...labora.com, Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Philipp Zabel <p.zabel@...gutronix.de>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v3 7/7] drm/mediatek: mtk_dsi: Reset the dsi0 hardware
Reset dsi0 HW to default when power on. This prevents to have different
settingis between the bootloader and the kernel.
As not all Mediatek boards have the reset consumer configured in their
board description, also is not needed on all of them, the reset is optional,
so the change is compatible with all boards.
Cc: Jitao Shi <jitao.shi@...iatek.com>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Acked-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
Reviewed-by: Matthias Brugger <matthias.bgg@...il.com>
---
Changes in v3:
- Fix typo in the commit description
drivers/gpu/drm/mediatek/mtk_dsi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index ae403c67cbd9..d8b81e2ab841 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -11,6 +11,7 @@
#include <linux/of_platform.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/reset.h>
#include <video/mipi_display.h>
#include <video/videomode.h>
@@ -980,8 +981,10 @@ static int mtk_dsi_bind(struct device *dev, struct device *master, void *data)
struct mtk_dsi *dsi = dev_get_drvdata(dev);
ret = mtk_dsi_encoder_init(drm, dsi);
+ if (ret)
+ return ret;
- return ret;
+ return device_reset_optional(dev);
}
static void mtk_dsi_unbind(struct device *dev, struct device *master,
--
2.30.2
Powered by blists - more mailing lists