static int send_write_data_cmd(struct seq_file *s, void *unused) { struct tegra_dc_dsi_data *dsi = s->private; struct tegra_dc *dc = dsi->dc; int err; u8 del = 100; struct tegra_dsi_cmd user_command[] = { DSI_CMD_SHORT(data_id, command_value, command_value1), DSI_DLY_MS(20), }; if (!dsi->enabled) { seq_puts(s, "DSI controller suspended\n"); return 0; } seq_printf(s, "data_id taken :0x%x\n", data_id); seq_printf(s, "command value taken :0x%x\n", command_value); seq_printf(s, "second command value taken :0x%x\n", command_value1); err = tegra_dsi_write_data(dc, dsi, user_command, del); return err; }
static int tegra_dsi_send_panel_cmd(struct tegra_dc *dc, struct tegra_dc_dsi_data *dsi, struct tegra_dsi_cmd *cmd, u32 n_cmd) { u32 i; int err; err = 0; for (i = 0; i < n_cmd; i++) { struct tegra_dsi_cmd *cur_cmd; cur_cmd = &cmd[i]; if (cur_cmd->cmd_type == TEGRA_DSI_DELAY_MS) mdelay(cur_cmd->sp_len_dly.delay_ms); else { err = tegra_dsi_write_data(dc, dsi, cur_cmd->pdata, cur_cmd->data_id, cur_cmd->sp_len_dly.data_len); if (err < 0) break; } } return err; }