sm8250-common: power: Scan available DT2W devices for xiaomi-sm8250

Preserve the previous input devices defined and define the screen drivers
present on the xiaomi-sm8250 kernel in order to be scanned depending on the
device that is running (tested on lmi/lmipro).

Change-Id: I8e9410ee0c1b70d8d84ea4c711d0947f4163f4d4
This commit is contained in:
Carlos Ayrton Lopez Arroyo 2021-01-08 19:40:26 -06:00 committed by Sebastiano Barezzi
parent 5f1b8d41b5
commit 7e1592cdae
No known key found for this signature in database
GPG Key ID: 47760583F393BC44

View File

@ -38,7 +38,14 @@ int open_ts_input() {
fd = open(absolute_path, O_RDWR);
if (ioctl(fd, EVIOCGNAME(sizeof(name) - 1), &name) > 0) {
if (strcmp(name, "goodix_ts") == 0)
if (strcmp(name, "atmel_mxt_ts") == 0 ||
strcmp(name, "fts") == 0 ||
strcmp(name, "fts_521") == 0 ||
strcmp(name, "fts_ts") == 0 ||
strcmp(name, "ft5x46") == 0 ||
strcmp(name, "goodix_ts") == 0 ||
strcmp(name, "NVTCapacitiveTouchScreen") == 0 ||
strcmp(name, "synaptics_dsx") == 0)
break;
}