From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Len Brown <lenb@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
David Zeuthen <davidz@redhat.com>,
Richard Hughes <richard@hughsie.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown values in get_property()
Date: Sun, 17 Oct 2010 11:10:16 -0200 [thread overview]
Message-ID: <20101017131016.GB13015@khazad-dum.debian.net> (raw)
In-Reply-To: <20101017095940.GA4077@sucs.org>
On Sun, 17 Oct 2010, Sitsofe Wheeler wrote:
> On Sun, Oct 17, 2010 at 03:19:53AM -0200, Henrique de Moraes Holschuh wrote:
> > On Sun, 17 Oct 2010, Rafael J. Wysocki wrote:
> > > In fact, the driver is supposed to return -ENODATA in that case, which will
> > > result in the read from /sys/class/power_supply/BAT0/current_now
> > > fail (I guess upower should be able to cope with that).
> >
> > ENODATA? Shouldn't it be ENXIO? There is no non-blocking data stream
> > involved in a sysfs attribute.
>
> Using ENODATA and ENXIO appears to solve the problem (upower reports a
> rate of 0.0). However when plugging the battery in after previously only
> being on AC power none of the /sys/class/power_supply/BAT0/uevent:*
> files are created so upower never realises a battery has been plugged
> in. A further issue with ENXIO is is the following repeatedly appears in
> dmesg:
You might have broken firmware that does not issue a notify when a battery
is plugged. But it has been a long time, I don't recall if the battery
driver handles hotplugging without the help of the dock/bay driver (it
should, AFAIK).
> power_supply BAT0: driver failed to report `current_now' property
And it keeps silent if it gets ENODATA?
--
"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:[~2010-10-17 13:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-16 14:13 Returning ACPI_BATTERY_VALUE_UNKNOWN to userspace Sitsofe Wheeler
2010-10-16 23:05 ` [PATCH] ACPI / Battery: Return -ENODATA for unknown values in get_property() (was: Re: Returning ACPI_BATTERY ...) Rafael J. Wysocki
2010-10-17 5:19 ` Henrique de Moraes Holschuh
2010-10-17 9:59 ` [PATCH] ACPI / Battery: Return -ENODATA for unknown values in get_property() Sitsofe Wheeler
2010-10-17 13:10 ` Henrique de Moraes Holschuh [this message]
2010-10-17 14:50 ` Sitsofe Wheeler
2010-10-17 18:32 ` Rafael J. Wysocki
2010-10-21 16:54 ` Sitsofe Wheeler
2010-10-21 19:57 ` Rafael J. Wysocki
2010-10-21 20:46 ` Sitsofe Wheeler
2010-10-22 22:19 ` Rafael J. Wysocki
2010-10-23 15:36 ` Sitsofe Wheeler
2010-10-23 17:31 ` Rafael J. Wysocki
2010-10-22 12:31 ` Richard Hughes
2010-10-23 15:43 ` Sitsofe Wheeler
2010-10-25 13:17 ` Pavel Machek
2010-10-25 20:36 ` 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=20101017131016.GB13015@khazad-dum.debian.net \
--to=hmh@hmh.eng.br \
--cc=davidz@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=richard@hughsie.com \
--cc=rjw@sisk.pl \
--cc=rui.zhang@intel.com \
--cc=sitsofe@yahoo.com \
/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
all inboxes | Powered by JetHome®