summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2012-05-25 14:30:37 +0800
committerVic Yang <victoryang@chromium.org>2012-05-26 20:29:54 +0800
commitb85a7ce9d686799e88bf65fa95ed49c6d561d621 (patch)
tree07c839b63d24bc123ad6bf20b6c7031f5990055e /include
parent7ecd1d6d3c23b6acb13f90062d062647ddb4fed3 (diff)
downloadchrome-ec-b85a7ce9d686799e88bf65fa95ed49c6d561d621.tar.gz
Make ectool correctly report when keyboard backlight is off
When keyboard backlight is disabled, make 'ectool pwmgetkblight' reports 'disabled'. BUG=chrome-os-partner:9966 TEST='ectool pwmgetkblight' shows 'Keyboard backlight disabled' when lid closed. Change-Id: Ica690159e30431ccb530275fcc2311fb8f54a9aa
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h1
-rw-r--r--include/pwm.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 58490eb108..f76cadb7f3 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -370,6 +370,7 @@ struct ec_params_pwm_set_fan_target_rpm {
#define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x22
struct ec_response_pwm_get_keyboard_backlight {
uint8_t percent;
+ uint8_t enabled;
} __attribute__ ((packed));
/* Set keyboard backlight */
diff --git a/include/pwm.h b/include/pwm.h
index edea50e954..356b080532 100644
--- a/include/pwm.h
+++ b/include/pwm.h
@@ -26,6 +26,9 @@ int pwm_set_fan_target_rpm(int rpm);
/* Enable/disable the keyboard backlight. */
int pwm_enable_keyboard_backlight(int enable);
+/* Get the keyboard backlight enable/disable status (1=enabled, 0=disabled). */
+int pwm_get_keyboard_backlight_enabled(void);
+
/* Get the keyboard backlight percentage (0=off, 100=max). */
int pwm_get_keyboard_backlight(void);