]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot.
authorPi-Hsun Shih <pihsun@chromium.org>
Mon, 21 Dec 2020 04:12:24 +0000 (12:12 +0800)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Wed, 20 Jan 2021 15:19:17 +0000 (16:19 +0100)
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
drivers/platform/chrome/cros_ec_sysfs.c

index fc8681f80abafc44a4e7ed0df7b860040f1db821..f07eabcf9494cd3c85ae87cf3f502c678ce79ed0 100644 (file)
@@ -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},