summaryrefslogtreecommitdiff
path: root/include/power_led.h
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2012-08-08 17:28:13 -0700
committerGerrit <chrome-bot@google.com>2012-08-17 16:55:26 -0700
commit1f091487b210125e351c8397186e2012d8a19cb7 (patch)
treeafd7aa4e91ffad842b05cc415bab7da9e0e31408 /include/power_led.h
parentc1c3ec56f89bd2bb132e1e360b0aaf43aa77e0d8 (diff)
downloadchrome-ec-1f091487b210125e351c8397186e2012d8a19cb7.tar.gz
snow/stm32: re-configure power LED on the fly (input vs. pwm)
Usually the power LED is driven by the PWM mode so that its nominal brightness can be set to a "soft" on value. However, when the LED is to remain off the LED should be switched to floating input mode. This reduces voltage leakage. This CL updates the power_led_task to configure the LED however is appropriate and adds board functions to re-configure the GPIO. Signed-off-by: David Hendricks <dhendrix@chromium.org> BRANCH=snow BUG=chrome-os-partner:12381 TEST=LED responds as expected in suspend and on/off states, also tested that leakage is reduced with multimeter Change-Id: If90ac78aaffe7358cce80dd02ec1423c2cb4f664 Reviewed-on: https://gerrit.chromium.org/gerrit/29705 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Ready: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'include/power_led.h')
-rw-r--r--include/power_led.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/power_led.h b/include/power_led.h
index 9301a5fdf5..b255c557bb 100644
--- a/include/power_led.h
+++ b/include/power_led.h
@@ -25,6 +25,12 @@ enum powerled_state {
POWERLED_STATE_COUNT
};
+enum powerled_config {
+ POWERLED_CONFIG_MANUAL_OFF,
+ POWERLED_CONFIG_MANUAL_ON,
+ POWERLED_CONFIG_PWM,
+};
+
/* Set the power adapter LED to the specified color. */
int powerled_set(enum powerled_color color);