The migration camera insertion module can only be inserted for the first time, and an error is reported for the second time

These days, I have just started learning how to port cameras. I chose an OV5647 camera that is not supported on the Jetson Nano motherboard. Initially, I downloaded the source code of the Raspberry Pi kernel because there is a driver and device tree for OV5647 in the Raspberry Pi kernel for reference. However, the NVIDIA camera head framework is different from the Raspberry Pi, so I first changed the driver based on the OV5693. c supported by the nano, After comparing imx219. c and ov5693. c, the driver for ov5647 was written, and the device tree was also modified based on these two. However, when I tested in rootfs,The first time the driver was successfully inserted, the second time the following error was reported:

The error message indicates that the creation of the debugging file failed. At first, I suspected that the remove driver did not release resources, but in reality, the remove function executed:

Can you tell me what caused the second creation of the debugging file to fail? Thank you

What’s the “failed with error -12” ?

I just read the source code and found that the ‘really’ in the driver/base/dd. c file_ The probe function contains the error message ‘probe of 8-0036 failed with error -12’:

But I don’t know how to call this function when inserting a module,Since the “probe of 8-0036 failed with error -12” message is after the “error creating debugfs interface”, I am writing on ov5647_ Debugfs_ The create function prints stack information and tracks all the called functions during the process, but no calls were found to be truly_ Probe function.

Maybe remove the debugfs to clarify the problem.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.