summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHank.Xie <hank.xie@quanta.corp-partner.google.com>2022-08-11 05:47:32 -0400
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-16 08:20:42 +0000
commitf809459550d17430aa1c876dd68a2d11bac46ecb (patch)
tree18bd745e802a8151e8f06237d358873de7ec78a7
parente094901bbb21424962d5f258cae2982616cbc71f (diff)
downloadchrome-ec-f809459550d17430aa1c876dd68a2d11bac46ecb.tar.gz
shotzo: Fix suspend led flick
Add flag PWM_CONFIG_DSLEEP to avoid led flick in S0ix, and remove ec console cmd "suspend". BUG=b:235791717 BRANCH=none TEST=make MB enter S0ix and check led has no flick Signed-off-by: Hank.Xie <hank.xie@quanta.corp-partner.google.com> Change-Id: I75cd924538f2caa5144c8c496f18efdfb32870bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826438 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
-rw-r--r--board/shotzo/board.c2
-rw-r--r--board/shotzo/led.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/board/shotzo/board.c b/board/shotzo/board.c
index 2e9b1ca3f2..9078c0043c 100644
--- a/board/shotzo/board.c
+++ b/board/shotzo/board.c
@@ -468,7 +468,7 @@ __override void typec_set_source_current_limit(int port, enum tcpc_rp_value rp)
const struct pwm_t pwm_channels[] = {
[PWM_CH_LED_WHITE] = {
.channel = 1,
- .flags = PWM_CONFIG_ACTIVE_LOW,
+ .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP,
.freq_hz = 2000,
},
};
diff --git a/board/shotzo/led.c b/board/shotzo/led.c
index 618637a902..fda3cd7545 100644
--- a/board/shotzo/led.c
+++ b/board/shotzo/led.c
@@ -299,8 +299,6 @@ static int command_led(int argc, char **argv)
led_alert(1);
} else if (!strcasecmp(argv[1], "crit")) {
show_critical_error();
- } else if (!strcasecmp(argv[1], "sus")) {
- led_suspend_hook();
} else if (!strcasecmp(argv[1], "resume")) {
led_resume_hook();
} else {
@@ -308,6 +306,5 @@ static int command_led(int argc, char **argv)
}
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(led, command_led,
- "[debug|white|off|alert|crit|sus|resume]",
+DECLARE_CONSOLE_COMMAND(led, command_led, "[debug|white|off|alert|crit|resume]",
"Turn on/off LED.");