<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/platform/chrome/wilco_ec, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/platform/chrome/wilco_ec?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/platform/chrome/wilco_ec?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-06-24T04:01:13Z</updated>
<entry>
<title>platform/chrome: wilco_ec: event: Fix typo in comment</title>
<updated>2022-06-24T04:01:13Z</updated>
<author>
<name>Jiang Jian</name>
<email>jiangjian@cdjrlc.com</email>
</author>
<published>2022-06-22T06:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3de7203115af2f3a76ffdb0c90a89ad99f4c4e04'/>
<id>urn:sha1:3de7203115af2f3a76ffdb0c90a89ad99f4c4e04</id>
<content type='text'>
Drop the redundant word 'the'.

Signed-off-by: Jiang Jian &lt;jiangjian@cdjrlc.com&gt;
Signed-off-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20220622061442.18242-1-jiangjian@cdjrlc.com
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -&gt; stream_open</title>
<updated>2021-03-30T16:25:22Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-02-07T09:08:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dbc334fb411f2e87ca0e812dc7ba13464aa89504'/>
<id>urn:sha1:dbc334fb411f2e87ca0e812dc7ba13464aa89504</id>
<content type='text'>
Eliminate the following coccicheck warning:
./drivers/platform/chrome/wilco_ec/telemetry.c:259:1-17: WARNING:
telem_fops: .read() and .write() have stream semantic; safe to change
nonseekable_open -&gt; stream_open.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Link: https://lore.kernel.org/r/1612688918-63132-1-git-send-email-yang.lee@linux.alibaba.com
</content>
</entry>
<entry>
<title>platform/chrome: Constify static attribute_group structs</title>
<updated>2021-01-20T15:19:17Z</updated>
<author>
<name>Rikard Falkeborn</name>
<email>rikard.falkeborn@gmail.com</email>
</author>
<published>2021-01-09T00:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d7c1fef7fdc769ee45771059da823c8840590472'/>
<id>urn:sha1:d7c1fef7fdc769ee45771059da823c8840590472</id>
<content type='text'>
The only usage of these is to print their name in a dev_err-message, and
to pass their address to sysfs_create_group() and sysfs_remove_group(),
both which takes pointers to const. Make them const to allow the compiler
to put them in read-only memory.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Link: https://lore.kernel.org/r/20210109001748.58036-1-rikard.falkeborn@gmail.com
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Provide correct output format to 'h1_gpio' file</title>
<updated>2020-04-13T14:36:54Z</updated>
<author>
<name>Bernardo Perez Priego</name>
<email>bernardo.perez.priego@intel.com</email>
</author>
<published>2020-04-02T22:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/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: event: Replace zero-length array with flexible-array member</title>
<updated>2020-03-22T10:15:28Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-03-20T23:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e0db7c42b05f7b9d76174db56d683f0ec4f206c1'/>
<id>urn:sha1:e0db7c42b05f7b9d76174db56d683f0ec4f206c1</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Platform data shouldn't include kernel.h</title>
<updated>2020-02-11T09:32:50Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-02-05T09:48:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8673e944b50ec6e5afd4f599cf12b2798b629f3d'/>
<id>urn:sha1:8673e944b50ec6e5afd4f599cf12b2798b629f3d</id>
<content type='text'>
Replace with appropriate types.h.

Also there is no need to include device.h, but mutex.h.
For the pointers to unknown structures use forward declarations.

In the *.c files we need to include all headers that provide APIs
being used in the module.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path</title>
<updated>2020-02-11T08:10:36Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2020-02-03T17:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0cbb4f9c69827decf56519c2f63918f16904ede5'/>
<id>urn:sha1:0cbb4f9c69827decf56519c2f63918f16904ede5</id>
<content type='text'>
It seems that we shouldn't try to include the include/linux/ path to
unaligned functions. Just include asm/unaligned.h instead so that we
don't run into compilation warnings like below.

   In file included from drivers/platform/chrome/wilco_ec/properties.c:8:0:
   include/linux/unaligned/le_memmove.h:7:19: error: redefinition of 'get_unaligned_le16'
    static inline u16 get_unaligned_le16(const void *p)
                      ^~~~~~~~~~~~~~~~~~
   In file included from arch/ia64/include/asm/unaligned.h:5:0,
                    from arch/ia64/include/asm/io.h:23,
                    from arch/ia64/include/asm/smp.h:21,
                    from include/linux/smp.h:68,
                    from include/linux/percpu.h:7,
                    from include/linux/arch_topology.h:9,
                    from include/linux/topology.h:30,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/platform_data/wilco-ec.h:11,
                    from drivers/platform/chrome/wilco_ec/properties.c:6:
   include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here
    static inline u16 get_unaligned_le16(const void *p)
                      ^~~~~~~~~~~~~~~~~~
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Fixes: 60fb8a8e93ca ("platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST</title>
<updated>2020-01-22T09:10:44Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2020-01-22T01:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=60fb8a8e93ca94e752a509bb3f6f74068ccca739'/>
<id>urn:sha1:60fb8a8e93ca94e752a509bb3f6f74068ccca739</id>
<content type='text'>
Enable this Kconfig on COMPILE_TEST enabled configs so we can get more
build coverage.

Signed-off-by: Stephen Boyd &lt;swboyd@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 newlines to printks</title>
<updated>2020-01-22T09:10:44Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2020-01-22T00:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a532149c992eed9f8523d4ed5960b0068f213cd7'/>
<id>urn:sha1:a532149c992eed9f8523d4ed5960b0068f213cd7</id>
<content type='text'>
printk messages all require newlines, or it looks very odd in the log
when messages are not on different lines. Add them.

Cc: Nick Crews &lt;ncrews@chromium.org&gt;
Cc: Daniel Campello &lt;campello@chromium.org&gt;
Cc: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'chrome-platform-5.5-fixes' into for-kernelci</title>
<updated>2020-01-10T23:08:35Z</updated>
<author>
<name>Benson Leung</name>
<email>bleung@chromium.org</email>
</author>
<published>2020-01-10T23:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3b0bfd33ffb21dff369afaa8b1e4a6f25407ff38'/>
<id>urn:sha1:3b0bfd33ffb21dff369afaa8b1e4a6f25407ff38</id>
<content type='text'>
Merge dfb9a8857f4d platform/chrome: wilco_ec: Fix keyboard backlight probing
from chrome-platform-5.5-fixes into chrome-platform-5.6 destined branch.

Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
</content>
</entry>
</feed>
