summaryrefslogtreecommitdiff
path: root/drivers/platform/chrome
diff options
context:
space:
mode:
authorPi-Hsun Shih <pihsun@chromium.org>2020-12-21 12:12:24 +0800
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2021-01-20 16:19:17 +0100
commit4c2e9b3e18962862281d2b2b82e5ef8aaba0442f (patch)
tree5e28b0f81b9719f76e8b0742f7335405f9d5828c /drivers/platform/chrome
parent9f77c58d65ff216d71f5ab829b6f39afefbde10c (diff)
platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot.
Add cold-ap-off to ChromeOS EC sysfs reboot file option, corresponds to the EC_REBOOT_COLD_AP_OFF flag, that will reset EC and keep AP off. Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20201221041231.14516-2-pihsun@chromium.org
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r--drivers/platform/chrome/cros_ec_sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
index fc8681f80aba..f07eabcf9494 100644
--- a/drivers/platform/chrome/cros_ec_sysfs.c
+++ b/drivers/platform/chrome/cros_ec_sysfs.c
@@ -28,7 +28,7 @@ static ssize_t reboot_show(struct device *dev,
int count = 0;
count += scnprintf(buf + count, PAGE_SIZE - count,
- "ro|rw|cancel|cold|disable-jump|hibernate");
+ "ro|rw|cancel|cold|disable-jump|hibernate|cold-ap-off");
count += scnprintf(buf + count, PAGE_SIZE - count,
" [at-shutdown]\n");
return count;
@@ -46,6 +46,7 @@ static ssize_t reboot_store(struct device *dev,
{"cancel", EC_REBOOT_CANCEL, 0},
{"ro", EC_REBOOT_JUMP_RO, 0},
{"rw", EC_REBOOT_JUMP_RW, 0},
+ {"cold-ap-off", EC_REBOOT_COLD_AP_OFF, 0},
{"cold", EC_REBOOT_COLD, 0},
{"disable-jump", EC_REBOOT_DISABLE_JUMP, 0},
{"hibernate", EC_REBOOT_HIBERNATE, 0},