Revert "bangkk: sensors: Support both display nodes"

This reverts commit 19bf6bf4de.

Change-Id: I9abb7c494452131dde1e055ce251108309bf3a31
This commit is contained in:
Anand S 2025-05-10 16:48:49 +05:30
parent 6c50e6a84a
commit 71330fa79f
No known key found for this signature in database
GPG key ID: 5BCAC037A93D36F0
2 changed files with 1 additions and 21 deletions

View file

@ -7,10 +7,6 @@ on post-fs
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/double_tap_pressed chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/double_tap_pressed
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/udfps_enabled chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/udfps_enabled
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/udfps_pressed chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/udfps_pressed
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.1/touchscreen/primary/double_tap_enabled
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.1/touchscreen/primary/double_tap_pressed
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.1/touchscreen/primary/udfps_enabled
chown system system /sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.1/touchscreen/primary/udfps_pressed
on post-fs-data on post-fs-data

View file

@ -20,7 +20,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <poll.h> #include <poll.h>
#include <unistd.h> #include <unistd.h>
#include <filesystem>
#include <condition_variable> #include <condition_variable>
#include <fstream> #include <fstream>
@ -121,22 +120,7 @@ class SysfsPollingOneShotSensor : public OneShotSensor {
int mPollFd; int mPollFd;
}; };
inline std::string getTouchscreenBasePath() { const std::string kTsPath = "/sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/";
const std::vector<std::string> possiblePaths = {
"/sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.1/touchscreen/primary/",
"/sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/"
};
for (const auto& path : possiblePaths) {
if (access(path.c_str(), F_OK) == 0) {
return path;
}
}
return "/sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.1/touchscreen/primary/";
}
const std::string kTsPath = getTouchscreenBasePath();
const std::string kTsDoubleTapPressedPath = kTsPath + "double_tap_pressed"; const std::string kTsDoubleTapPressedPath = kTsPath + "double_tap_pressed";
const std::string kTsDoubleTapEnabledPath = kTsPath + "double_tap_enabled"; const std::string kTsDoubleTapEnabledPath = kTsPath + "double_tap_enabled";