mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
phy: rockchip: mipi-rx: skip unready sensor and lens-focus device for GKI
This applies to situations where multiple cameras need to be supported in one DTS, and camera devices need to be registered with GKI Note: phy-rockchip-csi2-dphy.ko must be insmod last Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: Ib7dae1144a5f1923db41a489147f2aa5b2f2b358
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user