diff options
author | Chungjui Fan <chungjuifan@google.com> | 2024-04-10 03:08:29 +0000 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-04-12 16:26:16 +0000 |
commit | c64550f00f2725131cf094b560ba12714cbba6e5 (patch) | |
tree | d45ba8ff94dc3127e5bb96901ddb4c0b3d864781 | |
parent | fcf035b18d6c1a16d5967f8adf465ce9d5a6175e (diff) | |
download | gs-android-gs-bluejay-5.10-android15-beta.tar.gz |
Revert "leds: pwm: Don't disable the PWM when the LED should be off"android-15-beta-2_r0.5android-15-beta-2_r0.2android-15-beta-2_r0.1android-gs-raviole-5.10-android15-betaandroid-gs-felix-5.10-android15-betaandroid-gs-bluejay-5.10-android15-beta
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.c | 2 |
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); } |