From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 23 10:00:03 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E404D16A41F for ; Sat, 23 Jul 2005 10:00:02 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22B9143D49 for ; Sat, 23 Jul 2005 10:00:01 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so122580rne for ; Sat, 23 Jul 2005 03:00:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=h5XgYNMwWfx/vtMFxXC8UQeCRLj9xmkCmHnduJ5gZ9BOqEenaGZCud45VLqwp2nzch/m9OH1MUGz5pL9+CtavnYbDy3p/CD8asdrsFETjwY6qVo5mOkFjlGOMt6fWaQ9Wm6SojxnEWWT5mICYJrPFk4/13yNyZ85AxiXc2OeJj4= Received: by 10.38.89.29 with SMTP id m29mr419609rnb; Sat, 23 Jul 2005 03:00:01 -0700 (PDT) Received: by 10.38.101.41 with HTTP; Sat, 23 Jul 2005 03:00:01 -0700 (PDT) Message-ID: Date: Sat, 23 Jul 2005 19:00:01 +0900 From: Eric Kjeldergaard To: Nate Lawson In-Reply-To: <42E1481F.5040306@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42E1481F.5040306@root.org> Cc: acpi@freebsd.org, FreeBSD Current Subject: Re: acpi battery rework patch X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eric Kjeldergaard List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2005 10:00:03 -0000 On 7/23/05, Nate Lawson 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.