All of lore.kernel.org
 help / color / mirror / Atom feed
* battery hot add
@ 2007-08-18 17:28 Len Brown
  2007-08-18 18:47 ` Alexey Starikovskiy
  2007-08-20 11:21 ` Thomas Renninger
  0 siblings, 2 replies; 3+ messages in thread
From: Len Brown @ 2007-08-18 17:28 UTC (permalink / raw)
  To: shaohua.li, Alexey Starikovskiy; +Cc: linux-acpi

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?

thanks,
-Len

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: battery hot add
  2007-08-18 17:28 battery hot add Len Brown
@ 2007-08-18 18:47 ` Alexey Starikovskiy
  2007-08-20 11:21 ` Thomas Renninger
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Starikovskiy @ 2007-08-18 18:47 UTC (permalink / raw)
  To: Len Brown; +Cc: shaohua.li, Alexey Starikovskiy, linux-acpi

Len Brown wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=2884
> 
> Alexey,
> as the battery maintainer, have you run into this problem on other systems?
Not yet. Don't have machine with two batteries.

Regards,
Alex.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: battery hot add
  2007-08-18 17:28 battery hot add Len Brown
  2007-08-18 18:47 ` Alexey Starikovskiy
@ 2007-08-20 11:21 ` Thomas Renninger
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Renninger @ 2007-08-20 11:21 UTC (permalink / raw)
  To: Len Brown; +Cc: shaohua.li, Alexey Starikovskiy, linux-acpi

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-20 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.