<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/platform_data/cros_ec_proto.h, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-10-29T22:22:59Z</updated>
<entry>
<title>platform/chrome: cros_ec_proto: Replace zero-length array with flexible-array member</title>
<updated>2020-10-29T22:22:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-08-31T15:21:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=120088832042e6dc9866160ff267f8c347bf53e6'/>
<id>urn:sha1:120088832042e6dc9866160ff267f8c347bf53e6</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code should
always use “flexible array members”[1] for these cases. The older style of
one-element or zero-length arrays should no longer be used[2].

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: Do not export cros_ec_cmd_xfer()</title>
<updated>2020-07-23T08:12:23Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2020-06-15T20:35:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c1e18d4fb9590268105e724444792656fcb3927d'/>
<id>urn:sha1:c1e18d4fb9590268105e724444792656fcb3927d</id>
<content type='text'>
Now that all the remaining users of cros_ec_cmd_xfer() has been removed,
make this function private to the cros_ec_proto module.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW</title>
<updated>2020-02-11T09:32:54Z</updated>
<author>
<name>Yicheng Li</name>
<email>yichengli@chromium.org</email>
</author>
<published>2020-02-03T22:53:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=42cd0ab476e2daffc23982c37822a78f9a53cdd5'/>
<id>urn:sha1:42cd0ab476e2daffc23982c37822a78f9a53cdd5</id>
<content type='text'>
RO and RW of EC may have different EC protocol version. If EC transitions
between RO and RW, but AP does not reboot (this is true for fingerprint
microcontroller / cros_fp, but not true for main ec / cros_ec), the AP
still uses the protocol version queried before transition, which can
cause problems. In the case of fingerprint microcontroller, this causes
AP to send the wrong version of EC_CMD_GET_NEXT_EVENT to RO in the
interrupt handler, which in turn prevents RO to clear the interrupt
line to AP, in an infinite loop.

Once an EC_HOST_EVENT_INTERFACE_READY is received, we know that there
might have been a transition between RO and RW, so re-query the protocol.

Signed-off-by: Yicheng Li &lt;yichengli@chromium.org&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: Match implementation with headers</title>
<updated>2020-02-03T16:14:50Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2020-01-22T09:07:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=034dbec179e5d2820480f477c43acbc50245e56d'/>
<id>urn:sha1:034dbec179e5d2820480f477c43acbc50245e56d</id>
<content type='text'>
The 'cros_ec' core driver is the common interface for the cros_ec
transport drivers to do the shared operations to register, unregister,
suspend, resume and handle_event. The interface is provided by including
the header 'include/linux/platform_data/cros_ec_proto.h', however, instead
of have the implementation of these functions in cros_ec_proto.c, it is in
'cros_ec.c', which is a different kernel module. Apart from being a bad
practice, this can induce confusions allowing the users of the cros_ec
protocol to call these functions.

The register, unregister, suspend, resume and handle_event functions
*should* only be called by the different transport drivers (i2c, spi, lpc,
etc.), so make this a bit less confusing by moving these functions from
the public in-kernel space to a private include in platform/chrome, and
then, the interface for cros_ec module and for the cros_ec_proto module is
clean.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h'</title>
<updated>2020-01-07T16:36:46Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2019-12-03T14:50:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=11f1eabee0ba0aafe023ad92d1e3c29d0a96683e'/>
<id>urn:sha1:11f1eabee0ba0aafe023ad92d1e3c29d0a96683e</id>
<content type='text'>
This header file now only includes the cros_ec_dev struct, however, is the
'include/linux/platform_data/cros_ec_proto.h' who contains the definition of
all the Chrome OS EC related structs. There is no reason to have a
separate include for this struct so move to the place where other
structs are defined. That way, we can remove the include itself, but also
simplify the common pattern

    #include &lt;linux/mfd/cros_ec.h&gt;
    #include &lt;linux/platform_data/cros_ec_proto.h&gt;

for a single include

    #include &lt;linux/platform_data/cros_ec_proto.h&gt;

The changes to remove the cros_ec.h include were generated with the
following shell script:

    git grep -l "&lt;linux/mfd/cros_ec.h&gt;" | xargs sed -i '/&lt;linux\/mfd\/cros_ec.h&gt;/d'

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Acked-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: handle MKBP more events flag</title>
<updated>2019-11-21T10:23:15Z</updated>
<author>
<name>Enrico Granata</name>
<email>egranata@chromium.org</email>
</author>
<published>2019-11-19T12:45:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3300fdd630d4d3d96e3ba9af63a740d3a4e8fc61'/>
<id>urn:sha1:3300fdd630d4d3d96e3ba9af63a740d3a4e8fc61</id>
<content type='text'>
The ChromeOS EC has support for signaling to the host that a single IRQ
can serve multiple MKBP (Matrix KeyBoard Protocol) events.

Doing this serves an optimization purpose, as it minimizes the number of
round-trips into the interrupt handling machinery, and it proves
beneficial to sensor timestamping as it keeps the desired synchronization
of event times between the two processors.

This patch adds kernel support for this EC feature, allowing the ec_irq
to loop until all events have been served.

Signed-off-by: Enrico Granata &lt;egranata@chromium.org&gt;
Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros-ec: Record event timestamp in the hard irq</title>
<updated>2019-11-21T10:23:14Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2019-11-19T12:45:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1'/>
<id>urn:sha1:05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1</id>
<content type='text'>
To improve sensor timestamp precision, given EC and AP are in different
time domains, the AP needs to try to record the exact moment an event
was signalled to the AP by the EC as soon as possible after it happens.

First thing in the hard irq is the best place for this.

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@kernel.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>mfd / platform / iio: cros_ec: Register sensor through sensorhub</title>
<updated>2019-11-21T10:23:14Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2019-11-19T12:45:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d60ac88a62df71cb12b2d60d2dae5658fb4eab43'/>
<id>urn:sha1:d60ac88a62df71cb12b2d60d2dae5658fb4eab43</id>
<content type='text'>
Remove the duplicated code in MFD, since MFD just registers cros-ec-sensorhub
if at least one sensor is present.

Change IIO cros-ec driver to get the pointer to the cros-ec-dev through
cros-ec-sensorhub.

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>mfd / platform: cros_ec: Add sensor_count and make check_features public</title>
<updated>2019-11-21T10:23:13Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2019-11-19T12:45:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a16b2e28190255a0729c27902fa88fb8fff39bb0'/>
<id>urn:sha1:a16b2e28190255a0729c27902fa88fb8fff39bb0</id>
<content type='text'>
Add a new function to return the number of MEMS sensors available in a
ChromeOS Embedded Controller. It uses MOTIONSENSE_CMD_DUMP if available
or a specific memory map ACPI registers to find out.

Also, make check_features public as it can be useful for other drivers
to know what the Embedded Controller supports.

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: Put docs with the code</title>
<updated>2019-11-21T10:23:13Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2019-11-19T12:45:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c9b465683a554212c3dd92915ed2088849c513bf'/>
<id>urn:sha1:c9b465683a554212c3dd92915ed2088849c513bf</id>
<content type='text'>
To avoid doc rot, put function documentations with code, not header.
Use kernel-doc style comments for exported functions.

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
</feed>
