Re: [PATCH 2/3] mfd: cros_ec: Create sysfs attributes for the ChromeOS EC.

From: Lee Jones
Date: Tue Nov 18 2014 - 09:26:59 EST


On Mon, 17 Nov 2014, Javier Martinez Canillas wrote:

> From: Bill Richardson <wfrichar@xxxxxxxxxxxx>
>
> 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

drivers/mtd?

> reboot - tell the EC to reboot in various ways

drivers/power?

> version - information about the EC software and hardware

What's the difference between this version and the version you can
read in the new _dev driver?

> 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@xxxxxxxxxxxx>
> Reviewed-by: Olof Johansson <olofj@xxxxxxxxxxxx>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@xxxxxxxxxxxxxxx>
> ---
> drivers/mfd/Makefile | 3 +-
> drivers/mfd/cros_ec_dev.c | 10 +-
> drivers/mfd/cros_ec_dev.h | 26 +++++
> drivers/mfd/cros_ec_sysfs.c | 271 ++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 307 insertions(+), 3 deletions(-)
> create mode 100644 drivers/mfd/cros_ec_dev.h
> create mode 100644 drivers/mfd/cros_ec_sysfs.c

[...]

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/