media: ov5693: Improve error logging when fwnode is not found
PATCH 1/4 media: ov5693: Improve error logging when fwnode is not found
The ov5693 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.951709] i2c i2c-INT33BE: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.
--- drivers/media/i2c/ov5693.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/media/i2c/ov5693.c +6 -1
@@ -1222,9 +1222,14 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693)unsigned int i;int ret; +/* +* Sometimes the fwnode graph is initialized by the bridge driver +* Bridge drivers doing this may also add GPIO mappings, wait for this. +*/ endpoint =fwnode_graph_get_next_endpoint (fwnode,NULL );if (!endpoint) -return -EPROBE_DEFER ;/* Could be provided by cio2-bridge */ +return dev_err_probe (ov5693->dev, -EPROBE_DEFER , +"waiting for fwnode graph endpoint\n" ); ret =v4l2_fwnode_endpoint_alloc_parse (endpoint, &bus_cfg);fwnode_handle_put (endpoint);
Signature · 1 line
2.46.2
PATCH 2/4 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.
--- drivers/media/i2c/ov7251.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/media/i2c/ov7251.c +6 -1
@@ -1484,9 +1484,14 @@ static int ov7251_check_hwcfg(struct ov7251 *ov7251)unsigned int i, j;int ret; +/* +* Sometimes the fwnode graph is initialized by the bridge driver +* Bridge drivers doing this may also add GPIO mappings, wait for this. +*/ endpoint =fwnode_graph_get_next_endpoint (fwnode,NULL );if (!endpoint) -return -EPROBE_DEFER ;/* could be provided by cio2-bridge */ +return dev_err_probe (ov7251->dev, -EPROBE_DEFER , +"waiting for fwnode graph endpoint\n" ); ret =v4l2_fwnode_endpoint_alloc_parse (endpoint, &bus_cfg);fwnode_handle_put (endpoint);
Signature · 1 line
2.46.2
PATCH 3/4 media: ov8865: Improve error logging when fwnode is not found
In reply to Hans de GoedeThe ov8865 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.952061] i2c i2c-INT347A: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
--- drivers/media/i2c/ov8865.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ov8865.c +2 -1
@@ -2991,7 +2991,8 @@ static int ov8865_probe(struct i2c_client *client) handle =fwnode_graph_get_next_endpoint (dev_fwnode (dev),NULL );if (!handle) -return -EPROBE_DEFER ; +return dev_err_probe (dev, -EPROBE_DEFER , +"waiting for fwnode graph endpoint\n" ); sensor->endpoint.bus_type =V4L2_MBUS_CSI2_DPHY ;
Signature · 1 line
2.46.2
PATCH 4/4 media: ipu-bridge: Improve error logging when waiting for IVSC to become ready
In reply to Hans de GoedeThe ipu-bridge code waits for the IVSC to become ready (on platforms with an IVSC chip).
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.951709] pci 0000:00:14.3: 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 IVSC to become ready
to help with debugging why drivers are not binding if the iVSC does not become ready for some reason.
--- drivers/media/pci/intel/ipu-bridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/pci/intel/ipu-bridge.c +2 -1
@@ -830,7 +830,8 @@ int ipu_bridge_init(struct device *dev,return 0 ;if (!ipu_bridge_ivsc_is_ready ()) -return -EPROBE_DEFER ; +return dev_err_probe (dev, -EPROBE_DEFER , +"waiting for IVSC to become ready\n" ); bridge =kzalloc (sizeof (*bridge),GFP_KERNEL );if (!bridge)
Signature · 1 line
2.46.2