but unfortunately, I cannot find such a file for my kernel
When I am adding the ILI210x driver to my device-tree I am struggling to get it to load. I am using the following code but the driver does not seem to get loaded - I am unsure what to use in the “compatible” property. I saw that in the more recent drivers it is explicitly specified in code, while in the version of the driver I am using this is missing.
Note: before switching to ILI210x we used the Solomon SSD254x touchscreen so I have both in my device tree - I assume this should be fine?
hi Kevin, thanks for the info - as stated above this file does not exist for the toradex_4.9-2.3.x branch - I tried it anyways but it does not seem to load the driver.
The ili210x.c file in the above branch also does not define any of this. there is no mention of ili251x either
is there a way to debug this when I deployed my image to the board?
I have a working image - I am just adding/replacing a driver. Which part in specific do you reference? I have not built our original yocto layer but I’m pretty sure it’s conform to this.
the whole image is working - also the driver is loading, it’s just not finding the configuration
Before adding the driver to the device tree you will have to enable it in the menuconfig for that particular kernel. Have you already done that?
If not, you will find more details on Kernel Configuration here.
Since the driver is already available on the kernel you don’t have to do the customizations from Yocto that @kevin.tx suggested earlier. It is only needed for out-of-tree modules. You have to make sure that the module is enabled and then added to the device tree before you compile the kernel and device trees.
see above - I can see in the console that the driver is searching for the device:
the driver is loading, but it is now reporting the following:
ili210x_i2c 1-0041: No platform data!
ili210x_i2c: probe of 1-0041 failed with error -22
I see that there is a ili210x_platform_data struct:
struct ili210x_platform_data {
unsigned long irq_flags;
unsigned int poll_period;
bool (*get_pendown_state)(void);
};
but I am unsure why this is not found and where it is looking for this - does this come from my DTSI file?
I have used menuconfig to enable the device, this creates a config file where the CONFIG_TOUCHSCREEN_ILI210X=y is set - so I set this line in my own layer layers/meta-gcu-apalis/recipes-kernel/linux/linux-toradex_4.9-2.3.x/apalis-imx6/defconfig which seems to activate the driver just fine (as I stated, I can see the driver searching for a device).
So you mean I should remove the relevant data from my device-tree then (the other hardware we were using before the ILI210x required us to add an additional driver).
So you mean I should remove the relevant data from my device-tree then (the other hardware we were using before the ILI210x required us to add an additional driver).
That’s the next thing I would try: Remove the driver and nodes in device tree files related to the old touchscreen (Solomon SSD254x), recompile and deploy the kernel.
Also, could you please try setting the compatible property as compatible = "ilitek,ili210x";