When the attached dsi device does not use all the data lanes
to transfer data, data lanes stop state check should only
check the lanes used precisely, since unused lanes state is
not guaranteed to be in some stable state.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit
6787ee8505ab16bf7bba38c721da0bfa87e9de0e)
(cherry picked from commit
6281e4f4b6e0d4f8a0f714fe2112f70f2865c540)
static int sec_mipi_dsim_config_pll(struct sec_mipi_dsim *dsim)
{
int ret;
- uint32_t pllctrl = 0, status, data_lanes_en;
+ uint32_t pllctrl = 0, status, data_lanes_en, stop;
dsim_write(dsim, 0x8000, DSIM_PLLTMR);
return -EBUSY;
}
- if (STATUS_GET_STOPSTATEDAT(status) != data_lanes_en) {
+ stop = STATUS_GET_STOPSTATEDAT(status);
+ if ((stop & data_lanes_en) != data_lanes_en) {
dev_err(dsim->dev,
"one or more data lanes is not in stop state\n");
return -EBUSY;