<p>Daisuke Nojiri has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/29364">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chromeec: Remove battery remaining capacity workaround<br><br>Power manager (powerd) reads the remaining capacity and full capacity<br>from EC through ACPI. Gas gauges typically perform charge-discharge<br>cycle when the charge is nearly full to avoid stressing battery packs<br>at high charge.<br><br>ACPI converts remaining capacity readings to the full capacity to mask<br>this fluctuation from the user but this can be also done by power manager.<br><br>This patch removes this compensation from ACPI so that power manager<br>can solely handle it.<br><br>BUG=b:109954565,chromium:899120<br>BRANCH=none<br>TEST=Verify LED changes from amber (charging) to white (full) at the<br>same time as the display shows battery is full.<br><br>Change-Id: I15d585229948a0be4b59a9c653d8524d05c3a90d<br>Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org><br>---<br>M src/ec/google/chromeec/acpi/battery.asl<br>1 file changed, 1 insertion(+), 17 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/29364/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl</span><br><span>index 0a0caec..3b7ef97 100644</span><br><span>--- a/src/ec/google/chromeec/acpi/battery.asl</span><br><span>+++ b/src/ec/google/chromeec/acpi/battery.asl</span><br><span>@@ -214,23 +214,7 @@</span><br><span>         //</span><br><span>   // 2: BATTERY REMAINING CAPACITY</span><br><span>     //</span><br><span style="color: hsl(0, 100%, 40%);">-      Store (BTRA, Local1)</span><br><span style="color: hsl(0, 100%, 40%);">-    If (LAnd (Arg3, LAnd (ACEX, LNot (LAnd (BFDC, BFCG))))) {</span><br><span style="color: hsl(0, 100%, 40%);">-               // On AC power and battery is neither charging</span><br><span style="color: hsl(0, 100%, 40%);">-          // nor discharging.  Linux expects a full battery</span><br><span style="color: hsl(0, 100%, 40%);">-               // to report same capacity as last full charge.</span><br><span style="color: hsl(0, 100%, 40%);">-         // https://bugzilla.kernel.org/show_bug.cgi?id=12632</span><br><span style="color: hsl(0, 100%, 40%);">-            Store (BTDF, Local2)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-            // See if within ~6% of full</span><br><span style="color: hsl(0, 100%, 40%);">-            ShiftRight (Local2, 4, Local3)</span><br><span style="color: hsl(0, 100%, 40%);">-          If (LAnd (LGreater (Local1, Subtract (Local2, Local3)),</span><br><span style="color: hsl(0, 100%, 40%);">-                   LLess (Local1, Add (Local2, Local3))))</span><br><span style="color: hsl(0, 100%, 40%);">-                {</span><br><span style="color: hsl(0, 100%, 40%);">-                       Store (Local2, Local1)</span><br><span style="color: hsl(0, 100%, 40%);">-          }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span style="color: hsl(0, 100%, 40%);">-       Store (Local1, Index (Arg1, 2))</span><br><span style="color: hsl(120, 100%, 40%);">+       Store (BTRA, Index (Arg1, 2))</span><br><span> </span><br><span>    //</span><br><span>   // 3: BATTERY PRESENT VOLTAGE</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/29364">change 29364</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/29364"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I15d585229948a0be4b59a9c653d8524d05c3a90d </div>
<div style="display:none"> Gerrit-Change-Number: 29364 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Daisuke Nojiri <dnojiri@chromium.org> </div>