From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: LenBrown <lenb@kernel.org>, Linux-acpi@vger.kernel.org
Subject: Re: [RFC][PATCH] ACPI: battery: add power_{now, avg} properties to power_class
Date: Mon, 15 Dec 2008 23:22:04 -0200 [thread overview]
Message-ID: <20081216012204.GF10767@khazad-dum.debian.net> (raw)
In-Reply-To: <20081215213855.8414.9349.stgit@thinkpad>
On Tue, 16 Dec 2008, Alexey Starikovskiy wrote:
> @@ -224,10 +224,12 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy,
> acpi_battery_vscale(battery) * 1000;
> break;
> case POWER_SUPPLY_PROP_CURRENT_NOW:
> + case POWER_SUPPLY_PROP_POWER_NOW:
> val->intval = abs(battery->current_now) *
> acpi_battery_ipscale(battery) * 1000;
> break;
> case POWER_SUPPLY_PROP_CURRENT_AVG:
> + case POWER_SUPPLY_PROP_POWER_AVG:
> val->intval = abs(battery->current_avg) *
> acpi_battery_ipscale(battery) * 1000;
> break;
Excuse me if I am talking nonsense (I have looked over just the patch,
not the entire file), but how can that be correct? It is either power
or current, it cannot be both, so the CURRENT case should be dropped.
And if it is power, why have fields named current_now... or is
ipscale() a voltage, and not a scaling factor?
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
next prev parent reply other threads:[~2008-12-16 1:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 21:38 [RFC][PATCH] ACPI: battery: add power_{now, avg} properties to power_class Alexey Starikovskiy
2008-12-16 1:22 ` Henrique de Moraes Holschuh [this message]
2008-12-16 8:53 ` Alexey Starikovskiy
2008-12-16 14:18 ` Henrique de Moraes Holschuh
2008-12-16 15:19 ` Rafael J. Wysocki
2008-12-16 15:17 ` Rafael J. Wysocki
2008-12-16 15:28 ` Alexey Starikovskiy
2008-12-16 15:51 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2008-12-16 16:27 Alexey Starikovskiy
2008-12-16 17:41 ` Len Brown
2008-12-16 20:49 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081216012204.GF10767@khazad-dum.debian.net \
--to=hmh@hmh.eng.br \
--cc=Linux-acpi@vger.kernel.org \
--cc=astarikovskiy@suse.de \
--cc=lenb@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox