From: Thomas Renninger <trenn@suse.de>
To: Len Brown <lenb@kernel.org>
Cc: shaohua.li@intel.com, Alexey Starikovskiy <astarikovskiy@suse.de>,
linux-acpi@vger.kernel.org
Subject: Re: battery hot add
Date: Mon, 20 Aug 2007 13:21:57 +0200 [thread overview]
Message-ID: <1187608917.8780.879.camel@queen.suse.de> (raw)
In-Reply-To: <200708181328.12470.lenb@kernel.org>
On Sat, 2007-08-18 at 13:28 -0400, Len Brown wrote:
> Shaohua,
> do you plan to update your battery hot-add patch here?:
>
> http://bugzilla.kernel.org/show_bug.cgi?id=2884
>
> Alexey,
> as the battery maintainer, have you run into this problem on other systems?
IMO this should get fixed by always registering an ACPI device even if
its status is not present.
The code has changed here a bit, but it should be this line (possibly
more):
drivers/acpi/scan.c:acpi_add_single_object()
case ACPI_BUS_TYPE_DEVICE:
result = acpi_bus_get_status(device);
if (ACPI_FAILURE(result) || !device->status.present) {
result = -ENOENT;
goto end;
}
break;
I worked on that quite a while ago, sent some ideas, but never got much
response.
Main question is why do ACPI devices not get registered if they are not
present, is there a specific reason for that?
IMO add/remove functions should called on every device, present or not.
start/stop functions should be called for devices that are present at
init time or get (un)present later?
If this can be done (register not present devices) battery hotplug is
working out of the box and about 300 lines can be thrown out of
acpi_memhotplug.c which works around this. Container, dock, bay and
other hotplugable devices may also benefit from that change.
Thomas
prev parent reply other threads:[~2007-08-20 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-18 17:28 battery hot add Len Brown
2007-08-18 18:47 ` Alexey Starikovskiy
2007-08-20 11:21 ` Thomas Renninger [this message]
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=1187608917.8780.879.camel@queen.suse.de \
--to=trenn@suse.de \
--cc=astarikovskiy@suse.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=shaohua.li@intel.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 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.