<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/platform/chrome/cros_ec_dev.c, branch v4.1.10</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>platform/chrome: cros_ec_dev - fix Unknown escape '%' warning</title>
<updated>2015-03-04T19:23:10+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olofj@chromium.org</email>
</author>
<published>2015-03-03T12:22:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef59c25d1be9539890c03c4915cdd4b868191b6f'/>
<id>ef59c25d1be9539890c03c4915cdd4b868191b6f</id>
<content type='text'>
Fix the following sparse warning:

    drivers/platform/chrome/cros_ec_dev.c:64:45: sparse: Unknown escape '%'

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Olof Johansson &lt;olofj@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following sparse warning:

    drivers/platform/chrome/cros_ec_dev.c:64:45: sparse: Unknown escape '%'

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Olof Johansson &lt;olofj@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/chrome: Expose Chrome OS Lightbar to users</title>
<updated>2015-02-26T23:45:16+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2015-02-02T11:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3f837e52b14bf84c2db65f622b5c31cd261100c'/>
<id>f3f837e52b14bf84c2db65f622b5c31cd261100c</id>
<content type='text'>
This adds some sysfs entries to provide userspace control of the
four-element LED "lightbar" on the Chromebook Pixel. This only instantiates
the lightbar controls if the device actually exists.

To prevent DoS attacks, this interface is limited to 20 accesses/second,
although that rate can be adjusted by a privileged user.

On Chromebooks without a lightbar, this should have no effect. On the
Chromebook Pixel, you should be able to do things like this:

    $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
    $ echo 0x80 &gt; brightness
    $ echo 255 &gt; brightness
    $
    $ cat sequence
    S0
    $ echo konami &gt; sequence
    $ cat sequence
    KONAMI
    $
    $ cat sequence
    S0

And

    $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
    $ echo stop &gt; sequence
    $ echo "4 255 255 255" &gt; led_rgb
    $ echo "0 255 0 0  1 0 255 0  2 0 0 255  3 255 255 0" &gt; led_rgb
    $ echo run  &gt; sequence

Test the DoS prevention with this:

    $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
    $ echo 500 &gt; interval_msec
    $ time (cat version version version version version version version)

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Olof Johansson &lt;olofj@chromium.org&gt;
Tested-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds some sysfs entries to provide userspace control of the
four-element LED "lightbar" on the Chromebook Pixel. This only instantiates
the lightbar controls if the device actually exists.

To prevent DoS attacks, this interface is limited to 20 accesses/second,
although that rate can be adjusted by a privileged user.

On Chromebooks without a lightbar, this should have no effect. On the
Chromebook Pixel, you should be able to do things like this:

    $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
    $ echo 0x80 &gt; brightness
    $ echo 255 &gt; brightness
    $
    $ cat sequence
    S0
    $ echo konami &gt; sequence
    $ cat sequence
    KONAMI
    $
    $ cat sequence
    S0

And

    $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
    $ echo stop &gt; sequence
    $ echo "4 255 255 255" &gt; led_rgb
    $ echo "0 255 0 0  1 0 255 0  2 0 0 255  3 255 255 0" &gt; led_rgb
    $ echo run  &gt; sequence

Test the DoS prevention with this:

    $ cd /sys/devices/virtual/chromeos/cros_ec/lightbar
    $ echo 500 &gt; interval_msec
    $ time (cat version version version version version version version)

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Olof Johansson &lt;olofj@chromium.org&gt;
Tested-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/chrome: Create sysfs attributes for the ChromeOS EC</title>
<updated>2015-02-26T23:45:12+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2015-02-02T11:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=71af4b52cc22a8d0f7b66a51427a804741a045b6'/>
<id>71af4b52cc22a8d0f7b66a51427a804741a045b6</id>
<content type='text'>
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 &gt; reboot
    cat version
    echo ro &gt; reboot
    cat version
    echo rw &gt; reboot
    cat version
    echo cold &gt; reboot

That last command will reboot the AP too.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Olof Johansson &lt;olofj@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &gt; reboot
    cat version
    echo ro &gt; reboot
    cat version
    echo rw &gt; reboot
    cat version
    echo cold &gt; reboot

That last command will reboot the AP too.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Olof Johansson &lt;olofj@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/chrome: Add Chrome OS EC userspace device interface</title>
<updated>2015-02-26T23:45:06+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2015-02-02T11:26:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e7c256fbfb157885d36ffcf03d981fa8b21e8fec'/>
<id>e7c256fbfb157885d36ffcf03d981fa8b21e8fec</id>
<content type='text'>
This patch adds a device interface to access the
Chrome OS Embedded Controller from user-space.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@google.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a device interface to access the
Chrome OS Embedded Controller from user-space.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@google.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
