diff --git a/init/init.mmi.overlay.rc b/init/init.mmi.overlay.rc index 710651a..66651bf 100644 --- a/init/init.mmi.overlay.rc +++ b/init/init.mmi.overlay.rc @@ -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/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.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 diff --git a/sensors/Sensor.h b/sensors/Sensor.h index c21c37f..f85a892 100644 --- a/sensors/Sensor.h +++ b/sensors/Sensor.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -121,22 +120,7 @@ class SysfsPollingOneShotSensor : public OneShotSensor { int mPollFd; }; -inline std::string getTouchscreenBasePath() { - const std::vector 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 kTsPath = "/sys/devices/platform/soc/4a80000.spi/spi_master/spi0/spi0.0/touchscreen/primary/"; const std::string kTsDoubleTapPressedPath = kTsPath + "double_tap_pressed"; const std::string kTsDoubleTapEnabledPath = kTsPath + "double_tap_enabled";