From owner-cvs-all@FreeBSD.ORG Thu Jan 12 21:56:40 2006 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 61C7016A420; Thu, 12 Jan 2006 21:56:40 +0000 (GMT) (envelope-from bruno@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC41943D7B; Thu, 12 Jan 2006 21:56:37 +0000 (GMT) (envelope-from bruno@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 k0CLubCg057638; Thu, 12 Jan 2006 21:56:37 GMT (envelope-from bruno@repoman.freebsd.org) Received: (from bruno@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0CLubJY057637; Thu, 12 Jan 2006 21:56:37 GMT (envelope-from bruno) Message-Id: <200601122156.k0CLubJY057637@repoman.freebsd.org> From: Bruno Ducrot Date: Thu, 12 Jan 2006 21:56:37 +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_smbat.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: Thu, 12 Jan 2006 21:56:40 -0000 bruno 2006-01-12 21:56:37 UTC FreeBSD src repository Modified files: sys/dev/acpica acpi_smbat.c Log: * fix bst.status. We mark some bits, but forgot to reset all of them before. The symptom is that the battery inform us its charge and discharge at the same time... * fix bst.rate to correctly output the (dis)charging rate. We'll use the current average over one minute command and not the at_rate command. Note that this method is not correct if the capacity_mode is set, but since we don't set it ourself, it is not a problem. The at_rate do not give the actual rate but is used to compute the estimated time for (dis)charging a battery. We should actually write an estimation of the actual rate using at_rate cmd and then perform a read to the various estimators. Approved by: njl MFC after: 2 days Revision Changes Path 1.4 +17 -16 src/sys/dev/acpica/acpi_smbat.c