v4l: fwnode: v4l2_async_notifier_parse_fwnode_endpoints is deprecated
Subsystems (2)
Sakari Ailus
maintainerPATCH 1/1 v4l: fwnode: v4l2_async_notifier_parse_fwnode_endpoints is deprecated
Document that v4l2_async_notifier_parse_fwnode_endpoints() is deprecated. Its functionality has been replaced by other, better functions. Also add a reference to an example if someone ends up wandering here.
--- include/media/v4l2-fwnode.h | 4 ++++ 1 file changed, 4 insertions(+)
include/media/v4l2-fwnode.h +4 -0
@@ -453,6 +453,10 @@ typedef int (*parse_endpoint_func)(struct device *dev,* @parse_endpoint: Driver's callback function called on each V4L2 fwnode * endpoint. Optional. * +* DEPRECATED! This function is deprecated. Don't use it in new drivers. +* Instead see an example in cio2_parse_firmware() function in +* drivers/media/pci/intel/ipu3/ipu3-cio2.c . +* * Parse the fwnode endpoints of the @dev device and populate the async sub- * devices list in the notifier. The @parse_endpoint callback function is * called for each endpoint with the corresponding async sub-device pointer to
Signature · 1 line
2.29.2
Hi Sakari,
Quoted 5 lines · Sakari Ailus
Document that
v4l2_async_notifier_parse_fwnode_endpoints()is deprecated. Its functionality has been replaced by other, better functions. Also add a reference to an example if someone ends up wandering here.
I'm working on a series to clean up the v4l2_async API a bit, and came across this patch.
As far as I can see, the only user of v4l2_async_notifier_parse_fwnode_endpoints is drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c.
Adding Maxime and Yong Deng, it would be great to get rid of this, so we can remove the API, which would also allow us to remove some other internal functions and therefore make the API a bit cleaner.
Thanks,
Ezequiel
Quoted 23 lines
Signed-off-by Sakari Ailus <[email protected]>--- include/media/v4l2-fwnode.h | 4 ++++ 1 file changed, 4 insertions(+)include/media/v4l2-fwnode.h +4
-1@@ -453,6 +453,10 @@ typedef int (*parse_endpoint_func)(struct device *dev,* @parse_endpoint: Driver's callback function called on each V4L2 fwnode * endpoint. Optional. * +* DEPRECATED! This function is deprecated. Don't use it in new drivers. +* Instead see an example in cio2_parse_firmware() function in +* drivers/media/pci/intel/ipu3/ipu3-cio2.c . +* * Parse the fwnode endpoints of the @dev device and populate the async sub- * devices list in the notifier. The @parse_endpoint callback function is * called for each endpoint with the corresponding async sub-device pointer to -- 2.29.2
Sakari Ailus
maintainerHi Ezequiel,
Quoted 9 lines · Ezequiel Garcia
Hi Sakari,
Quoted 5 lines · Sakari Ailus
Document that
v4l2_async_notifier_parse_fwnode_endpoints()is deprecated. Its functionality has been replaced by other, better functions. Also add a reference to an example if someone ends up wandering here.
Quoted 5 lines
I'm working on a series to clean up the
v4l2_asyncAPI a bit, and came across this patch.As far as I can see, the only user of
v4l2_async_notifier_parse_fwnode_endpointsisdrivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c.
It may be that's the only one left. The intent was also to avoid anyone proposing new ones.
Quoted 3 lines
Adding Maxime and Yong Deng, it would be great to get rid of this, so we can remove the API, which would also allow us to remove some other internal functions and therefore make the API a bit cleaner.
Yes, that'd be very nice. Then we could remove it altogether.
Signature · 3 lines
Regards, Sakari Ailus
Hi,
Quoted 18 lines · Sakari Ailus
Hi Ezequiel,
Quoted 9 lines · Ezequiel Garcia
Hi Sakari,
Quoted 5 lines · Sakari Ailus
Document that
v4l2_async_notifier_parse_fwnode_endpoints()is deprecated. Its functionality has been replaced by other, better functions. Also add a reference to an example if someone ends up wandering here.Quoted 5 lines
I'm working on a series to clean up the
v4l2_asyncAPI a bit, and came across this patch.As far as I can see, the only user of
v4l2_async_notifier_parse_fwnode_endpointsisdrivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c.
Quoted 8 lines
It may be that's the only one left. The intent was also to avoid anyone proposing new ones.
Quoted 3 lines
Adding Maxime and Yong Deng, it would be great to get rid of this, so we can remove the API, which would also allow us to remove some other internal functions and therefore make the API a bit cleaner.
Yes, that'd be very nice. Then we could remove it altogether.
I've been touching that area a bit with my MIPI CSI-2 support series. I'll try to get rid of it along the way if I need to respin the series, or come up with a follow-up patch to remove the call to this function.
If I understand correctly, the preferred way now is to use:
- fwnode_graph_get_endpoint_by_id
- v4l2_fwnode_endpoint_parse
- v4l2_async_notifier_add_fwnode_remote_subdev
Is that correct? I think that's what I've been doing in the MIPI CSI-2 bridge drivers so far.
Cheers,
Paul
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Sakari Ailus
maintainerHi Paul,
Quoted 34 lines · Paul Kocialkowski
Hi,
Quoted 18 lines · Sakari Ailus
Hi Ezequiel,
Quoted 9 lines · Ezequiel Garcia
Hi Sakari,
Quoted 5 lines · Sakari Ailus
Document that
v4l2_async_notifier_parse_fwnode_endpoints()is deprecated. Its functionality has been replaced by other, better functions. Also add a reference to an example if someone ends up wandering here.Quoted 5 lines
I'm working on a series to clean up the
v4l2_asyncAPI a bit, and came across this patch.As far as I can see, the only user of
v4l2_async_notifier_parse_fwnode_endpointsisdrivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c.Quoted 8 lines
It may be that's the only one left. The intent was also to avoid anyone proposing new ones.
Quoted 3 lines
Adding Maxime and Yong Deng, it would be great to get rid of this, so we can remove the API, which would also allow us to remove some other internal functions and therefore make the API a bit cleaner.
Yes, that'd be very nice. Then we could remove it altogether.
I've been touching that area a bit with my MIPI CSI-2 support series. I'll try to get rid of it along the way if I need to respin the series, or come up with a follow-up patch to remove the call to this function.
Quoted 7 lines
If I understand correctly, the preferred way now is to use:
-fwnode_graph_get_endpoint_by_id
-v4l2_fwnode_endpoint_parse
-v4l2_async_notifier_add_fwnode_remote_subdevIs that correct? I think that's what I've been doing in the MIPI CSI-2 bridge drivers so far.
Yes, that's the preferred way.
Signature · 1 line
Sakari Ailus
Hi Sakari,
Quoted 13 lines · Sakari Ailus
Hi Ezequiel,
Quoted 9 lines · Ezequiel Garcia
Hi Sakari,
Quoted 5 lines · Sakari Ailus
Document that
v4l2_async_notifier_parse_fwnode_endpoints()is deprecated. Its functionality has been replaced by other, better functions. Also add a reference to an example if someone ends up wandering here.
Quoted 9 lines
Quoted 5 lines
I'm working on a series to clean up the
v4l2_asyncAPI a bit, and came across this patch.As far as I can see, the only user of
v4l2_async_notifier_parse_fwnode_endpointsisdrivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c.It may be that's the only one left. The intent was also to avoid anyone proposing new ones.
If we want to avoid any users, how about we make it clear the function is maybe not a good idea by renaming it to:
__v4l2_async_notifier_parse_fwnode_endpoints ?
Thanks,
Ezequiel