Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c026a6ec authored by Shantanu Jain's avatar Shantanu Jain Committed by Gerrit - the friendly Code Review server
Browse files

input: atmel_mxt_ts: add support for configuring soft keys



The touchscreen controllers are field-swappable on both customer
devices and internal reference devices. It is possible to have
multiple Atmel touch controllers where each controller would
support softkeys in a different way. While some Atmel touch
controllers support sending a series of keys (using T15 object),
some others report native X-Y touch coordinates of the touch
sensor in the soft key region. While in the earlier case, the
touch sensor directly reports the key codes and hence there is
no need for software to do any translation, In the latter case
software needs to translate these coordinates to keycodes.

The current architecture of Atmel touchscreen driver does not
have support to disambiguate between more than two Atmel touch
controllers that send coordinates in lieu of key codes. To
support this functionality in driver, a device-tree property
is defined that describes the key codes for the soft-key area.
The driver calculates the total soft key area based on the
display resolution and touch sensor dimensions. Based on the
total soft-key area and number of keys to be supported, it
calculates the area for each of the soft-keys. It exports this
information to userspace by populating a sysfs file. User-space
programs can then translate the touch coordinates received to
key codes.

Change-Id: I69c411f65f439dddf39f00b31fb409bb3e5c54bf
Signed-off-by: default avatarHimanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent f787ff6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment