diff options
| author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2026-03-05 01:16:10 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-03-24 13:58:02 +0300 |
| commit | 8015a49d8b33f2b1fb191017055ce3de933d547a (patch) | |
| tree | 54510170021e2c2b35e706cdb83d406edaae900c /include | |
| parent | 8cd35ceadcfc8c5da2eb7f7ce24525ce9d4ee62e (diff) | |
| download | linux-8015a49d8b33f2b1fb191017055ce3de933d547a.tar.xz | |
media: v4l2-fwnode: Return -EPROBE_DEFER on parsing NULL endpoints
In general drivers get their firmware graph endpoints from system
firmware, but on some systems this information is conveyed to drivers via
software nodes. The software nodes may be instantiated only after the
drivers are first probed, requiring drivers to explicitly issue
-EPROBE_DEFER when endpoints aren't found.
Instead of doing this in all (or at least most) drivers, make v4l2-fwnode
endpoint parsing functions v4l2_fwnode_endpoint_parse() and
v4l2_fwnode_endpoint_alloc_parse() return -EPROBE_DEFER when an endpoint
is NULL.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/media/v4l2-fwnode.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/media/v4l2-fwnode.h b/include/media/v4l2-fwnode.h index cd82e70ccbaa..d7abbd76a421 100644 --- a/include/media/v4l2-fwnode.h +++ b/include/media/v4l2-fwnode.h @@ -218,8 +218,9 @@ enum v4l2_fwnode_bus_type { * * Return: %0 on success or a negative error code on failure: * %-ENOMEM on memory allocation failure - * %-EINVAL on parsing failure, including @fwnode == NULL + * %-EINVAL on parsing failure * %-ENXIO on mismatching bus types + * %-EPROBE_DEFER on NULL @fwnode */ int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep); @@ -276,8 +277,9 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep); * * Return: %0 on success or a negative error code on failure: * %-ENOMEM on memory allocation failure - * %-EINVAL on parsing failure, including @fwnode == NULL + * %-EINVAL on parsing failure * %-ENXIO on mismatching bus types + * %-EPROBE_DEFER on NULL @fwnode */ int v4l2_fwnode_endpoint_alloc_parse(struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep); |
