1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #ifndef __MDFLD_DSI_PKG_SENDER_H__
27 #define __MDFLD_DSI_PKG_SENDER_H__
28
29 #include <linux/kthread.h>
30
31 #define MDFLD_MAX_DCS_PARAM 8
32
33 struct mdfld_dsi_pkg_sender {
34 struct drm_device *dev;
35 struct mdfld_dsi_connector *dsi_connector;
36 u32 status;
37 u32 panel_mode;
38
39 int pipe;
40
41 spinlock_t lock;
42
43 u32 pkg_num;
44
45
46 u32 dpll_reg;
47 u32 dspcntr_reg;
48 u32 pipeconf_reg;
49 u32 pipestat_reg;
50 u32 dsplinoff_reg;
51 u32 dspsurf_reg;
52
53 u32 mipi_intr_stat_reg;
54 u32 mipi_lp_gen_data_reg;
55 u32 mipi_hs_gen_data_reg;
56 u32 mipi_lp_gen_ctrl_reg;
57 u32 mipi_hs_gen_ctrl_reg;
58 u32 mipi_gen_fifo_stat_reg;
59 u32 mipi_data_addr_reg;
60 u32 mipi_data_len_reg;
61 u32 mipi_cmd_addr_reg;
62 u32 mipi_cmd_len_reg;
63 };
64
65 extern int mdfld_dsi_pkg_sender_init(struct mdfld_dsi_connector *dsi_connector,
66 int pipe);
67 extern void mdfld_dsi_pkg_sender_destroy(struct mdfld_dsi_pkg_sender *sender);
68 int mdfld_dsi_send_mcs_short(struct mdfld_dsi_pkg_sender *sender, u8 cmd,
69 u8 param, u8 param_num, bool hs);
70 int mdfld_dsi_send_mcs_long(struct mdfld_dsi_pkg_sender *sender, u8 *data,
71 u32 len, bool hs);
72 int mdfld_dsi_send_gen_short(struct mdfld_dsi_pkg_sender *sender, u8 param0,
73 u8 param1, u8 param_num, bool hs);
74 int mdfld_dsi_send_gen_long(struct mdfld_dsi_pkg_sender *sender, u8 *data,
75 u32 len, bool hs);
76
77 int mdfld_dsi_read_mcs(struct mdfld_dsi_pkg_sender *sender, u8 cmd,
78 u32 *data, u16 len, bool hs);
79
80 #endif