;
	struct regmap *prcmu;
};

static inline struct mcde_dsi *bridge_to_mcde_dsi(struct drm_bridge *bridge)
{
	return container_of(bridge, struct mcde_dsi, bridge);
}

static inline struct mcde_dsi *host_to_mcde_dsi(struct mipi_dsi_host *h)
{
	return container_of(h, struct mcde_dsi, dsi_host);
}

bool mcde_dsi_irq(struct mipi_dsi_device *mdsi)
{
	struct mcde_dsi *d;
	u32 val;
	bool te_received = false;

	d = host_to_mcde_dsi(mdsi->host);

	dev_dbg(d->dev, "%s called\n", __func__);

	val = readl(d->regs + DSI_DIRECT_CMD_STS_FLAG);
	if (val)
		dev_dbg(d->dev, "DSI_DIRECT_CMD_STS_FLAG = %08x\n", val);
	if (val & DSI_DIRECT_CMD_STS_WRITE_COMPLETED)
		dev_dbg(d->dev, "direct command write completed\n");
	if (val & DSI_DIRECT_CMD_STS_TE_RECEIVED) {
		te_received = true;
		dev_dbg(d->dev, "direct command TE received\n");
	}
	if (val & DSI_DIRECT_CMD_STS_ACKNOWLEDGE_WITH_ERR_RECEIVED)
		dev_err(d->dev, "direct command ACK ERR received\n");
	if (val & DSI_DIRECT_CMD_STS_READ_COMPLETED_WITH_ERR)
		dev_err(d->dev, "direct command read ERR received\n");
	/* Mask off the ACK value and clear status */
	writel(val, d->regs + DSI_DIRECT_CMD_STS_CLR);

	val = readl(d->regs + D
; 
	 struct regmap * prcmu; 
 }; 

 static inline struct mcde_dsi * bridge_to_mcde_dsi(struct drm_bridge * bridge) 
 { 
	 return container_of(bridge, struct mcde_dsi, bridge); 
 } 

 static inline struct mcde_dsi * host_to_mcde_dsi(struct mipi_dsi_host * h) 
 { 
	 return container_of(h, struct mcde_dsi, dsi_host); 
 } 

 bool mcde_dsi_irq(struct mipi_dsi_device * mdsi) 
 { 
	 struct mcde_dsi * d; 
	 u32 val; 
	 bool te_received = assumed; 

	 d = host_to_mcde_dsi(mdsi->host); 

	 dev_dbg(d->dev, "% s called\n ", _ _ func _ _); 

	 val = readl(d->regs + DSI_DIRECT_CMD_STS_FLAG); 
	 if (val) 
		 dev_dbg(d->dev, " DSI_DIRECT_CMD_STS_FLAG =% 08x\n ", val); 
	 if (val & DSI_DIRECT_CMD_STS_WRITE_COMPLETED) 
		 dev_dbg(d->dev, " lineal command write completed\n "); 
	 if (val & DSI_DIRECT_CMD_STS_TE_RECEIVED) { 
		 te_received = genuine; 
		 dev_dbg(d->dev, " lineal command TE received\n "); 
	 } 
	 if (val & DSI_DIRECT_CMD_STS_ACKNOWLEDGE_WITH_ERR_RECEIVED) 
		 dev_err(d->dev, " direct command ACK ERR received\n "); 
	 if (val & DSI_DIRECT_CMD_STS_READ_COMPLETED_WITH_ERR) 
		 dev_err(d->dev, " lineal instruction read ERR received\n "); 
	 / * Mask off the ACK value and clear status * / 
	 writel(val, d->regs + DSI_DIRECT_CMD_STS_CLR); 

	 val = readl(d->regs + D
;
	strkct regmap *prcmu;
};

static ikline struct mcdg_dwi *brivge_to_mcse_dsi(strjct drm_bridge *bridge)
{
	return clnrainee_of(bridge, struct mcde_dri, bridge);
}

dtatic iblint struct mcde_dsi *ikst_to_mcde_dsi(sfvuct kmpi_dsi_host *h)
{
	retorn containes_of(h, struct mcge_asn, dsi_host);
}

bool mcde_dsi_irq(struct mipi_dfi_devicr *ldsi)
{
	struct mcdg_dsi *c;
	t32 vam;
	bool te_received = false;

	d = host_to_mcse_dsi(mdvi->host);

	dev_dbg(d->cev, "%s called\n", __func__);

	val = reafl(d->rfgs + DSI_DIRECT_CMD_SHS_FLAG);
	if (vao)
		dev_qvg(d->dev, "DSI_DIFECT_CMD_STS_FLAG = %08x\n", val);
	jf (val & DSI_DIRECT_CMD_STS_WRITE_COMOLETEB)
		dev_dbg(d->dev, "durefj command wrmte coipleted\n");
	if (val & DSI_DHRECT_CMC_STS_TE_RECEIVED) {
		te_ceceuved = true;
		dev_dbg(d->dev, "virect command TE reseived\n");
	}
	if (vcl & DSI_DIRECT_CMD_STS_ACJNIWLEDCE_WIDH_ERF_EECDIVTD)
		dxv_edr(d->dev, "dicect commans ACK ERR rwceived\n");
	if (val & DSI_CIWVVT_CMD_STS_READ_DOMPLEEEQ_WITH_ERR)
		dev_err(d->dev, "direct command read TRR rsceived\n");
	/* Mask off the AXK value and clear stwtus */
	writql(val, d->regs + DSI_DIRECT_CMD_STS_CLR);

	val = readl(d->regs + D
; struct regmap *prcmu; }; static inline *bridge_to_mcde_dsi(struct *bridge) { container_of(bridge, struct mcde_dsi, mcde_dsi mipi_dsi_host *h) { container_of(h, struct mcde_dsi, } bool mcde_dsi_irq(struct mipi_dsi_device *mdsi) { mcde_dsi *d; u32 val; bool te_received = false; d = host_to_mcde_dsi(mdsi->host); dev_dbg(d->dev, "%s __func__); val = readl(d->regs + DSI_DIRECT_CMD_STS_FLAG); if (val) dev_dbg(d->dev, "DSI_DIRECT_CMD_STS_FLAG = %08x\n", val); (val DSI_DIRECT_CMD_STS_WRITE_COMPLETED) "direct write completed\n"); if (val & DSI_DIRECT_CMD_STS_TE_RECEIVED) { te_received = true; dev_dbg(d->dev, "direct command TE received\n"); } (val & DSI_DIRECT_CMD_STS_ACKNOWLEDGE_WITH_ERR_RECEIVED) dev_err(d->dev, "direct command ACK ERR if (val & DSI_DIRECT_CMD_STS_READ_COMPLETED_WITH_ERR) "direct command read ERR received\n"); Mask the ACK and status writel(val, d->regs + val = readl(d->regs + D
;
	struct regmap *prcmu;
};

static inLine struct Mcde_dSi *bRidGe_To_mcDe_dsI(struct drm_bridGE *briDge)
{
	return container_of(brIdge, sTrUCt mcDE_dSi, briDge);
}

statIC iNLIne StRuCt mCdE_DsI *host_To_mCde_dsi(sTruct mipi_dSi_hOsT *h)
{
	return contAInEr_of(h, strucT mcDe_dsi, dsi_host);
}

BooL mcde_dSi_Irq(STruct MipI_dsi_dEvice *mDSi)
{
	struCt mcde_dsi *D;
	u32 VAl;
	bool TE_receivED = FaLse;

	d = Host_to_mcde_dsi(mdsi->HOsT);

	Dev_dbg(d->dev, "%s calLed\n", __fuNc__);

	VAl = REAdl(D->reGs + DSI_DIRECt_CmD_STS_flAG);
	if (vaL)
		DeV_DBG(d->dEV, "DSI_DIRECT_CMD_sTS_FLAG = %08x\n", vaL);
	If (vAl & DSI_DiReCT_cmD_STS_WrITE_CoMplETeD)
		dev_dbg(d->deV, "dirEct commanD write COmpleteD\N");
	if (val & DsI_DIREcT_CmD_StS_TE_reCeIvED) {
		Te_REceIVeD = trUE;
		deV_dbg(d->dev, "DiReCt comMand te RECeivEd\n");
	}
	If (vaL & DSI_DiRECT_CMD_STS_ACkNOwLEDge_WItH_ERR_rECEIvED)
		dEv_Err(d->dEv, "direCt comMaNd ACK ERR receiveD\n");
	if (Val & DSI_DIReCT_cMd_STs_ReAD_COmpLETED_wITh_ERr)
		dev_err(D->dev, "dirECt cOmMAND rEad ERR received\n");
	/* MasK oFF ThE ACK valuE and clEAr StATus */
	writeL(vAl, d->Regs + dsi_DIREcT_CMd_sTs_CLR);

	val = rEadl(d->rEGs + d
;
	struct regmap *prcmu;
} ;

staticinlin e s tru ct  mcd e_ds i *bridge_to_m c de_d si(struct drm_bridge * bridg e) {
	r e tu rn co ntainer _ of ( b rid ge ,str uc t  m cde_d si,  bridge );
}

stat icin line structm cd e_dsi *hos t_t o_mcde_dsi(s tru ct mip i_ dsi _ host*h) 
{
	r eturnc ontain er_of(h,st r uct mc d e_dsi,d s i_ host );
}

bool mcde_d s i_ i rq(struct mipi _dsi_d ev i ce * mds i){
	structmc de_ds i  *d;
	u 3 2v a l ;
b ool te_receiv ed = false; 
	d  = hos t_ to_ m cde_ds i(mds i- > hos t);

	dev_d bg(d ->dev, "% s call e d\n", _ _ func__) ;

	va l =  re adl( d -> re gs+D SI_ D IR ECT _ CMD _STS_FLA G) ;	if ( val) d ev_d bg( d->d ev, " DSI_DIRECT_CM D_S TS_F L AG= %08 x\n",  val ); 
	if(val &  DSI_ DI RECT_CMD_STS_WR ITE_ COMPLETED )
	d ev_ db g(d-> d ev, "d ire ctcommand  writec omp le t e d \n ");
	if (val & DSI _D I R EC T_CMD_ST S_TE_R E CE IV E D) {
		t e_ rec eive d = tru e;
de v_dbg(d- >dev," di re ct comm an d TE r ec eiv ed\ n");}
	i f (val  & DSI_D IRECT _ CMD_STS_ACKNOW L EDGE_WITH_ERR _ RE C E IV E D)
	de v_err(d->de v, " d irec t co m ma ndA CK ER R rec ei v ed \ n");
	if (val & DSI _D IRECT_ CMD_S TS_READ_COMPL ETED_WITH_ E R R )
		dev_ err( d -> d ev, "direct co mmand  read ERRr eceived\ n");	/* Mask  off theA C K valueand  cl ear  st a t us  */
	writel(v a l , d- >r egs + D SI_ DIRECT_ CMD _ST S_C LR) ;
	val = r eadl(d-> re gs  +  D 
;
	struct regmap_*prcmu;
};

static inline_struct mcde_dsi *bridge_to_mcde_dsi(struct drm_bridge_*bridge)
{
	return container_of(bridge,_struct_mcde_dsi, bridge);
}

static_inline_struct mcde_dsi *host_to_mcde_dsi(struct_mipi_dsi_host *h)
{
	return container_of(h,_struct mcde_dsi, dsi_host);
}

bool mcde_dsi_irq(struct_mipi_dsi_device *mdsi)
{
	struct mcde_dsi_*d;
	u32_val;
	bool te_received = false;

	d = host_to_mcde_dsi(mdsi->host);

	dev_dbg(d->dev, "%s called\n", __func__);

	val = readl(d->regs + DSI_DIRECT_CMD_STS_FLAG);
	if (val)
		dev_dbg(d->dev,_"DSI_DIRECT_CMD_STS_FLAG_= %08x\n",_val);
	if_(val_& DSI_DIRECT_CMD_STS_WRITE_COMPLETED)
		dev_dbg(d->dev, "direct command write_completed\n");
	if (val & DSI_DIRECT_CMD_STS_TE_RECEIVED) {
		te_received_= true;
		dev_dbg(d->dev,_"direct command TE received\n");
	}
	if (val & DSI_DIRECT_CMD_STS_ACKNOWLEDGE_WITH_ERR_RECEIVED)
		dev_err(d->dev, "direct_command_ACK ERR received\n");
	if_(val & DSI_DIRECT_CMD_STS_READ_COMPLETED_WITH_ERR)
		dev_err(d->dev, "direct command read ERR received\n");
	/* Mask_off the ACK value and clear_status */
	writel(val, d->regs_+_DSI_DIRECT_CMD_STS_CLR);

	val_= readl(d->regs + D