platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence
Don't let EC control suspend/resume sequence. If the EC controls the lightbar and sets the sequence when it notices the chipset transitioning between states, we can't make exceptions for cases where we don't want to activate the lightbar. Instead, let's move the suspend/resume notifications into the kernel so we can selectively play the sequences. Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Benson Leung <bleung@chromium.org>
This commit is contained in:

committed by
Benson Leung

parent
be3ebebf43
commit
405c84308c
@@ -1175,7 +1175,7 @@ struct ec_params_lightbar {
|
||||
struct {
|
||||
/* no args */
|
||||
} dump, off, on, init, get_seq, get_params_v0, get_params_v1,
|
||||
version, get_brightness, get_demo;
|
||||
version, get_brightness, get_demo, suspend, resume;
|
||||
|
||||
struct {
|
||||
uint8_t num;
|
||||
@@ -1193,6 +1193,10 @@ struct ec_params_lightbar {
|
||||
uint8_t led;
|
||||
} get_rgb;
|
||||
|
||||
struct {
|
||||
uint8_t enable;
|
||||
} manual_suspend_ctrl;
|
||||
|
||||
struct lightbar_params_v0 set_params_v0;
|
||||
struct lightbar_params_v1 set_params_v1;
|
||||
struct lightbar_program set_program;
|
||||
@@ -1229,7 +1233,7 @@ struct ec_response_lightbar {
|
||||
/* no return params */
|
||||
} off, on, init, set_brightness, seq, reg, set_rgb,
|
||||
demo, set_params_v0, set_params_v1,
|
||||
set_program;
|
||||
set_program, manual_suspend_ctrl, suspend, resume;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
@@ -1254,6 +1258,9 @@ enum lightbar_command {
|
||||
LIGHTBAR_CMD_GET_PARAMS_V1 = 16,
|
||||
LIGHTBAR_CMD_SET_PARAMS_V1 = 17,
|
||||
LIGHTBAR_CMD_SET_PROGRAM = 18,
|
||||
LIGHTBAR_CMD_MANUAL_SUSPEND_CTRL = 19,
|
||||
LIGHTBAR_CMD_SUSPEND = 20,
|
||||
LIGHTBAR_CMD_RESUME = 21,
|
||||
LIGHTBAR_NUM_CMDS
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user