* [PATCH] ACPI: Don't report current_now if battery reports in mWh
@ 2010-08-23 20:25 Matthew Garrett
2010-08-23 21:37 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2010-08-23 20:25 UTC (permalink / raw)
To: linux-acpi
Cc: linux-kernel, cbou, dwmw2, lenb, Matthew Garrett, Arjan van de Ven
ACPI batteries can report in units of either current or energy. Right
now we expose the current_now file even if the battery is reporting
energy units, resulting in a file that should contain mA instead
containing mW. Don't expose this value unless the battery is reporting
current.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
---
drivers/acpi/battery.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index dc58402..9841720 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -273,7 +273,6 @@ static enum power_supply_property energy_battery_props[] = {
POWER_SUPPLY_PROP_CYCLE_COUNT,
POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
POWER_SUPPLY_PROP_VOLTAGE_NOW,
- POWER_SUPPLY_PROP_CURRENT_NOW,
POWER_SUPPLY_PROP_POWER_NOW,
POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
POWER_SUPPLY_PROP_ENERGY_FULL,
--
1.7.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: Don't report current_now if battery reports in mWh
2010-08-23 20:25 [PATCH] ACPI: Don't report current_now if battery reports in mWh Matthew Garrett
@ 2010-08-23 21:37 ` Rafael J. Wysocki
2010-08-24 8:18 ` Anton Vorontsov
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2010-08-23 21:37 UTC (permalink / raw)
To: Matthew Garrett
Cc: linux-acpi, linux-kernel, cbou, dwmw2, lenb, Arjan van de Ven,
Zhang Rui, Alexey Starikovskiy
On Monday, August 23, 2010, Matthew Garrett wrote:
> ACPI batteries can report in units of either current or energy. Right
> now we expose the current_now file even if the battery is reporting
> energy units, resulting in a file that should contain mA instead
> containing mW. Don't expose this value unless the battery is reporting
> current.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> Cc: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/acpi/battery.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> index dc58402..9841720 100644
> --- a/drivers/acpi/battery.c
> +++ b/drivers/acpi/battery.c
> @@ -273,7 +273,6 @@ static enum power_supply_property energy_battery_props[] = {
> POWER_SUPPLY_PROP_CYCLE_COUNT,
> POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
> POWER_SUPPLY_PROP_VOLTAGE_NOW,
> - POWER_SUPPLY_PROP_CURRENT_NOW,
> POWER_SUPPLY_PROP_POWER_NOW,
> POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
> POWER_SUPPLY_PROP_ENERGY_FULL,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: Don't report current_now if battery reports in mWh
2010-08-23 21:37 ` Rafael J. Wysocki
@ 2010-08-24 8:18 ` Anton Vorontsov
2010-08-24 8:47 ` Zhang Rui
0 siblings, 1 reply; 4+ messages in thread
From: Anton Vorontsov @ 2010-08-24 8:18 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Matthew Garrett, linux-acpi, linux-kernel, dwmw2, lenb,
Arjan van de Ven, Zhang Rui, Alexey Starikovskiy
On Mon, Aug 23, 2010 at 11:37:19PM +0200, Rafael J. Wysocki wrote:
> On Monday, August 23, 2010, Matthew Garrett wrote:
> > ACPI batteries can report in units of either current or energy. Right
> > now we expose the current_now file even if the battery is reporting
> > energy units, resulting in a file that should contain mA instead
> > containing mW. Don't expose this value unless the battery is reporting
> > current.
> >
> > Signed-off-by: Matthew Garrett <mjg@redhat.com>
> > Cc: Arjan van de Ven <arjan@linux.intel.com>
>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Looks good to me as well.
Should I merge this into the battery-2.6.git tree, or
ACPI folks are gonna handle this patch?
Thanks,
> > ---
> > drivers/acpi/battery.c | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> > index dc58402..9841720 100644
> > --- a/drivers/acpi/battery.c
> > +++ b/drivers/acpi/battery.c
> > @@ -273,7 +273,6 @@ static enum power_supply_property energy_battery_props[] = {
> > POWER_SUPPLY_PROP_CYCLE_COUNT,
> > POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
> > POWER_SUPPLY_PROP_VOLTAGE_NOW,
> > - POWER_SUPPLY_PROP_CURRENT_NOW,
> > POWER_SUPPLY_PROP_POWER_NOW,
> > POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
> > POWER_SUPPLY_PROP_ENERGY_FULL,
> >
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: Don't report current_now if battery reports in mWh
2010-08-24 8:18 ` Anton Vorontsov
@ 2010-08-24 8:47 ` Zhang Rui
0 siblings, 0 replies; 4+ messages in thread
From: Zhang Rui @ 2010-08-24 8:47 UTC (permalink / raw)
To: Anton Vorontsov
Cc: Rafael J. Wysocki, Matthew Garrett, linux-acpi, linux-kernel,
dwmw2, lenb, Arjan van de Ven, Alexey Starikovskiy
On Tue, 2010-08-24 at 16:18 +0800, Anton Vorontsov wrote:
> On Mon, Aug 23, 2010 at 11:37:19PM +0200, Rafael J. Wysocki wrote:
> > On Monday, August 23, 2010, Matthew Garrett wrote:
> > > ACPI batteries can report in units of either current or energy. Right
> > > now we expose the current_now file even if the battery is reporting
> > > energy units, resulting in a file that should contain mA instead
> > > containing mW. Don't expose this value unless the battery is reporting
> > > current.
> > >
> > > Signed-off-by: Matthew Garrett <mjg@redhat.com>
> > > Cc: Arjan van de Ven <arjan@linux.intel.com>
> >
> > Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> Looks good to me as well.
>
> Should I merge this into the battery-2.6.git tree, or
> ACPI folks are gonna handle this patch?
>
Acked-by: Zhang Rui <rui.zhang@intel.com>
I think Len may want to handle this patch. :)
thanks,
rui
> Thanks,
>
> > > ---
> > > drivers/acpi/battery.c | 1 -
> > > 1 files changed, 0 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> > > index dc58402..9841720 100644
> > > --- a/drivers/acpi/battery.c
> > > +++ b/drivers/acpi/battery.c
> > > @@ -273,7 +273,6 @@ static enum power_supply_property energy_battery_props[] = {
> > > POWER_SUPPLY_PROP_CYCLE_COUNT,
> > > POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
> > > POWER_SUPPLY_PROP_VOLTAGE_NOW,
> > > - POWER_SUPPLY_PROP_CURRENT_NOW,
> > > POWER_SUPPLY_PROP_POWER_NOW,
> > > POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
> > > POWER_SUPPLY_PROP_ENERGY_FULL,
> > >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-24 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 20:25 [PATCH] ACPI: Don't report current_now if battery reports in mWh Matthew Garrett
2010-08-23 21:37 ` Rafael J. Wysocki
2010-08-24 8:18 ` Anton Vorontsov
2010-08-24 8:47 ` Zhang Rui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.