<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/mfd/cros_ec.h, branch v4.4.139</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.139</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.139'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-09-07T06:32:43+00:00</updated>
<entry>
<title>mfd: cros_ec: Add cros_ec_cmd_xfer_status() helper</title>
<updated>2016-09-07T06:32:43+00:00</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2016-07-15T23:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d91c348e4c3a011849e309cb76a6fdc714935ea4'/>
<id>urn:sha1:d91c348e4c3a011849e309cb76a6fdc714935ea4</id>
<content type='text'>
commit 9798ac6d32c1a32d6d92d853ff507d2d39c4300c upstream.

So that callers of cros_ec_cmd_xfer() don't have to repeat boilerplate
code when checking for errors from the EC side.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Tested-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>platform/chrome: Support reading/writing the vboot context</title>
<updated>2015-10-07T22:05:53+00:00</updated>
<author>
<name>Emilio López</name>
<email>emilio.lopez@collabora.co.uk</email>
</author>
<published>2015-09-21T13:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18800fc7a04e7df8a345e7ef4fc3064368276f83'/>
<id>urn:sha1:18800fc7a04e7df8a345e7ef4fc3064368276f83</id>
<content type='text'>
Some EC implementations include a small nvram space used to store
verified boot context data. This patch offers a way to expose this
data to userspace.

Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Emilio López &lt;emilio.lopez@collabora.co.uk&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: Support multiple EC in a system</title>
<updated>2015-06-15T12:18:23+00:00</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2015-06-09T11:04:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57b33ff077beebb68481a2b6b8e5fe58ca998169'/>
<id>urn:sha1:57b33ff077beebb68481a2b6b8e5fe58ca998169</id>
<content type='text'>
Chromebooks can have more than one Embedded Controller so the
cros_ec device id has to be incremented for each EC registered.

Add a new structure to represent multiple EC as different char
devices (e.g: /dev/cros_ec, /dev/cros_pd). It connects to
cros_ec_device and allows sysfs inferface for cros_pd.

Also reduce number of allocated objects, make chromeos sysfs
class object a static and add refcounting to prevent object
deletion while command is in progress.

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Dmitry Torokhov &lt;dtor@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: add bus-specific proto v3 code</title>
<updated>2015-06-15T12:18:22+00:00</updated>
<author>
<name>Stephen Barber</name>
<email>smbarber@chromium.org</email>
</author>
<published>2015-06-09T11:04:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d365407079d33106f76bd486a863de05eb5ae95d'/>
<id>urn:sha1:d365407079d33106f76bd486a863de05eb5ae95d</id>
<content type='text'>
Add proto v3 support to the SPI, I2C, and LPC.

Signed-off-by: Stephen Barber &lt;smbarber@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: add proto v3 skeleton</title>
<updated>2015-06-15T12:18:21+00:00</updated>
<author>
<name>Stephen Barber</name>
<email>smbarber@chromium.org</email>
</author>
<published>2015-06-09T11:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c7589af3c4dee844e6a4174f2aa8996cf837604'/>
<id>urn:sha1:2c7589af3c4dee844e6a4174f2aa8996cf837604</id>
<content type='text'>
Add support in cros_ec.c to handle EC host command protocol v3.
For v3+, probe for maximum shared protocol version and max
request, response, and passthrough sizes. For now, this will
always fall back to v2, since there is no bus-specific code
for handling proto v3 packets.

Signed-off-by: Stephen Barber &lt;smbarber@chromium.org&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;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: Use a zero-length array for command data</title>
<updated>2015-06-15T12:18:19+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2015-06-09T11:04:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a841178445bb72a3d566b4e6ab9d19e9b002eb47'/>
<id>urn:sha1:a841178445bb72a3d566b4e6ab9d19e9b002eb47</id>
<content type='text'>
Commit 1b84f2a4cd4a ("mfd: cros_ec: Use fixed size arrays to transfer
data with the EC") modified the struct cros_ec_command fields to not
use pointers for the input and output buffers and use fixed length
arrays instead.

This change was made because the cros_ec ioctl API uses that struct
cros_ec_command to allow user-space to send commands to the EC and
to get data from the EC. So using pointers made the API not 64-bit
safe. Unfortunately this approach was not flexible enough for all
the use-cases since there may be a need to send larger commands
on newer versions of the EC command protocol.

So to avoid to choose a constant length that it may be too big for
most commands and thus wasting memory and CPU cycles on copy from
and to user-space or having a size that is too small for some big
commands, use a zero-length array that is both 64-bit safe and
flexible. The same buffer is used for both output and input data
so the maximum of these values should be used to allocate it.

Suggested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: Remove parent field</title>
<updated>2015-06-15T12:18:17+00:00</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2015-05-20T09:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7b707f96820161820a864d2ee81740a14da6b93'/>
<id>urn:sha1:e7b707f96820161820a864d2ee81740a14da6b93</id>
<content type='text'>
Parent and device were pointing to the same device structure.

Parent is unused, removed.

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Tested-by: Stephen Barber &lt;smbarber@chromium.org&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Tested-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Puthikorn Voravootivat &lt;puthik@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: cros_ec: Add char dev and virtual dev pointers</title>
<updated>2015-02-26T23:44:58+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2015-02-02T11:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05c11ac4e0712def44cccbff82ad980d9e1d1b80'/>
<id>urn:sha1:05c11ac4e0712def44cccbff82ad980d9e1d1b80</id>
<content type='text'>
The ChromeOS Embedded Controller has to be accessed by applications.
A virtual character device is used as an interface with user-space.

Extend the struct cros_ec_device with the fields needed by the driver
of this virtual character device.

Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.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>
</entry>
<entry>
<title>mfd: cros_ec: Use fixed size arrays to transfer data with the EC</title>
<updated>2015-02-26T23:44:52+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2015-02-02T11:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b84f2a4cd4a6f517a313261f6f7c8caae5696c6'/>
<id>urn:sha1:1b84f2a4cd4a6f517a313261f6f7c8caae5696c6</id>
<content type='text'>
The struct cros_ec_command will be used as an ioctl() argument for the
API to control the ChromeOS EC from user-space. So the data structure
has to be 64-bit safe to make it compatible between 32 and 64 avoiding
the need for a compat ioctl interface. Since pointers are self-aligned
to different byte boundaries, use fixed size arrays instead of pointers
for transferring ingoing and outgoing data with the Embedded Controller.

Also, re-arrange struct members by decreasing alignment requirements to
reduce the needing padding size.

Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.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>
</entry>
<entry>
<title>mfd: cros_ec: stop calling -&gt;cmd_xfer() directly</title>
<updated>2014-10-06T20:29:07+00:00</updated>
<author>
<name>Andrew Bresticker</name>
<email>abrestic@chromium.org</email>
</author>
<published>2014-09-18T15:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6551a76fff15056fde2342d0f7de41ee605264e'/>
<id>urn:sha1:a6551a76fff15056fde2342d0f7de41ee605264e</id>
<content type='text'>
Instead of having users of the ChromeOS EC call the interface-specific
cmd_xfer() callback directly, introduce a central cros_ec_cmd_xfer()
to use instead.  This will allow us to put all the locking and retry
logic in one place instead of duplicating it across the different
drivers.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Reviewed-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
