mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
phy: rockchip: mipi csi2 dphy 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: If915530d4b982df9500851df89b776e18ed7dd38
This commit is contained in:
@@ -805,6 +805,7 @@ static int rockchip_csi2_dphy_fwnode_parse(struct csi2_dphy *dphy)
|
||||
struct v4l2_fwnode_endpoint vep = {
|
||||
.bus_type = V4L2_MBUS_CSI2_DPHY
|
||||
};
|
||||
struct device *remote_dev = NULL;
|
||||
int ret;
|
||||
|
||||
fwnode_graph_for_each_endpoint(dev_fwnode(dev), ep) {
|
||||
@@ -824,6 +825,18 @@ static int rockchip_csi2_dphy_fwnode_parse(struct csi2_dphy *dphy)
|
||||
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(&dphy->notifier, ep,
|
||||
|
||||
Reference in New Issue
Block a user