forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/power/supply/power_supply_leds.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * LEDs triggers for power supply class
34 *
....@@ -6,8 +7,6 @@
67 * Copyright © 2003 Ian Molton <spyro@f2s.com>
78 *
89 * Modified: 2004, Oct Szabolcs Gyurko
9
- *
10
- * You may use this code as per GPL version 2
1110 */
1211
1312 #include <linux/kernel.h>
....@@ -35,8 +34,9 @@
3534 led_trigger_event(psy->charging_full_trig, LED_FULL);
3635 led_trigger_event(psy->charging_trig, LED_OFF);
3736 led_trigger_event(psy->full_trig, LED_FULL);
38
- led_trigger_event(psy->charging_blink_full_solid_trig,
39
- LED_FULL);
37
+ /* Going from blink to LED on requires a LED_OFF event to stop blink */
38
+ led_trigger_event(psy->charging_blink_full_solid_trig, LED_OFF);
39
+ led_trigger_event(psy->charging_blink_full_solid_trig, LED_FULL);
4040 break;
4141 case POWER_SUPPLY_STATUS_CHARGING:
4242 led_trigger_event(psy->charging_full_trig, LED_FULL);