summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-07-17 19:22:52 -0700
committerYe Li <ye.li@nxp.com>2018-07-17 23:55:41 -0700
commit1d355d37cce9a844011fbf27f7d4801068919ac4 (patch)
tree6cf9748f0ede482ed265633593cb77cb296a59cc
parenta668cdb1ef5bcef4a574640f5c06ff07520254df (diff)
MLK-18945-3 video: Update mipi panel driver HX8363
Update the HX8363 mipi panel to use new mipi dsi bridge interfaces to register a panel device and send command packets. So this panel driver can decouple with mipi_dsi_northwest driver. A new header file mipi_dsi_panel.h is added for all panel init functions declare. Signed-off-by: Ye Li <ye.li@nxp.com>
-rw-r--r--drivers/video/hx8363_wvga.c27
-rw-r--r--include/mipi_dsi_panel.h13
2 files changed, 25 insertions, 15 deletions
diff --git a/drivers/video/hx8363_wvga.c b/drivers/video/hx8363_wvga.c
index 22c4e3ccac..05f60612dd 100644
--- a/drivers/video/hx8363_wvga.c
+++ b/drivers/video/hx8363_wvga.c
@@ -1,12 +1,12 @@
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc. All Rights Reserved.
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
-#include <mipi_dsi_northwest.h>
+#include <imx_mipi_dsi_bridge.h>
#include <mipi_display.h>
#define HX8363_TWO_DATA_LANE (0x2)
@@ -49,15 +49,15 @@ static void parse_variadic(int n, u8 *buf, ...)
parse_variadic(n, buf, ##__VA_ARGS__); \
\
if (n >= 2) \
- err = mipi_dsi->mipi_dsi_pkt_write(mipi_dsi, \
- MIPI_DSI_DCS_LONG_WRITE, (u32 *)buf, n + 1); \
+ err = imx_mipi_dsi_bridge_pkt_write( \
+ MIPI_DSI_DCS_LONG_WRITE, (u8 *)buf, n + 1); \
else if (n == 1) \
- err = mipi_dsi->mipi_dsi_pkt_write(mipi_dsi, \
- MIPI_DSI_DCS_SHORT_WRITE_PARAM, (u32 *)buf, 0); \
+ err = imx_mipi_dsi_bridge_pkt_write( \
+ MIPI_DSI_DCS_SHORT_WRITE_PARAM, (u8 *)buf, 0); \
else if (n == 0) { \
buf[1] = 0; \
- err = mipi_dsi->mipi_dsi_pkt_write(mipi_dsi, \
- MIPI_DSI_DCS_SHORT_WRITE, (u32 *)buf, 0); \
+ err = imx_mipi_dsi_bridge_pkt_write( \
+ MIPI_DSI_DCS_SHORT_WRITE, (u8 *)buf, 0); \
} \
CHECK_RETCODE(err); \
}
@@ -102,12 +102,10 @@ static void parse_variadic(int n, u8 *buf, ...)
TC358763_DCS_write_1A_nP(127, addr, __VA_ARGS__)
-int mipid_hx8363_lcd_setup(struct mipi_dsi_northwest_panel_device *panel_dev)
+int mipid_hx8363_lcd_setup(struct mipi_dsi_client_dev *panel_dev)
{
u8 buf[DSI_CMD_BUF_MAXSIZE];
- struct mipi_dsi_northwest_info *mipi_dsi = panel_dev->host;
-
debug("MIPI DSI LCD HX8363 setup.\n");
TC358763_DCS_write_1A_3P(0xB9, 0xFF, 0x83, 0x63);/* SET password */
@@ -136,13 +134,12 @@ int mipid_hx8363_lcd_setup(struct mipi_dsi_northwest_panel_device *panel_dev)
return 0;
}
-static struct mipi_dsi_northwest_panel_driver hx8363_drv = {
+static struct mipi_dsi_client_driver hx8363_drv = {
.name = "HX8363_WVGA",
- .mipi_panel_setup = mipid_hx8363_lcd_setup,
+ .dsi_client_setup = mipid_hx8363_lcd_setup,
};
void hx8363_init(void)
{
- mipi_dsi_northwest_register_panel_driver(&hx8363_drv);
+ imx_mipi_dsi_bridge_add_client_driver(&hx8363_drv);
}
-
diff --git a/include/mipi_dsi_panel.h b/include/mipi_dsi_panel.h
new file mode 100644
index 0000000000..d46ea4bec7
--- /dev/null
+++ b/include/mipi_dsi_panel.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2018 NXP
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+
+#ifndef __MIPI_DSI_PANEL_H
+#define __MIPI_DSI_PANEL_H
+
+void hx8363_init(void);
+
+#endif