touch/common: gti: interactive calibrate/self-test interface

Introduce an interface that exposes the driver's calibration and
self-test functionality with extra care placed on ensuring the client is
knowledgable about conditions required to safely calibrate the touch
screen. The interface provides foolproofing to prevent casual
read/writes to the driver node from triggering calibration, as the
client must be aware of the interface's timing constraints and perform
actions within predetermined time intervals. A well-behaved client is
expected to fulfill UI obligations on behalf of the driver, such as
displaying appropriate instructional messages regarding how the
touchscreen must be situated before calibration begins, alerting the
user not to touch the screen as calibration begins, and providing a
message indicating when calibration has completed.

The interface also provides a means for users to run a touchscreen's
self-test, but the consequences of doing so incorrectly are not
detrimental to the touchscreen's performance.

Bug: 230050981
Change-Id: I9649ccca804ad22f24ee81cc9d17a1ccb1e45b6e
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
2 files changed