Looking for Media Controller Examples

Hello,

I’m trying to figure out how to implement a hot-pluggable V4L2 driver using the “V4L2 media-controller driver” that was introduced in 24.2

However I’m having absolutely no luck finding examples on how to do it. The video driver example the dev team says to use is the OV5693 driver at kernel_source/drivers/media/i2c/ov5693.c but it seems to work through soc_camera using the board-t210ref-camera.c boardfile.

I don’t want to use that one because based off the below post soc_camera is deprecated in favor of media-controller.
https://devtalk.nvidia.com/default/topic/946840/jetson-tx1/soc_camera-driver-in-l4t-r24-1/

Does anyone have any examples of a V4L2 driver that’s hot pluggable and integrated with media-controller for the TX1?

Thanks!

In the kernel there are two drivers for ov5693, one is used by media controller and v4l2src and I guess the other one is used by nvcamerasrc just to initialize the camera sensor. I think that what you are seeing is not the v4l2 driver

You are exactly right! I was expecting to see a struct media_device etc, like I read about in the documentation, but now I see the call to media_entity_init in probe.

Thanks!