summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/led_policy_std.c6
-rw-r--r--include/config.h8
2 files changed, 13 insertions, 1 deletions
diff --git a/common/led_policy_std.c b/common/led_policy_std.c
index ebb7125105..e0f211d200 100644
--- a/common/led_policy_std.c
+++ b/common/led_policy_std.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015 The Chromium OS Authors. All rights reserved.
+/* Copyright 2015 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -77,8 +77,12 @@ static int pwr_led_set_color(enum led_color color)
gpio_set_level(GPIO_POWER_LED, POWER_LED_OFF);
break;
case LED_WHITE:
+#ifdef CONFIG_POWER_LED_IS_EXTERNAL
+ gpio_set_level(GPIO_POWER_LED, POWER_LED_ON);
+#else
gpio_set_level(GPIO_POWER_LED,
lid_is_open() ? POWER_LED_ON : POWER_LED_OFF);
+#endif
break;
default:
return EC_ERROR_UNKNOWN;
diff --git a/include/config.h b/include/config.h
index c6babf7357..6c76a819c5 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1076,6 +1076,14 @@
#undef CONFIG_LED_BAT_ACTIVE_LOW
#undef CONFIG_LED_POWER_ACTIVE_LOW
+/*
+ * Normally the power led is part of the keyboard, so there's no point of
+ * having it on when the lid is closed. This option can be used for cases
+ * where the power led is externally visible and is supposed to stay
+ * on when the lid is closed.
+ */
+#undef CONFIG_POWER_LED_IS_EXTERNAL
+
/* Support for LED driver chip(s) */
#undef CONFIG_LED_DRIVER_DS2413 /* Maxim DS2413, on one-wire interface */
#undef CONFIG_LED_DRIVER_LP5562 /* LP5562, on I2C interface */