I have to start by saying that I'm new to Linux Programming.
Currently I am on a project to write a driver for a custom imaging device but before that I am trying to write a CSI0 Test Driver to see the Chess Board Image to test with my gstreamer pipelines.
I am reading "I.MX BSP Porting Guide 03/2016" Section 7 for guidelines but some parts are not clear for me:
When you set the TEST_GEN_MODE register, the device is in test mode, which is used
for debugging. The CSI generates a frame automatically and sends it to one of the
destination units. The sent frame is a chess board composed of black and configured
color squares. The configured color is set with the registers PG_B_VALUE,
PG_G_VALUE, and PG_R_VALUE. The data can be sent in different frequencies
according to the configuration of DIV_RATIO register.
When CSI is in test mode, configure the CSI unit with a similar configuration to the
described settings in the following table. Call ipu_csi_init_interface() to configure the
CSI interface protocol, formats, and features.
This paragraph directs me to set a register but doesn't tell me how to do that. Following the same documents it leads me to think that to set the mentioned register, I need to make a new file in a folder that I can't really find in my project and implement some functions. The closest directory that I found was "{BUILDDIR}/tmp/work-shared/imx6qpsabresd/kernel-source/drivers/media/platform/mxc/capture/"
To add a new camera sensor entry on the Kconfig camera file, perform the following
steps:
1. Enter the following command into the display specific folder:
$ cd linux/drivers/media/video/mxc/capture
2. Open the Kconfig file:
$ gedit Kconfig &
3. Add the entry where you want it to appear:
config MXC_IPUV3_CSI0_TEST_MODE
tristate "IPUv3 CSI0 test mode camera support"
depends on !VIDEO_MXC_EMMA_CAMERA
---help---
If you plan to use the IPUv3 CSI0 in test mode with your MXC
system, say Y here.
Again, following the document.
Create a file with the required panel-specific functions in the following path:
linux/drivers/media/video/mxc/capture/
The camera file-ipuv3_csi0_chess.c-must include the functions described in table below
and may include additional functions and macros required for your driver.
And it gives me a list of functions without giving information about their implementation.
Also after creating the test mode driver. I understand that I'm supposed to modify Kconfig files and make files. After doing these steps how will I compile the kernel?