summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChungjui Fan <chungjuifan@google.com>2024-04-10 03:08:29 +0000
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-04-12 16:26:16 +0000
commitc64550f00f2725131cf094b560ba12714cbba6e5 (patch)
treed45ba8ff94dc3127e5bb96901ddb4c0b3d864781
parentfcf035b18d6c1a16d5967f8adf465ce9d5a6175e (diff)
downloadgs-android-gs-bluejay-5.10-android15-beta.tar.gz
It would enable pwm unexpectedly and won't disable pwm until reboot. This reverts commit 23eb8629c22f7a36587ef2de22a9dedd699b3ac5. Bug: 332793240 Change-Id: Iea80663f48b14dda70174c430e60e378858a7fd2 Signed-off-by: Chungjui Fan <chungjuifan@google.com>
-rw-r--r--drivers/leds/leds-pwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index f4c0507becb3..f53f9309ca6c 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -51,7 +51,7 @@ static int led_pwm_set(struct led_classdev *led_cdev,
duty = led_dat->pwmstate.period - duty;
led_dat->pwmstate.duty_cycle = duty;
- led_dat->pwmstate.enabled = true;
+ led_dat->pwmstate.enabled = duty > 0;
return pwm_apply_state(led_dat->pwm, &led_dat->pwmstate);
}