<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/mfd/cros_ec.h, branch v4.1.14</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>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.toradex.cn/cgit/linux-toradex.git/commit/?id=05c11ac4e0712def44cccbff82ad980d9e1d1b80'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=1b84f2a4cd4a6f517a313261f6f7c8caae5696c6'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=a6551a76fff15056fde2342d0f7de41ee605264e'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Move EC interrupt to cros_ec_keyb</title>
<updated>2014-07-09T13:58:20+00:00</updated>
<author>
<name>Andrew Bresticker</name>
<email>abrestic@chromium.org</email>
</author>
<published>2014-06-18T18:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d1fd345e2087f0362c92bd3b0a1cea7fe636ac3a'/>
<id>d1fd345e2087f0362c92bd3b0a1cea7fe636ac3a</id>
<content type='text'>
If we receive EC interrupts after the cros_ec driver has probed, but
before the cros_ec_keyb driver has probed, the cros_ec IRQ handler
will not run the cros_ec_keyb notifier and the EC will leave the IRQ
line asserted.  The cros_ec IRQ handler then returns IRQ_HANDLED and
the resulting flood of interrupts causes the machine to hang.

Since the EC interrupt is currently only used for the keyboard, move
the setup and handling of the EC interrupt to the cros_ec_keyb driver.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we receive EC interrupts after the cros_ec driver has probed, but
before the cros_ec_keyb driver has probed, the cros_ec IRQ handler
will not run the cros_ec_keyb notifier and the EC will leave the IRQ
line asserted.  The cros_ec IRQ handler then returns IRQ_HANDLED and
the resulting flood of interrupts causes the machine to hang.

Since the EC interrupt is currently only used for the keyboard, move
the setup and handling of the EC interrupt to the cros_ec_keyb driver.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: ec_dev-&gt;cmd_xfer() returns number of bytes received from EC</title>
<updated>2014-07-09T13:58:20+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-06-18T18:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=12ebc8a50bc54e3a6fe207861fc6793181f9c2dc'/>
<id>12ebc8a50bc54e3a6fe207861fc6793181f9c2dc</id>
<content type='text'>
When communicating with the EC, the cmd_xfer() function should return the
number of bytes it received from the EC, or negative on error.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When communicating with the EC, the cmd_xfer() function should return the
number of bytes it received from the EC, or negative on error.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Check result code from EC messages</title>
<updated>2014-07-09T13:58:19+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-06-18T18:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6db07b6336589ff480528173e41f8f6af3f0097f'/>
<id>6db07b6336589ff480528173e41f8f6af3f0097f</id>
<content type='text'>
Just because the host was able to talk to the EC doesn't mean that the EC
was happy with what it was told. Errors in communincation are not the same
as error messages from the EC itself.

This change lets the EC report its errors separately.

[dianders: Added common function to cros_ec.c]

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just because the host was able to talk to the EC doesn't mean that the EC
was happy with what it was told. Errors in communincation are not the same
as error messages from the EC itself.

This change lets the EC report its errors separately.

[dianders: Added common function to cros_ec.c]

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: cleanup: Remove EC wrapper functions</title>
<updated>2014-07-09T13:58:18+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-06-18T18:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5799f95a373a2752e5c732f531a6f40fe458b818'/>
<id>5799f95a373a2752e5c732f531a6f40fe458b818</id>
<content type='text'>
Remove the three wrapper functions that talk to the EC without passing all
the desired arguments and just use the underlying communication function
that passes everything in a struct intead.

This is internal code refactoring only. Nothing should change.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the three wrapper functions that talk to the EC without passing all
the desired arguments and just use the underlying communication function
that passes everything in a struct intead.

This is internal code refactoring only. Nothing should change.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: cleanup: remove unused fields from struct cros_ec_device</title>
<updated>2014-07-09T13:58:18+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-06-18T18:14:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=533cec8f34778de10412dfabac991cf458ebf3c9'/>
<id>533cec8f34778de10412dfabac991cf458ebf3c9</id>
<content type='text'>
struct cros_ec_device has a superfluous "name" field. We can get all the
debugging info we need from the existing ec_name and phys_name fields, so
let's take out the extra field.

The printout also has sufficient info in it without explicitly adding
the transport.  Before this change:
  cros-ec-spi spi2.0: Chrome EC (SPI)

After this change:
  cros-ec-spi spi2.0: Chrome EC device registered

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
struct cros_ec_device has a superfluous "name" field. We can get all the
debugging info we need from the existing ec_name and phys_name fields, so
let's take out the extra field.

The printout also has sufficient info in it without explicitly adding
the transport.  Before this change:
  cros-ec-spi spi2.0: Chrome EC (SPI)

After this change:
  cros-ec-spi spi2.0: Chrome EC device registered

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Use struct cros_ec_command to communicate with the EC</title>
<updated>2014-07-09T13:58:17+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-06-18T18:14:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d4773e27e8ab37491767a6ef99ffd7100fe6341'/>
<id>5d4773e27e8ab37491767a6ef99ffd7100fe6341</id>
<content type='text'>
This is some internal structure reorganization / renaming to prepare
for future patches that will add a userspace API to cros_ec.  There
should be no visible changes.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is some internal structure reorganization / renaming to prepare
for future patches that will add a userspace API to cros_ec.  There
should be no visible changes.

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: cros_ec: Tweak struct cros_ec_device for clarity</title>
<updated>2014-07-09T13:58:16+00:00</updated>
<author>
<name>Bill Richardson</name>
<email>wfrichar@chromium.org</email>
</author>
<published>2014-06-18T18:14:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7e6cb5b4dbbc4b1d98289c88d0bc4092cac328be'/>
<id>7e6cb5b4dbbc4b1d98289c88d0bc4092cac328be</id>
<content type='text'>
The members of struct cros_ec_device were improperly commented, and
intermixed the private and public sections. This is just cleanup to make it
more obvious what goes with what.

[dianders: left lock in the structure but gave it the name that will
eventually be used.]

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The members of struct cros_ec_device were improperly commented, and
intermixed the private and public sections. This is just cleanup to make it
more obvious what goes with what.

[dianders: left lock in the structure but gave it the name that will
eventually be used.]

Signed-off-by: Bill Richardson &lt;wfrichar@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
