I am trying to modify the OE kernel to work with two STMPE811 chips to have two independent touchscreen interfaces. Is it possible somehow easily or I have to modify the drivers at low level?
When I was trying to simply add definition to a device tree it caused errors with the touchscreen interface file (sysfs: cannot create duplicate filename ‘/bus/platform/devices/stmpe-ts’). I solved it like that I modified the drivers/mfd/stmpe.c where I added new stmpe_ts_cell in which was changed the interface name. It is creating two files stmpe-ts and stmpe-ts1 in /sys/bus/platform/devices/ folder. How do I tell the kernel to register the stmpe-ts1 as touch screen device similar to stmpe-ts?
Is also necessary to modify the touchscreen.rules?
Hi Max,
thank you for a quick and correct answer. I can confirm that your solution is working, but I don’t understand it. Can you please explain it to me? Or share any materials where is this described so I don’t bother you with this kind questions?
It gets an ID from the alias name (the suffix after stmpe-i2c) and will use that to get unique name for the individual driver instances.
Without the alias all instances get the same name resulting in name clashes later on.
At least for this driver this feature is not documented here.
So I had to read the driver code to find the answer.