There is a problem that dsi write timeout even when dsi interrupt is
activated by adding 'ignore_lcd=1' flag to config.txt. Add error
handling to write once more when timeout occurs.
Change-Id: If1deb9753a02a3082e7a1ba59ee20531828447d9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val)
{
+ int ret;
u8 msg[] = {
reg,
reg >> 8,
val >> 24,
};
- mipi_dsi_generic_write(ts->dsi, msg, sizeof(msg));
+ ret = mipi_dsi_generic_write(ts->dsi, msg, sizeof(msg));
+ /*
+ * WORKAROUND: There is a problem that timeout occurs even though
+ * dsi interrupts occur. Add error handling to write once more
+ * when timeout occurs.
+ */
+ if (ret == -ETIMEDOUT)
+ mipi_dsi_generic_write(ts->dsi, msg, sizeof(msg));
return 0;
}