diff --git a/drivers/phy/rockchip/phy-rockchip-mipi-rx.c b/drivers/phy/rockchip/phy-rockchip-mipi-rx.c index 13ea0aef7a41..2b9ef776bbf7 100644 --- a/drivers/phy/rockchip/phy-rockchip-mipi-rx.c +++ b/drivers/phy/rockchip/phy-rockchip-mipi-rx.c @@ -1696,6 +1696,7 @@ static int rockchip_mipidphy_fwnode_parse(struct mipidphy_priv *priv) struct v4l2_fwnode_endpoint vep = { .bus_type = V4L2_MBUS_CSI2_DPHY }; + struct device *remote_dev = NULL; int ret = 0; fwnode_graph_for_each_endpoint(dev_fwnode(dev), ep) { @@ -1715,6 +1716,18 @@ static int rockchip_mipidphy_fwnode_parse(struct mipidphy_priv *priv) continue; } + /* check sensor register state on i2c/spi bus for gki*/ + if (!IS_ENABLED(CONFIG_NO_GKI)) { + remote_dev = bus_find_device_by_fwnode(&i2c_bus_type, remote_ep); + if (!remote_dev || !remote_dev->driver) { + remote_dev = bus_find_device_by_fwnode(&spi_bus_type, remote_ep); + if (!remote_dev || !remote_dev->driver) { + fwnode_handle_put(remote_ep); + continue; + } + } + } + fwnode_handle_put(remote_ep); s_asd = v4l2_async_nf_add_fwnode_remote(&priv->notifier, ep,