static u8 handle_irq(u8 *io)
{
	u32 irq_status;
	u8 ret = 0;

	irq_status = dsi_rreg(io, DSI_DIRECT_CMD_STS_FLAG_V3);
	if (irq_status & DSI_DIRECT_CMD_STS_FLAG_V3_TE_RECEIVED_FLAG_MASK)
		ret |= DSILINK_IRQ_BTA_TE;

	if (irq_status & DSI_DIRECT_CMD_STS_FLAG_V3_TRIGGER_RECEIVED_FLAG_MASK)
		/* DSI TE polling answer received */
		ret |= DSILINK_IRQ_TRIGGER;

	dsi_wreg(io, DSI_DIRECT_CMD_STS_CLR_V3, irq_status);

	irq_status = dsi_rreg(io, DSI_CMD_MODE_STS_FLAG_V3);
	if (irq_status & DSI_CMD_MODE_STS_FLAG_V3_ERR_NO_TE_FLAG_MASK)
		ret |= DSILINK_IRQ_NO_TE;

	dsi_wreg(io, DSI_CMD_MODE_STS_CLR_V3, irq_status);

	return ret;
}
Exemple #2
0
static u8 handle_irq(u8 *io)
{
	u32 irq_status;
	u8 ret = 0;

	irq_status = dsi_rreg(io, DSI_DIRECT_CMD_STS_FLAG);
	if (irq_status & DSI_DIRECT_CMD_STS_FLAG_TE_RECEIVED_FLAG_MASK)
		ret |= DSILINK_IRQ_BTA_TE;

	if (irq_status & DSI_DIRECT_CMD_STS_FLAG_TRIGGER_RECEIVED_FLAG_MASK)
		/* DSI TE polling answer received */
		ret |= DSILINK_IRQ_TRIGGER;

	if (irq_status &
		DSI_DIRECT_CMD_STS_FLAG_ACKNOWLEDGE_WITH_ERR_RECEIVED_FLAG_MASK)
		ret |= DSILINK_IRQ_ACK_WITH_ERR;

	dsi_wreg(io, DSI_DIRECT_CMD_STS_CLR, irq_status);

	irq_status = dsi_rreg(io, DSI_CMD_MODE_STS_FLAG);
	if (irq_status & DSI_CMD_MODE_STS_FLAG_ERR_NO_TE_FLAG_MASK)
		ret |= DSILINK_IRQ_NO_TE;

	if (irq_status & DSI_CMD_MODE_STS_FLAG_ERR_TE_MISS_FLAG_MASK)
		ret |= DSILINK_IRQ_TE_MISS;

	dsi_wreg(io, DSI_CMD_MODE_STS_CLR, irq_status);

	irq_status = dsi_rreg(io, DSI_VID_MODE_STS_FLAG);
	dsi_wreg(io, DSI_VID_MODE_STS_CLR, irq_status);
	if (irq_status & DSI_VID_MODE_STS_FLAG_ERR_MISSING_DATA_FLAG_MASK)
		ret |= DSILINK_IRQ_MISSING_DATA;
	if (irq_status & DSI_VID_MODE_STS_FLAG_ERR_MISSING_VSYNC_FLAG_MASK)
		ret |= DSILINK_IRQ_MISSING_VSYNC;

	return ret;
}