Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: ov7251: Improve error logging when fwnode is not found

The ov7251 driver waits for the endpoint fwnode to show up in case this
fwnode is created by a bridge-driver.

It does this by returning -EPROBE_DEFER, but it does not use
dev_err_probe() so no reason for deferring gets registered.

After 30 seconds the kernel logs a warning that the probe is still
deferred, which looks like this:

[ 33.952052] i2c i2c-INT347E:00: deferred probe pending: (reason unknown)

Use dev_err_probe() when returning -EPROBE_DEFER to register the probe
deferral reason changing the error to:

deferred probe pending: waiting for fwnode graph endpoint

Also update the comment to not refer to the no longer existing cio2-bridge
code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Hans de Goede and committed by
Hans Verkuil
826f6fd6 76f0c824

+6 -1
+6 -1
drivers/media/i2c/ov7251.c
··· 1486 1486 unsigned int i, j; 1487 1487 int ret; 1488 1488 1489 + /* 1490 + * Sometimes the fwnode graph is initialized by the bridge driver 1491 + * Bridge drivers doing this may also add GPIO mappings, wait for this. 1492 + */ 1489 1493 endpoint = fwnode_graph_get_next_endpoint(fwnode, NULL); 1490 1494 if (!endpoint) 1491 - return -EPROBE_DEFER; /* could be provided by cio2-bridge */ 1495 + return dev_err_probe(ov7251->dev, -EPROBE_DEFER, 1496 + "waiting for fwnode graph endpoint\n"); 1492 1497 1493 1498 ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg); 1494 1499 fwnode_handle_put(endpoint);