I have a touchscreen device that is connected to a Linux board. It is an SPI based device. The display works well, but the touch screen (using an STMPE610 controller) is very unreliable - It works on different boards and systems and does not work on others. What has been discovered is that the screen fails during the device probe (Error -22). The driver probe fails.
SPI can be electrically configured/driven in various modes (there are 4), and touch controller seems to come up in a somewhat unknown state.
Furthermore the computer is also trying to configure its SPI pins that are driving the screen (either pulling them up or pulling them down, as the case may be).
The question - I need to know WHAT the practice is for Linux device drivers to delay the probing or HOW to work around race conditions so that a driver probe on a troublesome SPI slave device can work. Does the Linux DeviceTree provide any such features such as wait or delay function?
I basically need to delay the driver probe UNTIL the system has successfully configured itself electrically (the computer) and the slave device (the touch screen) has finally decided what SPI mode it is.