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


Kamil Iskra <kamil.54...@iskra.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #70572|0                           |1
        is obsolete|                            |




--- Comment #8 from Kamil Iskra <kamil.54...@iskra.name>  2011-09-04 04:41:50 
---
Created an attachment (id=71632)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=71632)
Patch against 3.1.0-rc4's drivers/acpi/battery.c

Here's an updated version of the patch.  The new version no longer crashes the
kernel with a division by zero error when the battery is removed, and it
performs the DMI scan I suggested earlier so that the quirk is only activated
if the reported values are incorrect.

One thing that isn't entirely clear to me is the correct way of translating
capacity_now when it's in mAh units into a charge value in mWh.  Should it be
multiplied by voltage_now or design_voltage?  PowerTOP multiples by voltage_now
and that's what I assumed in the previous version of the patch, but I noticed
that UPower was showing an incorrect value then, and so were panel battery
icons in KDE and Gnome. So in this new version I switched so that multiplying
by design_voltage gives a correct value.  Is the code in PowerTOP wrong?

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to