Re: battery: current a factor of 10 off?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



trailing whitespace repaired.
applied for 2.6.28.

thanks,
-Len


On Fri, 21 Nov 2008, Alexey Starikovskiy wrote:

> Hi Ferenc,
> This patch should be better -- no integer overflow.
> 
> Regards,
> Alex.
> 
> Alexey Starikovskiy wrote:
> > Hi Ferenc,
> > 
> > Good catch.
> > ACPI battery interface report its state either in mW or in mA, and
> > discharge rate
> > in your case is reported in mW. power_supply interface does not have
> > such a parameter,
> > so current_now parameter is used for all cases. But in case of mW,
> > reported discharge should
> > be converted into mA.
> > 
> > Please test the attached patch.
> > 
> > Thanks,
> > Alex.
> > 
> > On Fri, Nov 21, 2008 at 3:33 AM, Ferenc Wagner <wferi@xxxxxxx> wrote:
> >   
> > > Hi,
> > > 
> > > on my ThinkPad R50e the current_now reading seems something like 10
> > > times the actual value.  Documentation/power/power_supply_class.txt
> > > says it's in uA, and a tipical discharge value is around 15259000,
> > > that is, 15 A on my system.  At the same time voltage is 11756000,
> > > that is, 12 V, which sounds reasonable, but then the power is 15*12 VA,
> > > ie 180 W, which is insane.  However, the numerical derivative of
> > > energy_now gives 18 W, which is both reasonable and consistent with
> > > the assumed factor of 10 error in current_now.  Is this possibly a bug
> > > in 2.6.26.6?  During a quick glance over battery.c nothing obvious
> > > jumped at me, but I'm no expert on this.
> > > --
> > > Thanks,
> > > Feri.
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > 
> > >     
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux