<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/platform/chrome/cros_ec_proto_test.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-10-05T10:11:36Z</updated>
<entry>
<title>platform/chrome: kunit: make EC protocol tests independent</title>
<updated>2023-10-05T10:11:36Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2023-10-03T08:05:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=466f70fb1b10fd139582646285e587fb38a9ff2c'/>
<id>urn:sha1:466f70fb1b10fd139582646285e587fb38a9ff2c</id>
<content type='text'>
Remove CONFIG_CROS_KUNIT and common code concept for ChromeOS Kunit but
make it bundle to ChromeOS EC protocol tests.

Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20231003080515.4011374-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: kunit: initialize lock for fake ec_dev</title>
<updated>2023-10-05T10:10:49Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2023-10-03T08:05:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e410b4ade83d06a046f6e32b5085997502ba0559'/>
<id>urn:sha1:e410b4ade83d06a046f6e32b5085997502ba0559</id>
<content type='text'>
cros_ec_cmd_xfer() uses ec_dev-&gt;lock.  Initialize it.

Otherwise, dmesg shows the following:
&gt; DEBUG_LOCKS_WARN_ON(lock-&gt;magic != lock)
&gt; ...
&gt; Call Trace:
&gt;  ? __mutex_lock
&gt;  ? __warn
&gt;  ? __mutex_lock
&gt;  ...
&gt;  ? cros_ec_cmd_xfer

Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20231003080504.4011337-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: remove big stub objects from stack</title>
<updated>2023-01-18T02:57:56Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2023-01-17T08:02:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6514bac4a321daaf2fdf3a116a644c77e4908f20'/>
<id>urn:sha1:6514bac4a321daaf2fdf3a116a644c77e4908f20</id>
<content type='text'>
sizeof(struct device) = 680
sizeof(struct cros_ec_dev) = 720

They tend to exceed the stack frame size limit in some specific
environment which results in the following compilation error:

&gt;&gt; drivers/platform/chrome/cros_ec_proto_test.c:2530:13: error: stack
frame size (2128) exceeds limit (2048) in
'cros_ec_proto_test_get_sensor_count_legacy'

Remove the big stub objects from stack.

This is:
$ sed -i 's/struct cros_ec_dev /static struct cros_ec_dev /' \
    drivers/platform/chrome/cros_ec_proto_test.c

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20230117080254.2725536-1-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: Use asm instead of asm-generic</title>
<updated>2023-01-05T15:27:14Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-01-03T14:50:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aaab5af4b226dce54cb8675dac1ffa359ec90872'/>
<id>urn:sha1:aaab5af4b226dce54cb8675dac1ffa359ec90872</id>
<content type='text'>
There is no point to specify asm-generic for the unaligned.h.
Drop the 'generic' suffix.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
[tzungbi: s/intead/instead/ in commit title.]
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20230103145023.40055-1-andriy.shevchenko@linux.intel.com
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit test for cros_ec_cmd()</title>
<updated>2022-07-20T01:22:59Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-06-22T04:10:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9399b2cb20702fde2a5f9c6aec9cd70d21d40a00'/>
<id>urn:sha1:9399b2cb20702fde2a5f9c6aec9cd70d21d40a00</id>
<content type='text'>
cros_ec_cmd() is a wrapper of cros_ec_cmd_xfer_status().

Add Kunit test for cros_ec_cmd().

Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220622041040.202737-8-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit tests for get_sensor_count</title>
<updated>2022-07-20T01:22:59Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-06-22T04:10:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=33f0fdba6066b504ee0b5f1480b1f93b06050df6'/>
<id>urn:sha1:33f0fdba6066b504ee0b5f1480b1f93b06050df6</id>
<content type='text'>
cros_ec_get_sensor_count() gets number of MEMS sensors.

Add Kunit tests for cros_ec_get_sensor_count().

Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220622041040.202737-7-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit tests for check_features</title>
<updated>2022-07-20T01:22:59Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-06-22T04:10:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=00238864435f97dc578cc8b2de7ecc95a1fca0b9'/>
<id>urn:sha1:00238864435f97dc578cc8b2de7ecc95a1fca0b9</id>
<content type='text'>
cros_ec_check_features() gets EC features if it hasn't had cache, and
checks whether the given EC_FEATURE_* is supported or not.

Add Kunit tests for cros_ec_check_features().

Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220622041040.202737-6-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit tests for get_host_event</title>
<updated>2022-07-20T01:22:59Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-06-22T04:10:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7cb1eb82642becd668665689c6eac2a639a81e1b'/>
<id>urn:sha1:7cb1eb82642becd668665689c6eac2a639a81e1b</id>
<content type='text'>
cros_ec_get_host_event() performs some sanity checks, parses
`ec_dev-&gt;event_data.data.host_event`, and returns bitmap of
EC_HOST_EVENT_*.

Add Kunit tests for cros_ec_get_host_event().

Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220622041040.202737-5-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit tests for get_next_event</title>
<updated>2022-07-20T01:22:58Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-06-22T04:10:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2b7ed927953f30eaae0e622c670dcddce3bd3aa4'/>
<id>urn:sha1:2b7ed927953f30eaae0e622c670dcddce3bd3aa4</id>
<content type='text'>
cros_ec_get_next_event() gets events from EC.  It consists of 3
versions of event retrieval:

1. No MKBP event.
2. MKBP event version 0.
3. MKBP event version &gt;0.

Add Kunit tests for cros_ec_get_next_event().

Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220622041040.202737-4-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit test for cros_ec_map_error()</title>
<updated>2022-07-20T01:22:58Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-06-22T04:10:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1242688fc2f080530b6414ef5f1ae63fb548a6b0'/>
<id>urn:sha1:1242688fc2f080530b6414ef5f1ae63fb548a6b0</id>
<content type='text'>
cros_ec_cmd_xfer_status() is the only exported function that calls
static function cros_ec_map_error().

Add Kunit test for cros_ec_map_error() through calling
cros_ec_cmd_xfer_status().

Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220622041040.202737-3-tzungbi@kernel.org
</content>
</entry>
</feed>
