From owner-cvs-all@FreeBSD.ORG Sat Jul 23 19:36:01 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D428816A41F; Sat, 23 Jul 2005 19:36:01 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6312843D5C; Sat, 23 Jul 2005 19:36:00 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6NJa0rn037228; Sat, 23 Jul 2005 19:36:00 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6NJa0Hk037227; Sat, 23 Jul 2005 19:36:00 GMT (envelope-from njl) Message-Id: <200507231936.j6NJa0Hk037227@repoman.freebsd.org> From: Nate Lawson Date: Sat, 23 Jul 2005 19:36:00 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/acpica acpi_battery.c acpi_cmbat.c acpi_if.m acpiio.h acpivar.h src/sys/i386/acpica acpi_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2005 19:36:02 -0000 njl 2005-07-23 19:36:00 UTC FreeBSD src repository Modified files: sys/dev/acpica acpi_battery.c acpi_cmbat.c acpivar.h acpiio.h acpi_if.m sys/i386/acpica acpi_machdep.c Log: Rewrite the acpi_battery interface to allow for other battery types (i.e., smart battery) and fix various bugs found during the cleanup. API changes: * kernel access: Access to individual batteries is now via devclass_find("battery"). Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and ACPI_BATT_GET_INFO (for _BIF-formatted data). The helper function acpi_battery_get_battinfo() now takes a device_t instead of a 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 now no need for a mapping between "virtual" unit and physical unit, usermode programs can just specify the unit directly and skip the old translation steps. In fact, acpiconf(8) was actually already doing this and virtual unit was the same as physical unit in all cases since there was previously only one battery type (acpi_cmbat). Additionally, we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all batteries, if they provide the associated methods. * apm compatibility device/ioctls: no change * sysctl: no change Since most third-party applications use the apm(4) compat interface, there should be very few affected applications (if any). Reviewed by: bruno MFC after: 5 days Revision Changes Path 1.13 +251 -129 src/sys/dev/acpica/acpi_battery.c 1.40 +149 -360 src/sys/dev/acpica/acpi_cmbat.c 1.7 +25 -0 src/sys/dev/acpica/acpi_if.m 1.15 +18 -26 src/sys/dev/acpica/acpiio.h 1.96 +6 -10 src/sys/dev/acpica/acpivar.h 1.29 +13 -8 src/sys/i386/acpica/acpi_machdep.c