summaryrefslogtreecommitdiffhomepage
path: root/src/srp/fw-ec/led.diff.gsp
blob: ac7642ffb4ef6c633a7c99c3b6d6fd6c2e74e817 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@span .diff-meta {-diff --git a/board/hx20/led.c b/board/hx20/led.c}
@span .diff-meta {-index a4dc4564e..dacf73fda 100644}
@span .diff-meta {---- a/board/hx20/led.c}
@span .diff-meta {-+++ b/board/hx20/led.c}
@span .diff-loc {-\@\@ -283,22 +283,22 \@\@ static void led_set_power(void)}
	/* don’t light up when at lid close */
 	if (!lid_is_open()) {
 		set_pwr_led_color(PWM_LED2, -1);
@span .diff-del {--		enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 0);}
@span .diff-ins {-+		enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 0);}
 		return;
 	\}

 	if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND))
@span .diff-del {--		enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 1);}
@span .diff-ins {-+		enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 1);}
 	else
@span .diff-del {--		enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 0);}
@span .diff-ins {-+		enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 0);}

 	if (chipset_in_state(CHIPSET_STATE_ON) | power_button_enable) {
 		if (charge_prevent_power_on(0))
 			set_pwr_led_color(PWM_LED2, (power_tick %
 				LED_TICKS_PER_CYCLE < LED_ON_TICKS) ?
@span .diff-del {--				EC_LED_COLOR_WHITE : -1);}
@span .diff-ins {-+				EC_LED_COLOR_GREEN : -1);}
 		else
@span .diff-del {--			set_pwr_led_color(PWM_LED2, EC_LED_COLOR_WHITE);}
@span .diff-ins {-+			set_pwr_led_color(PWM_LED2, EC_LED_COLOR_GREEN);}
 	\} else
 		set_pwr_led_color(PWM_LED2, -1);
 \}