27.02.2012 20:36, Chris Ferron kirjoitti:
> On 02/24/2012 08:50 AM, Paul Menzel wrote:
>> Dear Jaroslav,
>>
>>
>> Am Freitag, den 24.02.2012, 16:00 +0100 schrieb Jaroslav Škarvada:
>>> Proposed fix for firmwares that provides POWER_NOW instead of CURRENT_NOW.
>> thank you for the patch. Could you elaborate on the problem you are
>> addressing and add maybe a link to more information about the difference
>> between POWER_NOW and CURRENT_NOW?
>
> Patches applied.
> Thank You for your contribution.

Hmm, it seems there has been some messup, AFAICS power_supply.c which
this patch changes is not used at all.

It seems that two alternative independently written implementations for
reading the power_supply sysfs data have been applied:

One from John Mathew (power_supply.cpp):
https://github.com/fenrus75/powertop/commit/a1c28f69847480cc54f36046e96e93a02a2c661d

One from me (sysfs.cpp):
https://github.com/fenrus75/powertop/commit/846b7e0a65a6958af44cb64c13de3c09cb4cd3f9

And as of this commit only my implementation is used (AFAICS):
https://github.com/fenrus75/powertop/commit/57d072b4c9f0048c21292a1bafcd7354886a0c9f

With a quick look (didn't look for bugs) the only behavioural difference
seems to be that the power_supply.cpp code doesn't seem to check if the
battery is in "Discharging" state before reporting output, like both
acpi.cpp and sysfs.cpp do. It could trivially be added, though.

In any case, one of the implementations should be dropped. The
implementations use very different approaches (power_supply.cpp parses
the values from /uevent, while sysfs.cpp reads the needed values from
the individual attribute files).

I'll leave it to you to decide which implementation should stay :)

-- 
Anssi Hannula

_______________________________________________
Power mailing list
Power@bughost.org
https://bughost.org/mailman/listinfo/power

Reply via email to