From 71af4b52cc22a8d0f7b66a51427a804741a045b6 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 2 Feb 2015 12:26:27 +0100 Subject: platform/chrome: Create sysfs attributes for the ChromeOS EC This adds the first few sysfs attributes for the Chrome OS EC. These controls are made available under /sys/devices/virtual/chromeos/cros_ec flashinfo - display current flash info reboot - tell the EC to reboot in various ways version - information about the EC software and hardware Future changes will build on this to add additional controls. From a root shell, you should be able to do things like this: cd /sys/devices/virtual/chromeos/cros_ec cat flashinfo cat version echo rw > reboot cat version echo ro > reboot cat version echo rw > reboot cat version echo cold > reboot That last command will reboot the AP too. Signed-off-by: Bill Richardson Reviewed-by: Olof Johansson Signed-off-by: Javier Martinez Canillas Tested-by: Gwendal Grignou Reviewed-by: Gwendal Grignou Signed-off-by: Olof Johansson --- drivers/platform/chrome/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/platform/chrome/Makefile') diff --git a/drivers/platform/chrome/Makefile b/drivers/platform/chrome/Makefile index ec682900f889..34b631ceff67 100644 --- a/drivers/platform/chrome/Makefile +++ b/drivers/platform/chrome/Makefile @@ -1,5 +1,6 @@ obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o -obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_dev.o +cros_ec_devs-objs := cros_ec_dev.o cros_ec_sysfs.o +obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_devs.o obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpc.o -- cgit v1.2.3-59-g8ed1b