<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Ok something cut the end comment, reformatted.<div><br></div><div><div>diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c</div><div>index 600fc27..1967a90 100644</div><div>--- a/src/linux/up-device-supply.c</div><div>+++ b/src/linux/up-device-supply.c</div><div>@@ -544,8 +544,13 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; /* only disable the polling if the kernel tells us we're fully charged,</div><div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;not if we've guessed the state to be fully charged */</div><div>- &nbsp; &nbsp; &nbsp; supply-&gt;priv-&gt;enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;not if we've guessed the state to be fully charged. This function&nbsp;</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;has been disabled since some battery hardware/drivers are very&nbsp;</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;late to report discharging and does not interrupt on state change</div><div>+ &nbsp; &nbsp; &nbsp; */</div><div>+ &nbsp; &nbsp; &nbsp; /*supply-&gt;priv-&gt;enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp;*/</div><div>+</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; /* reset unknown counter */</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (state != UP_DEVICE_STATE_UNKNOWN) {</div></div><div><br></div><div><br></div><div><br><br><div><hr id="stopSpelling">From: j_m_hjelm@hotmail.com<br>To: devkit-devel@lists.freedesktop.org<br>Subject: [PATCH] Patch to solve issues with some hardware that causes        battery to never update<br>Date: Sun, 10 Jul 2011 22:24:52 +0200<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>

<div dir="ltr">
I have tested this on a Aspire one which is heavily affected by hardware issues.<div>For further info on the issues it solves please see&nbsp;https://bugs.launchpad.net/ubuntu/+source/upower/+bug/467825</div><div><br></div><div>Best Regards</div><div>/Mikael Hjelm</div><div><br><div><div>/upower$ git diff&nbsp;</div><div>diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c</div><div>index 600fc27..b6aaf9a 100644</div><div>--- a/src/linux/up-device-supply.c</div><div>+++ b/src/linux/up-device-supply.c</div><div>@@ -544,8 +544,12 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; /* only disable the polling if the kernel tells us we're fully charged,</div><div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;not if we've guessed the state to be fully charged */</div><div>- &nbsp; &nbsp; &nbsp; supply-&gt;priv-&gt;enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;not if we've guessed the state to be fully charged. This function&nbsp;</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;has been disabled since some battery hardware/drivers are very&nbsp;</div><div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;late to report discharging and does not interrupt on state change</div><div>+ &nbsp; &nbsp; &nbsp; */</div><div>+ &nbsp; &nbsp; &nbsp; /*supply-&gt;priv-&gt;enable_poll = (state != UP_DEVICE_STATE_FULLY_CHARGED);</div><div>+</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; /* reset unknown counter */</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (state != UP_DEVICE_STATE_UNKNOWN) {</div></div><div><br></div></div>                                               </div>
<br>_______________________________________________
devkit-devel mailing list
devkit-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel</div></div>                                               </div></body>
</html>