<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/platform/x86/surface3_power.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/platform/x86/surface3_power.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/platform/x86/surface3_power.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-30T10:26:50Z</updated>
<entry>
<title>platform/x86: surface3_power: Fix always true condition in mshw0011_space_handler()</title>
<updated>2020-03-30T10:26:50Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-30T10:26:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d878bdfba8ffda64265c921cf7497934a607f83a'/>
<id>urn:sha1:d878bdfba8ffda64265c921cf7497934a607f83a</id>
<content type='text'>
smatch warnings:
.../surface3_power.c:417 mshw0011_space_handler() warn: always true condition '(ret &gt;= 0) =&gt; +(0-u32max &gt;= 0)'

Refactor error handling returned by mshw0011_adp_psr() to avoid always
true condition.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Add missed headers</title>
<updated>2020-03-28T20:37:30Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-26T12:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dd4a93569bd3656ec9fac364a28a61dde9f162a9'/>
<id>urn:sha1:dd4a93569bd3656ec9fac364a28a61dde9f162a9</id>
<content type='text'>
We obviously are users of bits.h and types.h. Add them to the list.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Reformat GUID assignment</title>
<updated>2020-03-28T20:37:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-26T12:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3d8fc115a3493ef782a2864c6a42b165cefb9871'/>
<id>urn:sha1:3d8fc115a3493ef782a2864c6a42b165cefb9871</id>
<content type='text'>
For better readability reformat GUID assignment.
While here, add the comment how this GUID looks in a string representation.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Drop useless macro ACPI_PTR()</title>
<updated>2020-03-28T20:37:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-26T12:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f1f25fc89a28863766a9827907189ea75ef9215c'/>
<id>urn:sha1:f1f25fc89a28863766a9827907189ea75ef9215c</id>
<content type='text'>
Driver depends to ACPI, this marco always is evaluated to the parameter,
thus useless. Drop it for good.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Prefix POLL_INTERVAL with SURFACE_3</title>
<updated>2020-03-28T20:37:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-27T10:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fcbb1142fea32fed1d944992f57033cf90d0fb4a'/>
<id>urn:sha1:fcbb1142fea32fed1d944992f57033cf90d0fb4a</id>
<content type='text'>
For better namespace maintenance prefix POLL_INTERVAL macro with SURFACE_3.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Simplify mshw0011_adp_psr() to one liner</title>
<updated>2020-03-28T20:37:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-26T14:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=48978995950b2ebbebdc47623fe55c75f1633e40'/>
<id>urn:sha1:48978995950b2ebbebdc47623fe55c75f1633e40</id>
<content type='text'>
Refactor mshw0011_adp_psr() to be one liner.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Use dev_err() instead of pr_err()</title>
<updated>2020-03-28T20:37:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-26T12:19:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=74bef188eac103ecfeaf9cd48b86e12f2a2492af'/>
<id>urn:sha1:74bef188eac103ecfeaf9cd48b86e12f2a2492af</id>
<content type='text'>
We have device and we may use it to print messages.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: Drop unused structure definition</title>
<updated>2020-03-28T20:37:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-27T10:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c9c10913ea00111b7ce3304634e8131ec073495e'/>
<id>urn:sha1:c9c10913ea00111b7ce3304634e8131ec073495e</id>
<content type='text'>
As reported by kbuild bot the struct mshw0011_lookup in never used.
Drop its definition for good.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: surface3_power: MSHW0011 rev-eng implementation</title>
<updated>2020-03-26T12:09:09Z</updated>
<author>
<name>Blaž Hrastnik</name>
<email>blaz@mxxn.io</email>
</author>
<published>2020-03-21T15:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b1f81b496b0d14382a9cf160cc4dbdefb233f936'/>
<id>urn:sha1:b1f81b496b0d14382a9cf160cc4dbdefb233f936</id>
<content type='text'>
Patch was rebased on top of for-next. Thanks for your patience!

Blaž

I'm resubmitting this patch with review feedback addressed:

https://patchwork.kernel.org/patch/10584079/

The patch was previously not resubmitted because it required a change
that was reverted in the ACPICA. That has since been corrected:

https://github.com/acpica/acpica/commit/9159c09a2a5897a43f78c95cdffc160d399722c3

We've been using this patch for a while and user reports confirm that it
works:

https://github.com/linux-surface/linux-surface

Previous description follows.

&gt;8------------------------------------------------------8&lt;

The MSHW0011 device is a chip that replaces the battery firmware
by using ACPI operation regions on the Surface 3.
It is unclear whether or not the chip will be reused somewhere else
(under Windows, the chip is called "Surface Platform Power Driver"
and the driver is provided by Microsoft).

The values have been obtained by reverse engineering, and are subject to
errors. Looks like it works on overall pretty well.

I couldn't manage to get the IRQ correctly triggered, so I am using a
good old polling thread to check for changes. This is something
to be fixed in a later version.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=106231

Signed-off-by: Blaž Hrastnik &lt;blaz@mxxn.io&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Stephen Just &lt;stephenjust@gmail.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
</feed>
