Hi,
On Thu, Nov 08, 2007 at 07:11:53PM +0300, Alexey Starikovskiy wrote:
Please help me to understand:
When the battery is plugged in, the acpi_battery_notify() is called,
which in turn calls acpi_battery_update(). The latter ensures that the
sysfs files are created if not yet present.
When the battery is removed, acpi_battery_notify is called, which in
turn calls acpi_battery_update(). The latter ensures that the sysfs
files are removed if present.
During runtime - as far as I understood - no sysfs files have to be
created/removed but the saved battery state info becomes stale.
So, would it be enough to call acpi_battery_get_state() in
acpi_battery_get_property() instead of acpi_battery_update()?
If acpi_battery_get_state() does what I think it does, this would
ensure that the battery state is reread and updated when
acpi_battery_get_property() is called.
Hit me.
Hannes
-