summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ec/google/chromeec/ec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 5dff16252b..de43eb5b74 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -757,12 +757,17 @@ int google_chromeec_read_limit_power_request(int *limit_power)
.cmd_data_out = &resp,
.cmd_dev_index = 0,
};
+ int rv;
- if (google_chromeec_command(&cmd))
- return -1;
+ rv = google_chromeec_command(&cmd);
+ if (rv == -EC_RES_INVALID_PARAM || rv == -EC_RES_INVALID_COMMAND) {
+ printk(BIOS_INFO, "PARAM_LIMIT_POWER not supported by EC.\n");
+ *limit_power = 0;
+ return 0;
+ }
*limit_power = resp.get_param.value;
- return 0;
+ return rv;
}
int google_chromeec_get_protocol_info(