<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/acpi/battery.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-03-19T09:08:39Z</updated>
<entry>
<title>Revert "ACPI / battery: Add quirk for Asus GL502VSK and UX305LA"</title>
<updated>2018-03-19T09:08:39Z</updated>
<author>
<name>Daniel Drake</name>
</author>
<published>2018-03-14T08:42:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82bf43b291888599b4079244d12195d214086fa4'/>
<id>urn:sha1:82bf43b291888599b4079244d12195d214086fa4</id>
<content type='text'>
Revert commit c68f0676ef7d ("ACPI / battery: Add quirk for Asus
GL502VSK and UX305LA") and commit 4446823e2573 ("ACPI / battery: Add
quirk for Asus UX360UA and UX410UAK").

On many many Asus products, the battery is sometimes reported as
charging or discharging even when it is full and you are on AC power.
This change quirked the kernel to avoid advertising the discharging
state when this happens on 4 laptop models, under the belief that
this was incorrect information.  I presume it originates from user
reports who are confused that their battery status icon says that it
is discharging.

However, the reported information is indeed correct, and the quirk
approach taken is inadequate and more thought is needed first.
Specifically:

 1. It only quirks discharging state, not charging

 2. There are so many different Asus products and DMI naming variants
    within those product families that behave this way; Linux could
    grow to quirk hundreds of products and still not even be close at
    "winning" this battle.

 3. Asus previously clarified that this behaviour is intentional. The
    platform will periodically do a partial discharge/charge cycle
    when the battery is full, because this is one way to extend the
    lifetime of the battery (leaving a battery at 100% charge and
    unused will decrease its usable capacity over time).

    My understanding is that any decent consumer product will have
    this behaviour, but it appears that Asus is different in that
    they expose this info through ACPI.

    However, the behaviour seems correct. The ACPI spec does not
    suggest in that the platform should hide the truth.  It lets you
    report that the battery is full of charge, and discharging, and
    with external power connected; and Asus does this.

 4. In terms of not confusing the user, this seems like something that
    could/should be handled by userspace, which can also detect these
    same (accurate) conditions in the general case.

Revert this quirk before it gets included in a release, while we look
for better approaches.

Signed-off-by: Daniel Drake &lt;drake@endlessm.com&gt;
Acked-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / battery: Add quirk for Asus UX360UA and UX410UAK</title>
<updated>2018-02-04T08:17:47Z</updated>
<author>
<name>Kai Heng Feng</name>
</author>
<published>2018-01-29T05:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4446823e2573e97b26f0534ff8db9e9c4cb65840'/>
<id>urn:sha1:4446823e2573e97b26f0534ff8db9e9c4cb65840</id>
<content type='text'>
Same issue as other Asus laptops, ACPI incorrectly reports discharging
when battery is full and AC is plugged.

Use the same battery quirk can workaround the issue.

Link: https://bugs.launchpad.net/bugs/1661876
Link: https://bugs.launchpad.net/bugs/1745032
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / battery: Add quirk for Asus GL502VSK and UX305LA</title>
<updated>2017-12-18T11:25:51Z</updated>
<author>
<name>Kai-Heng Feng</name>
</author>
<published>2017-11-21T08:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c68f0676ef7df08d52a65031db3e0ba017dbfd89'/>
<id>urn:sha1:c68f0676ef7df08d52a65031db3e0ba017dbfd89</id>
<content type='text'>
On Asus GL502VSK and UX305LA, ACPI incorrectly reports discharging when
battery is full and AC is plugged.

However rate_now is correct under this circumstance, hence we can use
"rate_now == 0" as a predicate to report battery full status correctly.

Link: https://bugs.launchpad.net/bugs/1482390
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: battery: Drop redundant test for failure</title>
<updated>2017-12-13T00:14:54Z</updated>
<author>
<name>Bjørn Mork</name>
</author>
<published>2017-12-05T17:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6993ce46c910ec83b4a7f064bbf76f254217019c'/>
<id>urn:sha1:6993ce46c910ec83b4a7f064bbf76f254217019c</id>
<content type='text'>
Merging the two adjacent conditionally built blocks makes the code
a lot more readable.  And as a bonus, we drop a duplicate test when
CONFIG_ACPI_PROCFS_POWER is undefined.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: make device_attribute const</title>
<updated>2017-08-24T01:38:25Z</updated>
<author>
<name>Bhumika Goyal</name>
</author>
<published>2017-08-21T11:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82d2b610586763f21f8f6e1f8c163c1f14b94e1c'/>
<id>urn:sha1:82d2b610586763f21f8f6e1f8c163c1f14b94e1c</id>
<content type='text'>
Make these const as they are only passed as an argument to the function
device_create_file and device_remove_file and the corresponding
arguments are of type const.
Done using Coccinelle

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle</title>
<updated>2017-06-14T22:55:44Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-06-12T20:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33e4f80ee69b5168badf37edbfed796eb48434b9'/>
<id>urn:sha1:33e4f80ee69b5168badf37edbfed796eb48434b9</id>
<content type='text'>
The ACPI SCI (System Control Interrupt) is set up as a wakeup IRQ
during suspend-to-idle transitions and, consequently, any events
signaled through it wake up the system from that state.  However,
on some systems some of the events signaled via the ACPI SCI while
suspended to idle should not cause the system to wake up.  In fact,
quite often they should just be discarded.

Arguably, systems should not resume entirely on such events, but in
order to decide which events really should cause the system to resume
and which are spurious, it is necessary to resume up to the point
when ACPI SCIs are actually handled and processed, which is after
executing dpm_resume_noirq() in the system resume path.

For this reasons, add a loop around freeze_enter() in which the
platforms can process events signaled via multiplexed IRQ lines
like the ACPI SCI and add suspend-to-idle hooks that can be
used for this purpose to struct platform_freeze_ops.

In the ACPI case, the -&gt;wake hook is used for checking if the SCI
has triggered while suspended and deferring the interrupt-induced
system wakeup until the events signaled through it are actually
processed sufficiently to decide whether or not the system should
resume.  In turn, the -&gt;sync hook allows all of the relevant event
queues to be flushed so as to prevent events from being missed due
to race conditions.

In addition to that, some ACPI code processing wakeup events needs
to be modified to use the "hard" version of wakeup triggers, so that
it will cause a system resume to happen on device-induced wakeup
events even if the "soft" mechanism to prevent the system from
suspending is not enabled.  However, to preserve the existing
behavior with respect to suspend-to-RAM, this only is done in
the suspend-to-idle case and only if an SCI has occurred while
suspended.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'intel_pstate' and 'pm-sleep'</title>
<updated>2017-06-08T23:25:16Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-06-08T23:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fbd78afe34d9cc3a86aff7cc214d9f06e815e63e'/>
<id>urn:sha1:fbd78afe34d9cc3a86aff7cc214d9f06e815e63e</id>
<content type='text'>
* intel_pstate:
  cpufreq: intel_pstate: Avoid division by 0 in min_perf_pct_min()

* pm-sleep:
  Revert "ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle"
</content>
</entry>
<entry>
<title>Revert "ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle"</title>
<updated>2017-06-06T22:57:37Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-06-06T22:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3b7eaae1b35eb8077610eb7c7db042c9b0645e1'/>
<id>urn:sha1:f3b7eaae1b35eb8077610eb7c7db042c9b0645e1</id>
<content type='text'>
Revert commit eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups
from suspend-to-idle) as it turned out to be premature and triggered
a number of different issues on various systems.

