<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/platform/chrome/wilco_ec/debugfs.c, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-10-28T08:48:34+00:00</updated>
<entry>
<title>platform/chrome: Switch back to struct platform_driver::remove()</title>
<updated>2024-10-28T08:48:34+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-28T08:26:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea45f3f46734a47bdbcfb31f41748484219d2ea6'/>
<id>urn:sha1:ea45f3f46734a47bdbcfb31f41748484219d2ea6</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/platform/chrome to use
.remove(), with the eventual goal to drop struct
platform_driver::remove_new(). As .remove() and .remove_new() have the
same prototypes, conversion is done by just changing the structure
member name in the driver initializer.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/20241028082611.431723-2-u.kleine-koenig@baylibre.com
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>[tree-wide] finally take no_llseek out</title>
<updated>2024-09-27T15:18:43+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-09-27T01:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb787f4ac0c2e439ea8d7e6387b925f74576bdf8'/>
<id>urn:sha1:cb787f4ac0c2e439ea8d7e6387b925f74576bdf8</id>
<content type='text'>
no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\&lt;no_llseek\&gt;/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match</title>
<updated>2024-04-24T08:45:58+00:00</updated>
<author>
<name>Tzung-Bi Shih</name>
<email>tzungbi@kernel.org</email>
</author>
<published>2024-03-29T07:56:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30afa63e7a29217034c3d36208cefe3773af5c6d'/>
<id>urn:sha1:30afa63e7a29217034c3d36208cefe3773af5c6d</id>
<content type='text'>
Instead of using fallback driver name match, provide ID table[1] for the
primary match.

