<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/platform/chrome/cros_ec_ishtp.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-12-06T10:33:46Z</updated>
<entry>
<title>platform/chrome: cros_ec_ishtp: use helper functions for connection</title>
<updated>2023-12-06T10:33:46Z</updated>
<author>
<name>Even Xu</name>
<email>even.xu@intel.com</email>
</author>
<published>2023-12-05T01:50:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=42a244be36cda2da571c72feb5d1d2b45866735f'/>
<id>urn:sha1:42a244be36cda2da571c72feb5d1d2b45866735f</id>
<content type='text'>
Use helper functions ishtp_cl_establish_connection() and
ishtp_cl_destroy_connection() to establish and destroy connection
respectively. These functions are used during initialization, reset and
deinitialization flows.

No functional changes are expected.

Signed-off-by: Even Xu &lt;even.xu@intel.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: correct cros_ec_prepare_tx() usage</title>
<updated>2022-05-16T02:01:51Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-05-13T04:41:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=71d3ae7fb6404c87b498f8b7f86b8271dd74989f'/>
<id>urn:sha1:71d3ae7fb6404c87b498f8b7f86b8271dd74989f</id>
<content type='text'>
cros_ec_prepare_tx() returns either:
- &gt;= 0 for number of prepared bytes.
- &lt; 0 for -errno.

Correct the comment and make sure all callers check the return code.

Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220513044143.1045728-3-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>HID: intel-ish-hid: fix module device-id handling</title>
<updated>2021-11-11T21:45:40Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-11-11T08:56:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf9167a8b40c9cf463521da05342db81808c1b6e'/>
<id>urn:sha1:bf9167a8b40c9cf463521da05342db81808c1b6e</id>
<content type='text'>
A late addititon to the intel-ish-hid framework caused a build failure
with clang, and introduced an ABI to the module loader that stops working
if any driver ever needs to bind to more than one UUID:

drivers/hid/intel-ish-hid/ishtp-fw-loader.c:1067:4: error: initializer element is not a compile-time constant

Change the ishtp_device_id to have correct documentation and a driver_data
field like all the other ones, and change the drivers to use the ID table
as the primary identification in a way that works with all compilers
and avoids duplciating the identifiers.

Fixes: f155dfeaa4ee ("platform/x86: isthp_eclite: only load for matching devices")
Fixes: facfe0a4fdce ("platform/chrome: chros_ec_ishtp: only load for matching devices")
Fixes: 0d0cccc0fd83 ("HID: intel-ish-hid: hid-client: only load for matching devices")
Fixes: 44e2a58cb880 ("HID: intel-ish-hid: fw-loader: only load for matching devices")
Fixes: cb1a2c6847f7 ("HID: intel-ish-hid: use constants for modaliases")
Fixes: fa443bc3c1e4 ("HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
[jkosina@suse.cz: fix ecl_ishtp_cl_driver.id initialization]
[jkosina@suse.cz: fix conflict with already fixed kerneldoc]
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>platform/chrome: chros_ec_ishtp: only load for matching devices</title>
<updated>2021-11-09T10:41:47Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2021-10-29T15:29:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=facfe0a4fdce3f545a4a883358eda3078b0425c7'/>
<id>urn:sha1:facfe0a4fdce3f545a4a883358eda3078b0425c7</id>
<content type='text'>
Previously it was loaded for all ISHTP devices.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: intel-ish-hid: Make remove callback return void</title>
<updated>2021-03-08T16:16:03Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2021-02-06T15:13:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e71da1fd0e84bc5c87a78b405e40713840eecc80'/>
<id>urn:sha1:e71da1fd0e84bc5c87a78b405e40713840eecc80</id>
<content type='text'>
The driver core ignores the return value of struct bus_type::remove()
because there is only little that can be done. To simplify the quest to
make this function return void, let struct ishtp_cl_driver::remove() return
void, too. All users already unconditionally return 0, this commit makes
it obvious that returning an error value is a bad idea.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec: Call interrupt bottom half in ISH or RPMSG mode</title>
<updated>2021-01-22T07:50:27Z</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2021-01-22T05:46:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=24c69043be1725606e876b47d496a0f9f87d176a'/>
<id>urn:sha1:24c69043be1725606e876b47d496a0f9f87d176a</id>
<content type='text'>
Call the same bottom half for all EC protocols (threaded code).

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Link: https://lore.kernel.org/r/20210122054637.1422289-2-gwendal@chromium.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_ishtp: Fix a double-unlock issue</title>
<updated>2020-06-30T09:41:25Z</updated>
<author>
<name>Qiushi Wu</name>
<email>wu000273@umn.edu</email>
</author>
<published>2020-05-23T03:16:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aaa3cbbac326c95308e315f1ab964a3369c4d07d'/>
<id>urn:sha1:aaa3cbbac326c95308e315f1ab964a3369c4d07d</id>
<content type='text'>
In function cros_ec_ishtp_probe(), "up_write" is already called
before function "cros_ec_dev_init". But "up_write" will be called
again after the calling of the function "cros_ec_dev_init" failed.
Thus add a call of the function “down_write” in this if branch
for the completion of the exception handling.

Fixes: 26a14267aff2 ("platform/chrome: Add ChromeOS EC ISHTP driver")
Signed-off-by: Qiushi Wu &lt;wu000273@umn.edu&gt;
Tested-by: Mathew King &lt;mathewk@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_ishtp: free ishtp buffer before sending event</title>
<updated>2020-04-13T14:38:39Z</updated>
<author>
<name>Jett Rink</name>
<email>jettrink@chromium.org</email>
</author>
<published>2020-04-10T16:23:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fd167f7a4a6079c14a0c940e9103495b171279fb'/>
<id>urn:sha1:fd167f7a4a6079c14a0c940e9103495b171279fb</id>
<content type='text'>
Recycle the ISH buffer before notifying of a response or an event. Often
a new message is sent in response to an event and in high traffic
scenarios this can lead to exhausting all available buffers. We can
ensure we are using the fewest buffers possible by freeing buffers as
soon as they are used.

Signed-off-by: Jett Rink &lt;jettrink@chromium.org&gt;
Signed-off-by: Mathew King &lt;mathewk@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_ishtp: skip old cros_ec responses</title>
<updated>2020-04-13T14:36:54Z</updated>
<author>
<name>Jett Rink</name>
<email>jettrink@chromium.org</email>
</author>
<published>2020-04-10T16:23:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f706b4fac8b19fd0a4b4fef24dbadb23a3eb0c1'/>
<id>urn:sha1:0f706b4fac8b19fd0a4b4fef24dbadb23a3eb0c1</id>
<content type='text'>
The ISHTP layer can give us old responses that we already gave up on. We
do not want to interpret these old responses as the current response we
are waiting for.

The cros_ish should only have one request in flight at a time. We send
the request and wait for the response from the ISH. If the ISH is too
slow to respond we give up on that request and we can send a new
request. The ISH may still send the response to the request that timed
out and without this we treat the old response as the response to the
current command. This is a condition that should not normally happen but
it has been observed with a bad ISH image. So add a token to the request
header which is copied into the response header when the ISH processes
the message to ensure that response is for the current request.

Signed-off-by: Jett Rink &lt;jettrink@chromium.org&gt;
Signed-off-by: Mathew King &lt;mathewk@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>
</feed>