That includes, but is not limited to, premature suspend-to-RAM aborts
on Dell XPS 13 (9343) reported by Dominik.

The issue the commit in question attempted to address is real and
will need to be taken care of going forward, but evidently more work
is needed for this purpose.

Reported-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-domains', 'pm-cpuidle', 'pm-sleep' and 'powercap'</title>
<updated>2017-05-09T21:21:46Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-05-09T21:21:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80449d89d4d6d0af4d6d310597e0f4a3fe0c08a9'/>
<id>urn:sha1:80449d89d4d6d0af4d6d310597e0f4a3fe0c08a9</id>
<content type='text'>
* pm-domains:
  PM / Domains: Add DT file to MAINTAINERS
  PM / Domains: Fix DT example

* pm-cpuidle:
  x86/intel_idle: add Gemini Lake support
  cpuidle: check dev before usage in cpuidle_use_deepest_state()

* pm-sleep:
  ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle
  PM / wakeup: Integrate mechanism to abort transitions in progress

* powercap:
  powercap: intel_rapl: Add support for Gemini Lake
</content>
</entry>
<entry>
<title>ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle</title>
<updated>2017-05-05T20:54:28Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-04-26T21:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eed4d47efe9508b855b09754cf6de4325d8a2f0d'/>
<id>urn:sha1:eed4d47efe9508b855b09754cf6de4325d8a2f0d</id>
<content type='text'>
The ACPI SCI (System Control Interrupt) is set up as a wakeup IRQ
during suspend-to-idle transitions and, consequently, any events
signaled through it wake up the system from that state.  However,
on some systems some of the events signaled via the ACPI SCI while
suspended to idle should not cause the system to wake up.  In fact,
quite often they should just be discarded.

Arguably, systems should not resume entirely on such events, but in
order to decide which events really should cause the system to resume
and which are spurious, it is necessary to resume up to the point
when ACPI SCIs are actually handled and processed, which is after
executing dpm_resume_noirq() in the system resume path.

For this reasons, add a loop around freeze_enter() in which the
platforms can process events signaled via multiplexed IRQ lines
like the ACPI SCI and add suspend-to-idle hooks that can be
used for this purpose to struct platform_freeze_ops.

In the ACPI case, the -&gt;wake hook is used for checking if the SCI
has triggered while suspended and deferring the interrupt-induced
system wakeup until the events signaled through it are actually
processed sufficiently to decide whether or not the system should
resume.  In turn, the -&gt;sync hook allows all of the relevant event
queues to be flushed so as to prevent events from being missed due
to race conditions.

In addition to that, some ACPI code processing wakeup events needs
to be modified to use the "hard" version of wakeup triggers, so that
it will cause a system resume to happen on device-induced wakeup
events even if the "soft" mechanism to prevent the system from
suspending is not enabled (that also helps to catch device-induced
wakeup events occurring during suspend transitions in progress).

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
