Hi all! I have been developing software on TX2 for 1 year. So far so good. Recently we custom-made an imaging device. Now we encounter difficulties on using it on TX2. Hope someone here can kindly give me some directions…
Our imaging device can be powered on or reset through GPIO, and controllable through I2C. It can output data through CSI-2. It is connected to the CSI-2 port of the Jetson TX2 Connect Tech Spacely carrier board. The CSI-2 port includes the GPIO, I2C and CSI-2 data output. The OS is L4T 28.2.1, installed by JetPack 3.2.1.
Now what we need are:
[b]
- Software function(s) to control the power and reset GPIO.
- Software function(s) to send an I2C command, which can be either read or write. The register addresses and values are not fixed yet so we don't want them to be hard-coded. We want to send the I2C commands one by one during run-time.
- Software function(s) to read data from CSI-2 port.
[/b]
After a few days of research for solution I find there is no easy way because the GPIO, I2C and CSI-2 are not exposed to the user space. It seems that I must write a kernel module. Please correct me if I am wrong.
I have gone through the official guide “NVIDIA Tegra Linux Driver Package Development Guide” → section “Sensor Driver Programming Guide”. It is not simple for me. The guide advised to write a driver and device tree config within the kernel source and re-build the whole kernel. It seems too complicated and risky. I would very much prefer writing an external kernel module and insert it to the kernel run-time (using “insmod” or “modprobe”). Is it possible? If there is any sample project or guideline please kindly let me know.
Thanks a lot!