1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __MIPI_PANEL_H__
4 #define __MIPI_PANEL_H__
10 /* Definitions for cmd in panel_init_command */
14 PANEL_CMD_GENERIC
= 2,
18 struct panel_init_command
{
25 * The data to be serialized and put into CBFS.
26 * Note some fields, for example edid.mode.name, were actually pointers and
27 * cannot be really serialized.
29 struct panel_serializable_data
{
30 struct edid edid
; /* edid info of this panel */
31 u8 init
[]; /* A packed array of panel_init_command */
34 typedef enum cb_err (*mipi_cmd_func_t
)(enum mipi_dsi_transaction type
, const u8
*data
, u8 len
);
36 /* Parse a command array and call cmd_func() for each entry. Delays get handled internally. */
37 enum cb_err
mipi_panel_parse_init_commands(const void *buf
, mipi_cmd_func_t cmd_func
);
39 #define PANEL_DCS(...) \
41 sizeof((u8[]){__VA_ARGS__}), \
44 #define PANEL_GENERIC(...) \
46 sizeof((u8[]){__VA_ARGS__}), \
49 #define PANEL_DELAY(delay) \
56 #endif /* __MIPI_PANEL_H__ */