Custom camera driver failed (Accessing user space memory outside uaccess.h)

I’m still new to this camera driver development.
We got a custom development board based on Jetson Nano module. I’m trying to develop a custom camera driver for MAX9286 (Des) + MAX9271 (Ser) + OV10635 (Sensor). The i2cdetect works and able to detect all the three addresses…

For what I can understand, for the camera driver, I can create one camera driver that probe the MAX9286 (act as camera sensor). I’m referring to IMX219 for the driver and dtsi development.

But I’m stuck at the above error, during “tegracam_device_register”… Where is the tc_dev-> s_data defined?
It seems like tc_dev have been pointing to null location during the device register… even when I tried to print a s_data, seems error.

The tc_dev is the struct of tegra_camera{} define in …/kernel/nvidia/include/media/tegracam_core.h
Some context of it could be NULL before initial or video registered.

Thank you Shane…

So where the tc_dev->s_data should be initialized or get it’s value from?

Another thing… The deserializer is mounted on the board… But the camera (serializer and camera sensor) is connected as POC to the deserializer…
So, do I still need to define all the power function in the camera driver? (.power_on, .power_off, .power_get, .power_put)

That’s depend on the ser/deser HW design.