From 517fd2b6a058bc4f23735ab9a9e6b0d5c56876d1 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Fri, 8 Jan 2021 18:17:28 +0100 Subject: media: v4l2-async: Add waiting subdevices debugfs There is currently little to no information available about the reasons why a v4l2-async device hasn't probed completely. Inspired by the "devices_deferred" debugfs file, add a file to list information about the subdevices that are on waiting lists, for each notifier. This is useful to debug v4l2-async subdevices and notifiers, for instance when doing device bring-up. For instance, a typical output would be: $ cat /sys/kernel/debug/video4linux/pending_async_subdevices ipu1_csi1: [fwnode] dev=20e0000.iomuxc-gpr:ipu1_csi1_mux, node=/soc/bus@2000000/iomuxc-gpr@20e0000/ipu1_csi1_mux ipu1_csi0: [fwnode] dev=20e0000.iomuxc-gpr:ipu1_csi0_mux, node=/soc/bus@2000000/iomuxc-gpr@20e0000/ipu1_csi0_mux imx6-mipi-csi2: [fwnode] dev=1-003c, node=/soc/bus@2100000/i2c@21a4000/camera@3c imx-media: Signed-off-by: Ezequiel Garcia Reviewed-by: Laurent Pinchart Tested-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-async.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/media') diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h index 8ed42188e7c9..26296d4cb660 100644 --- a/include/media/v4l2-async.h +++ b/include/media/v4l2-async.h @@ -11,6 +11,7 @@ #include #include +struct dentry; struct device; struct device_node; struct v4l2_device; @@ -120,6 +121,13 @@ struct v4l2_async_notifier { struct list_head list; }; +/** + * v4l2_async_debug_init - Initialize debugging tools. + * + * @debugfs_dir: pointer to the parent debugfs &struct dentry + */ +void v4l2_async_debug_init(struct dentry *debugfs_dir); + /** * v4l2_async_notifier_init - Initialize a notifier. * -- cgit v1.2.3