From dca30450563c525d13137d5644f18eb03209ad1b Mon Sep 17 00:00:00 2001 From: Pig Date: Sat, 21 Nov 2020 00:44:56 +0800 Subject: [PATCH] sm6250-common: light: Remove backlight support in case of hwcomposer Change-Id: I3005c11f57797372b45e1c0f81caa4ddcac9cc36 --- light/Light.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/light/Light.cpp b/light/Light.cpp index 6ba8ff6..9e38c69 100644 --- a/light/Light.cpp +++ b/light/Light.cpp @@ -22,14 +22,12 @@ #include -#define LCD_LED "/sys/class/backlight/panel0-backlight/" #define NOTIFICATION_LED "/sys/class/leds/white/" #define BREATH "breath" #define BRIGHTNESS "brightness" #define MAX_LED_BRIGHTNESS 255 -#define MAX_LCD_BRIGHTNESS 4095 namespace { /* @@ -83,11 +81,6 @@ static inline uint32_t getScaledBrightness(const LightState& state, uint32_t max return scaleBrightness(getBrightness(state), maxBrightness); } -static void handleBacklight(const LightState& state) { - uint32_t brightness = getScaledBrightness(state, MAX_LCD_BRIGHTNESS); - set(LCD_LED BRIGHTNESS, brightness); -} - static void handleNotification(const LightState& state) { uint32_t whiteBrightness = getScaledBrightness(state, MAX_LED_BRIGHTNESS); @@ -131,7 +124,6 @@ static std::vector backends = { { Type::ATTENTION, handleNotification }, { Type::NOTIFICATIONS, handleNotification }, { Type::BATTERY, handleNotification }, - { Type::BACKLIGHT, handleBacklight }, }; static LightStateHandler findHandler(Type type) {