On 7/23/05, Nate Lawson <nate_at_root.org> wrote: > I have completed a rework of the battery subsystem and would like > testing of the patch. I'd like this to go into 6.0. It should have no > effect for people with working batteries and fixes some bugs for those > who don't. It also makes it possible to import support for smart > batteries (not in this patch). > > API changes: > apm compatibility device: no change > sysctl: no change > kernel function call: API reduced. > ioctl: API reduced. > > kernel function access: > Access individual batteries via devclass_find("battery"). Methods are > ACPI_BATT_GET_STATUS (for _BST-formatted data) and ACPI_BATT_GET_INFO > (for _BIF-formatted data). The helper function > acpi_battery_get_battinfo() has been changed to take a device_t instead > of unit # argument. If dev is NULL, this signifies all batteries. > > ioctl access: > The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been > removed. Since there is no mapping between "virtual" unit and actual > unit, just specify the unit directly and skip the old translation steps. > For instance, in the future if you have two smart batteries and two > control-method batteries, they'll be battery0-3. > > Patch can be found here: > http://root.org/~nate/freebsd/batt-rework.diff.gz > > Please test to be sure your battery status works as usual, along with > any apps. Since most apps (xbatt, gnome, etc.) use the apm compat > layer, they should work as before with no recompilation needed. > > -- > Nate > _______________________________________________ > freebsd-acpi_at_freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe_at_freebsd.org" > -CURRENT as of 23/07/2005, does not compile. cc -O2 -fno-strict-aliasing -pipe -pipe -march=pentium4m -I/usr/src/sys/modules/acpi/acpi/../../../contrib/dev/acpica -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I/usr/src/sys/modules/acpi/acpi/../../../contrib/dev/acpica -include /usr/obj/usr/src/sys/UNINFECTABLE/opt_global.h -I. -I_at_ -I_at_/contrib/altq -I_at_/../include -finline-limit=8000 -fno-common -I/usr/obj/usr/src/sys/UNINFECTABLE -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi.c In file included from /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi.c:59: _at_/dev/acpica/acpivar.h:397: warning: "struct acpi_bst" declared inside parameter list _at_/dev/acpica/acpivar.h:397: warning: its scope is only this definition or declaration, which is probably not what you want _at_/dev/acpica/acpivar.h:398: warning: "struct acpi_bif" declared inside parameter list *** Error code 1 Stop in /usr/src/sys/modules/acpi/acpi. *** Error code 1 Stop in /usr/src/sys/modules/acpi. *** Error code 1 Stop in /usr/src/sys/modules. *** Error code 1 Stop in /usr/obj/usr/src/sys/UNINFECTABLE. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. -- If I write a signature, my emails will appear more personalised.Received on Sat Jul 23 2005 - 08:00:03 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:39 UTC