[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353

Reviewed-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Link: https://lore.kernel.org/r/20240329075630.2069474-17-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome/wilco_ec: debugfs: Convert to platform remove callback returning void</title>
<updated>2023-09-28T05:18:07+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-27T08:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1fca58f347d8a958bd708a98c0e478e65ab48408'/>
<id>urn:sha1:1fca58f347d8a958bd708a98c0e478e65ab48408</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230927081040.2198742-12-u.kleine-koenig@pengutronix.de
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: remove return value check of debugfs_create_dir()</title>
<updated>2023-04-24T05:35:12+00:00</updated>
<author>
<name>Zhengkang Huang</name>
<email>zkhuang@hust.edu.cn</email>
</author>
<published>2023-04-19T10:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d184d60aa301e424cd0cf7de90b40744710a2417'/>
<id>urn:sha1:d184d60aa301e424cd0cf7de90b40744710a2417</id>
<content type='text'>
Smatch complains that:
wilco_ec_debugfs_probe() warn: 'debug_info-&gt;dir' is an error
pointer or valid

Debugfs checks are generally not supposed to be checked
for errors and it is not necessary here.

Just delete the dead code.

Signed-off-by: Zhengkang Huang &lt;zkhuang@hust.edu.cn&gt;
Reviewed-by: Dongliang Mu &lt;dzm91@hust.edu.cn&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20230419100303.343379-1-zkhuang@hust.edu.cn
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Provide correct output format to 'h1_gpio' file</title>
<updated>2020-04-13T14:36:54+00:00</updated>
<author>
<name>Bernardo Perez Priego</name>
<email>bernardo.perez.priego@intel.com</email>
</author>
<published>2020-04-02T22:33:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad35da94b61785ddc1186095c3e488c5c0af6bd2'/>
<id>urn:sha1:ad35da94b61785ddc1186095c3e488c5c0af6bd2</id>
<content type='text'>
Function 'h1_gpio_get' is receiving 'val' parameter of type u64,
this is being passed to 'send_ec_cmd' as type u8, thus, result
is stored in least significant byte. Due to output format,
the whole 'val' value was being displayed when any of the most
significant bytes are different than zero.

This fix will make sure only least significant byte is displayed
regardless of remaining bytes value.

Signed-off-by: Bernardo Perez Priego &lt;bernardo.perez.priego@intel.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Add debugfs test_event file</title>
<updated>2019-10-01T16:07:28+00:00</updated>
<author>
<name>Daniel Campello</name>
<email>campello@chromium.org</email>
</author>
<published>2019-09-24T20:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6679fd1e2fc253f62bbea13b76d9b6a8f90c68e'/>
<id>urn:sha1:e6679fd1e2fc253f62bbea13b76d9b6a8f90c68e</id>
<content type='text'>
This change introduces a new debugfs file 'test_event' that when written
to causes the EC to generate a test event.
This adds a second sub cmd for the test event, and pulls out send_ec_cmd
to be a common helper between h1_gpio_get and test_event_set.

Signed-off-by: Daniel Campello &lt;campello@chromium.org&gt;
Reviewed-by: Benson Leung &lt;bleung@chromium.org&gt;
Reviewed-by: Nick Crews &lt;ncrews@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Add telemetry char device interface</title>
<updated>2019-06-05T08:14:50+00:00</updated>
<author>
<name>Nick Crews</name>
<email>ncrews@chromium.org</email>
</author>
<published>2019-05-21T19:20:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1210d1e6bad1e7ccccb19627b880a50d7c15dd51'/>
<id>urn:sha1:1210d1e6bad1e7ccccb19627b880a50d7c15dd51</id>
<content type='text'>
The Wilco Embedded Controller is able to send telemetry data
which is useful for enterprise applications. A daemon running on
the OS sends a command to the EC via a write() to a char device,
and can read the response with a read(). The write() request is
verified by the driver to ensure that it is performing only one
of the whitelisted commands, and that no extraneous data is
being transmitted to the EC. The response is passed directly
back to the reader with no modification.

The character device will appear as /dev/wilco_telemN, where N
is some small non-negative integer, starting with 0. Only one
process may have the file descriptor open at a time. The calling
userspace program needs to keep the device file descriptor open
between the calls to write() and read() in order to preserve the
response. Up to 32 bytes will be available for reading.

For testing purposes, try requesting the EC's firmware build
date, by sending the WILCO_EC_TELEM_GET_VERSION command with
argument index=3. i.e. write [0x38, 0x00, 0x03]
to the device node. An ASCII string of the build date is
returned.

Signed-off-by: Nick Crews &lt;ncrews@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Remove 256 byte transfers</title>
<updated>2019-05-20T08:18:10+00:00</updated>
<author>
<name>Nick Crews</name>
<email>ncrews@chromium.org</email>
</author>
<published>2019-05-08T21:38:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ad1f7a91449de48d4bd5d1ec361ba7bb9026505'/>
<id>urn:sha1:2ad1f7a91449de48d4bd5d1ec361ba7bb9026505</id>
<content type='text'>
The 0xF6 command, intended to send and receive 256 byte payloads to
and from the EC, is not needed. The 0xF5 command for 32 byte
payloads is sufficient. This patch removes support for the 0xF6
command and 256 byte payloads.

Signed-off-by: Nick Crews &lt;ncrews@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Add h1_gpio status to debugfs</title>
<updated>2019-04-16T09:00:36+00:00</updated>
<author>
<name>Nick Crews</name>
<email>ncrews@chromium.org</email>
</author>
<published>2019-04-12T18:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e2b0e0be64227ba8f09008d32d75280595a5464'/>
<id>urn:sha1:9e2b0e0be64227ba8f09008d32d75280595a5464</id>
<content type='text'>
As part of Chrome OS's FAFT (Fully Automated Firmware Testing)
tests, we need to ensure that the H1 chip is properly setting
some GPIO lines. The h1_gpio attribute exposes the state
of the lines:
- ENTRY_TO_FACT_MODE in BIT(0)
- SPI_CHROME_SEL in BIT(1)

There are two reasons that I am exposing this in debugfs,
and not as a GPIO:
1. This is only useful for testing, so end users shouldn't ever
care about this. In fact, if it passes the tests, then the value of
h1_gpio will always be 2, so it would be really uninteresting for users.
2. This GPIO is not connected to, controlled by, or really even related
to the AP. The GPIO runs between the EC and the H1 security chip.

Changes in v4:
- Use "0x02x\n" instead of "02x\n" for format string
- Use DEFINE_DEBUGFS_ATTRIBUTE()
- Add documentation
Changes in v3:
- Fix documentation to correspond with formatting change in v2.
Changes in v2:
- Zero out the unused fields in the request.
- Format result as "%02x\n" instead of as a decimal.

Signed-off-by: Nick Crews &lt;ncrews@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
</feed>
