aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/chrome/cros_ec_dev.h
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-02-02 12:26:27 +0100
committerOlof Johansson <olof@lixom.net>2015-02-26 15:45:12 -0800
commit71af4b52cc22a8d0f7b66a51427a804741a045b6 (patch)
treeff3821ad460186ba3fb2e1904d7181fa21add2c5 /drivers/platform/chrome/cros_ec_dev.h
parentmfd: cros_ec: Instantiate ChromeOS EC character device (diff)
downloadlinux-dev-71af4b52cc22a8d0f7b66a51427a804741a045b6.tar.xz
linux-dev-71af4b52cc22a8d0f7b66a51427a804741a045b6.zip
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 <wfrichar@chromium.org> Reviewed-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/platform/chrome/cros_ec_dev.h')
-rw-r--r--drivers/platform/chrome/cros_ec_dev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_dev.h b/drivers/platform/chrome/cros_ec_dev.h
index 15c54c4c5531..f03613290ecf 100644
--- a/drivers/platform/chrome/cros_ec_dev.h
+++ b/drivers/platform/chrome/cros_ec_dev.h
@@ -44,4 +44,7 @@ struct cros_ec_readmem {
#define CROS_EC_DEV_IOCXCMD _IOWR(CROS_EC_DEV_IOC, 0, struct cros_ec_command)
#define CROS_EC_DEV_IOCRDMEM _IOWR(CROS_EC_DEV_IOC, 1, struct cros_ec_readmem)
+void ec_dev_sysfs_init(struct cros_ec_device *);
+void ec_dev_sysfs_remove(struct cros_ec_device *);
+
#endif /* _CROS_EC_DEV_H_ */