public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Sjoerd Simons <sjoerd@luon.net>
Cc: maximilian attems <max@stro.at>, Len Brown <len.brown@intel.com>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI: battery: add sysfs serial number
Date: Wed, 23 Jan 2008 14:21:49 +0300	[thread overview]
Message-ID: <4797234D.60901@suse.de> (raw)
In-Reply-To: <20080123111552.GA14757@spring.luon.net>

Sjoerd Simons wrote:
> On Wed, Jan 23, 2008 at 02:01:34PM +0300, Alexey Starikovskiy wrote:
>> maximilian attems wrote:
>>> got the following question:
>>> ~/src/hal$ egrep 'voltage_(max|min)_design' -r .
>>> ./hald/linux/device.c:  if (hal_util_get_int_from_file (path, "voltage_max_design", &voltage_design, 10)) {
>>>
>>> any particular reason the kernel is calling it
>>> cat /sys/class/power_supply/BAT0/voltage_min_design 14400000
>>>
>>> shall i send in a patch along the line:
>>> -       case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
>>> +       case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
>>>                 val->intval = battery->design_voltage * 1000;
>>>
>>> or is it hal beeing silly?
>>>
>> On most new batteries design voltage is less than current voltage, thus I've chosen VOLTAGE_MIN_DESIGN.
>> On older batteries, current voltage may become lower than design, so I 
>> think hal should not be very strict about how they relate to each other. 
> 
> I'll patch up hal to use voltage_min_design if there is no voltage_max_design
> available. Which should be fine as we already picked up the same value from
> procfs for this property.
> 
> What it does make me wonder about, is why there is a difference between MIN and
> MAX in the power_supply class. As this doesn't seem to have a strict meaning
> (or at least not for ACPI). So why not just voltage_design instead ?
Don't know, may be they had battery for which both min and max voltages are known and 
crossing each needs to be guarded...

Regards,
Alex. 

  reply	other threads:[~2008-01-23 11:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 17:46 [PATCH] ACPI: battery: add sysfs serial number maximilian attems
2008-01-22 18:00 ` Alexey Starikovskiy
2008-01-22 18:07   ` maximilian attems
2008-01-22 18:15     ` Alexey Starikovskiy
2008-01-23 10:18       ` maximilian attems
2008-01-23 11:01         ` Alexey Starikovskiy
2008-01-23 11:15           ` Sjoerd Simons
2008-01-23 11:21             ` Alexey Starikovskiy [this message]
2008-02-03 11:02   ` maximilian attems
2008-02-06  2:09   ` Len Brown

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=4797234D.60901@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=max@stro.at \
    --cc=sjoerd@luon.net \
    /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