From owner-freebsd-current@FreeBSD.ORG Sat Jul 23 11:38:27 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 141FD16A41F; Sat, 23 Jul 2005 11:38:27 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from lapdance.yazzy.net (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BCB843D4C; Sat, 23 Jul 2005 11:38:25 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from localhost (localhost [127.0.0.1]) by lapdance.yazzy.net (8.13.4/8.13.4) with SMTP id j6NBcK8B000878; Sat, 23 Jul 2005 13:38:20 +0200 (CEST) (envelope-from lists@yazzy.org) Date: Sat, 23 Jul 2005 13:38:19 +0200 From: Marcin Jessa To: Eric Kjeldergaard Message-Id: <20050723133819.36efb537.lists@yazzy.org> In-Reply-To: References: <42E1481F.5040306@root.org> Organization: YazzY.org X-Mailer: Sylpheed version 1.9.12 (GTK+ 2.6.7; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org, freebsd-current@freebsd.org, nate@root.org Subject: Re: acpi battery rework patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2005 11:38:27 -0000 On Sat, 23 Jul 2005 19:00:01 +0900 Eric Kjeldergaard wrote: > On 7/23/05, Nate Lawson 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. > > > > -- > -CURRENT as of 23/07/2005, does not compile. Prolly because it's for 6.0, not 7.0