<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/platform/chrome, branch v6.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-07-21T08:49:28Z</updated>
<entry>
<title>platform/chrome: cros_kunit_util: add default value for `msg-&gt;result`</title>
<updated>2022-07-21T08:49:28Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-07-20T04:47:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=afef1e1a0223623d063a6df51dbc342c9517b948'/>
<id>urn:sha1:afef1e1a0223623d063a6df51dbc342c9517b948</id>
<content type='text'>
Add default value for `msg-&gt;result` so that it won't be garbage bytes
when the mock list is empty.

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/20220720044754.4026295-3-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: merge Kunit utils and test cases</title>
<updated>2022-07-21T08:49:28Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-07-20T04:47:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f92dd1475b0644b4779eed6f937a1eebfb80d53d'/>
<id>urn:sha1:f92dd1475b0644b4779eed6f937a1eebfb80d53d</id>
<content type='text'>
Merge CROS_KUNIT and CROS_EC_PROTO_KUNIT_TEST so that when they're built
as modules cros_kunit_util doesn't need to export the symbols.

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/20220720044754.4026295-2-tzungbi@kernel.org
</content>
</entry>
<entry>
<title>platform/chrome: cros_kbd_led_backlight: fix build warning</title>
<updated>2022-07-20T01:22:59Z</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2022-07-18T10:50:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e76e4bc00999846c17604dc25486fffa542078d'/>
<id>urn:sha1:7e76e4bc00999846c17604dc25486fffa542078d</id>
<content type='text'>
drivers/platform/chrome/cros_kbd_led_backlight.c got a new build warning
when using the randconfig in [1]:
&gt;&gt;&gt; warning: unused variable 'keyboard_led_drvdata_ec_pwm'

The warning happens when CONFIG_CROS_EC is set but CONFIG_OF is not set.
Reproduce:
- mkdir build_dir
- wget [1] -O build_dir/.config
- COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 \
  O=build_dir ARCH=s390 SHELL=/bin/bash drivers/platform/chrome/

Fix the warning by using __maybe_unused.  Also use IS_ENABLED() because
CROS_EC is a tristate.

[1]: https://download.01.org/0day-ci/archive/20220717/202207170538.MR39dw8m-lkp@intel.com/config

Fixes: 40f58143745e ("platform/chrome: cros_kbd_led_backlight: support EC PWM backend")
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;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20220718105047.2356542-1-tzungbi@kernel.org
</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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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>
<entry>
<title>platform/chrome: cros_ec_proto: add Kunit tests for cmd_xfer_status</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:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74bed42fd5fa4d3ac9883b27b0d761564f3b9bf9'/>
<id>urn:sha1:74bed42fd5fa4d3ac9883b27b0d761564f3b9bf9</id>
<content type='text'>
cros_ec_cmd_xfer_status() calls cros_ec_cmd_xfer() and cros_ec_map_error().

Given that there are already test cases for cros_ec_cmd_xfer(), only add
basic Kunit tests for 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-2-tzungbi@kernel.org
</content>
</entry>
</feed>
