diff options
author | Bingbu Cao <bingbu.cao@intel.com> | 2023-06-13 06:55:43 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-07-14 13:05:50 +0200 |
commit | b7602d625b8a33c6614faa0de8aa7d57dc95cd3d (patch) | |
tree | ceb6b67841375b51b41ea99d351c7027e908cfb2 | |
parent | a828002f38c5ee49d3f0c0e64c0f0caa1aec8dc2 (diff) | |
download | linux-b7602d625b8a33c6614faa0de8aa7d57dc95cd3d.tar.gz linux-b7602d625b8a33c6614faa0de8aa7d57dc95cd3d.tar.bz2 linux-b7602d625b8a33c6614faa0de8aa7d57dc95cd3d.zip |
media: ov13b10: Defer probe if no endpoint found
The ov13b10 need be connected to a CIO2 or IPU device by bridge, sometimes
the bridge driver was not probed before ov13b10 driver, then the absence
of the fwnode endpoint for this device is expected, so driver return
-EPROBE_DEFER in this case to let the probe occur after bridge driver.
Signed-off-by: Hao Yao <hao.yao@intel.com>
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Reviewed-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | drivers/media/i2c/ov13b10.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c index 6110fb1e6bc6..13d18192235b 100644 --- a/drivers/media/i2c/ov13b10.c +++ b/drivers/media/i2c/ov13b10.c @@ -1331,6 +1331,10 @@ static int ov13b10_check_hwcfg(struct device *dev) if (!fwnode) return -ENXIO; + ep = fwnode_graph_get_next_endpoint(fwnode, NULL); + if (!ep) + return -EPROBE_DEFER; + ret = fwnode_property_read_u32(dev_fwnode(dev), "clock-frequency", &ext_clk); if (ret) { @@ -1344,10 +1348,6 @@ static int ov13b10_check_hwcfg(struct device *dev) return -EINVAL; } - ep = fwnode_graph_get_next_endpoint(fwnode, NULL); - if (!ep) - return -ENXIO; - ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); fwnode_handle_put(ep); if (ret) |