public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Hoffend <mail-nf-Mmb7MZpHnFY@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Battery charging state: unknown
Date: Sun, 10 Nov 2002 02:59:03 +0100	[thread overview]
Message-ID: <20021110015902.GA6003@intranet.fresh-style.lan> (raw)
In-Reply-To: <1036861357.17196.22.camel-h9eRTumTmmZjMu4AB9qoK9F8XQ1HzYRO@public.gmane.org>

Hello

where can i access to the real state bits to check witch bits are set
and compare with the results.


Daniel Hoffend



On Sam, Nov 09, 2002 at 05:02:37 +0000, Duncan Gibb wrote:
> On Fri, 2002-11-08 at 12:16, joerg.beyer-htSm2yLGOjU@public.gmane.org wrote:
> > Daniel Hoffend <mail-nf-Mmb7MZpHnFY@public.gmane.org> schrieb am 07.11.02 23:09:43:
> 
> DH> /proc/acpi/battery/BAT1/state shows that there is an
> DH> unknown charging stage
> 
> JB> I get this, when the Laptop is connected to power supply _and_
> JB> is fully charged.
> 
> I thought this was odd too.  There are two relevant bits in the battery
> status reply, bit 0 for discharging, bit 1 for charging.  The code does
> this:
> 
> 	if ((bst->state & 0x01) && (bst->state & 0x02))
> 		p += sprintf(p, "charging state:          charging/discharging\n");
> 	else if (bst->state & 0x01)
> 		p += sprintf(p, "charging state:          discharging\n");
> 	else if (bst->state & 0x02)
> 		p += sprintf(p, "charging state:          charging\n");
> 	else
> 		p += sprintf(p, "charging state:          unknown\n");
> 
> 
> IMHO "unknown" is likely to worry people, when "not charging" can happen
> for a number of reasons - eg: the battery is full, or there is another
> battery in the system which is being used/charged in preference to this
> one.
> 
> Dunno whether there are userland progs which rely on the existing code,
> though.
> 
> 
> Duncan
> 
> 
> 

-- 
mfg

Daniel "Griffon" Hoffend
Team FETTNET
Team LANparty.de
---
Visit :: http://fettnet.lanparty.de




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

  parent reply	other threads:[~2002-11-10  1:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 12:16 Battery charging state: unknown joerg.beyer-htSm2yLGOjU
     [not found] ` <200211081216.gA8CGuX15381-pb599fR3TxVkExQqqHjIK3sFFmKitW5W@public.gmane.org>
2002-11-09 17:02   ` Duncan Gibb
     [not found]     ` <1036861357.17196.22.camel-h9eRTumTmmZjMu4AB9qoK9F8XQ1HzYRO@public.gmane.org>
2002-11-10  1:59       ` Daniel Hoffend [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-07 21:56 Daniel Hoffend

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=20021110015902.GA6003@intranet.fresh-style.lan \
    --to=mail-nf-mmb7mzphnfy@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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