From owner-freebsd-acpi@FreeBSD.ORG Thu Dec 8 07:02:31 2005 Return-Path: X-Original-To: freebsd-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 A482216A41F for ; Thu, 8 Dec 2005 07:02:31 +0000 (GMT) (envelope-from skripachov@mail.ru) Received: from mx4.mail.ru (fallback.mail.ru [194.67.57.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 448F643D83 for ; Thu, 8 Dec 2005 07:02:22 +0000 (GMT) (envelope-from skripachov@mail.ru) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by mx4.mail.ru (mPOP.Fallback_MX) with ESMTP id 087F047B9B2 for ; Thu, 8 Dec 2005 10:02:18 +0300 (MSK) Received: from [213.183.242.226] (port=53892 helo=satellite.osatec-msk.ru) by mx3.mail.ru with esmtp id 1EkFf5-000O6R-00 for freebsd-acpi@freebsd.org; Thu, 08 Dec 2005 09:53:51 +0300 From: Yuri Skripachov To: freebsd-acpi@freebsd.org Date: Thu, 8 Dec 2005 09:53:49 +0300 User-Agent: KMail/1.8.3 References: <200512071659.58560.skripachov@mail.ru> In-Reply-To: <200512071659.58560.skripachov@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512080953.50224.skripachov@mail.ru> Subject: Re: Toshiba Satellite P10 + wrong battery state reported by ACPIIO_BATT_GET_BATTINFO. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 07:02:31 -0000 > Currently I've wrapped _BST method by masking returned state with > 0x7f. The same is possible for the acpi_battery_bst_valid() > function in dev/acpica/acpi_battery.c > Which way is right? ACPI spec v3.0 mentions of just bits 0, 1 and 2 in _BST battery state field so I think the best way is to mask the rest bits in the acpi_battery.c before comparing with ACPI_BATT_STAT_MAX. PS: Besides bit7 toshiba uses bit3 in battery state as a sign of 'warning' battery level :) Is special acpi_toshiba_battery need? -- Best regards, Yuri Skripachov mailto:skripachov@mail.ru "The faster I go, the behinder I get." -- Lewis Carroll --