Re:Re: [PATCH] media:v4l2-async:debugfs for registered subdevices

From: luo.liu.linux

Date: Fri Mar 13 2026 - 07:22:18 EST



Hi Sakari,

Thank you very much for your reply.

When building a pipeline in the camera subsystem via Media Entities

(e.g., Sensor -> DPHY -> MIPI-CSI2 -> ISP), it is crucial to verify that the registration

and unregistration processes for each sub-device (subdev) driver within the pipeline

are functioning correctly.

Specifically, taking a sensor as an example of a subdev:

Registration Verification: Upon successfully loading the driver using insmod xxx_sensor.ko,

the corresponding sensor subdev should appear in the subdev_list.

Unregistration Verification: Upon successfully unloading the driver using rmmod xxx_sensor.ko,

the corresponding subdev entry should be removed from the subdev_list.


The following test log in my board:


root@cix-localhost:~/upload# cat /sys/kernel/debug/v4l2-async/registered_subdevices
root@cix-localhost:~/upload#
root@cix-localhost:~/upload# insmod lt7911uxc.ko
root@cix-localhost:~/upload#
root@cix-localhost:~/upload# cat /sys/kernel/debug/v4l2-async/registered_subdevices
LT7911UXC 0-0043 (dev: 0-0043)
root@cix-localhost:~/upload#
root@cix-localhost:~/upload# rmmod lt7911uxc.ko
root@cix-localhost:~/upload#
root@cix-localhost:~/upload# cat /sys/kernel/debug/v4l2-async/registered_subdevices
root@cix-localhost:~/upload#
root@cix-localhost:~/upload#


Regards,

Luo Liu
















At 2026-03-13 18:28:45, "Sakari Ailus" <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
>Hi Luo,
>
>On Fri, Mar 13, 2026 at 03:58:24PM +0800, luo.liu wrote:
>> Add a new debugfs file "registered_subdevices" under the "v4l2-async"
>> directory to display all registered subdevices in the subdev_list. This
>> helps with debugging by providing a clear view of all currently registered
>> V4L2 subdevices.
>
>Could you elaborate a little how has providing this information over
>debugfs helped you?
>
>--
>Regards,
>
>Sakari Ailus