From c240c60951b4156ad97515deb193d0cfdd6a82d2 Mon Sep 17 00:00:00 2001 From: Simon1511 Date: Fri, 21 Oct 2022 21:03:59 +0200 Subject: [PATCH] sm7125-common: Add light sensor lcd_onoff node to powerhint * On stock ROM Samsung uses that node to tell the light sensor if the screen is on or not in order to correct lux values reported by the sensor * This will prevent our light sensor from reporting way too high lux values when the screen brightness is high and therefore heavily improves auto brightness behaviour Change-Id: I5b2f44ea11b33ebc41b3467a881fbb23f919b804 --- configs/powerhint.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configs/powerhint.json b/configs/powerhint.json index 05a6cee..8937118 100644 --- a/configs/powerhint.json +++ b/configs/powerhint.json @@ -105,6 +105,15 @@ ], "ResetOnInit": true }, + { + "Name": "LightSensorEnable", + "Path": "/sys/class/sensors/light_sensor/lcd_onoff", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, { "Name": "DoubleTapToWakeEnable", "Path": "/sys/class/sec/tsp/cmd", @@ -368,6 +377,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "INTERACTIVE", + "Node": "LightSensorEnable", + "Duration": 0, + "Value": "1" + }, { "PowerHint": "DOUBLE_TAP_TO_WAKE", "Node": "DoubleTapToWakeEnable",