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
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html