Date: Sat, 23 Jul 2005 19:00:01 +0900 From: Eric Kjeldergaard <kjelderg@gmail.com> To: Nate Lawson <nate@root.org> Cc: acpi@freebsd.org, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: acpi battery rework patch Message-ID: <d9175cad050723030041dd7387@mail.gmail.com> In-Reply-To: <42E1481F.5040306@root.org> References: <42E1481F.5040306@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7/23/05, Nate Lawson <nate@root.org> wrote: > I have completed a rework of the battery subsystem and would like=20 > testing of the patch. I'd like this to go into 6.0. It should have no= =20 > effect for people with working batteries and fixes some bugs for those=20 > who don't. It also makes it possible to import support for smart=20 > batteries (not in this patch). >=20 > API changes: > apm compatibility device: no change > sysctl: no change > kernel function call: API reduced. > ioctl: API reduced. >=20 > kernel function access: > Access individual batteries via devclass_find("battery"). Methods are=20 > ACPI_BATT_GET_STATUS (for _BST-formatted data) and ACPI_BATT_GET_INFO=20 > (for _BIF-formatted data). The helper function=20 > acpi_battery_get_battinfo() has been changed to take a device_t instead= =20 > of unit # argument. If dev is NULL, this signifies all batteries. >=20 > ioctl access: > The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been=20 > removed. Since there is no mapping between "virtual" unit and actual=20 > unit, just specify the unit directly and skip the old translation steps.= =20 > For instance, in the future if you have two smart batteries and two=20 > control-method batteries, they'll be battery0-3. >=20 > Patch can be found here: > http://root.org/~nate/freebsd/batt-rework.diff.gz >=20 > Please test to be sure your battery status works as usual, along with=20 > any apps. Since most apps (xbatt, gnome, etc.) use the apm compat=20 > layer, they should work as before with no recompilation needed. >=20 > --=20 > Nate > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" >=20 -CURRENT as of 23/07/2005, does not compile. cc -O2 -fno-strict-aliasing -pipe -pipe -march=3Dpentium4m -I/usr/src/sys/modules/acpi/acpi/../../../contrib/dev/acpica -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I-=20 -I/usr/src/sys/modules/acpi/acpi/../../../contrib/dev/acpica -include /usr/obj/usr/src/sys/UNINFECTABLE/opt_global.h -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=3D8000 -fno-common=20 -I/usr/obj/usr/src/sys/UNINFECTABLE -mno-align-long-strings -mpreferred-stack-boundary=3D2 -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=3Dc99 -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: @/dev/acpica/acpivar.h:397: warning: "struct acpi_bst" declared inside parameter list @/dev/acpica/acpivar.h:397: warning: its scope is only this definition or declaration, which is probably not what you want @/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. --=20 If I write a signature, my emails will appear more personalised.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d9175cad050723030041dd7387>