From owner-freebsd-acpi@FreeBSD.ORG Thu Jan 14 17:42:47 2010 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D9571065670 for ; Thu, 14 Jan 2010 17:42:47 +0000 (UTC) (envelope-from nate@root.org) Received: from mail.root.org (root.org [208.72.84.34]) by mx1.freebsd.org (Postfix) with ESMTP id 18BAA8FC15 for ; Thu, 14 Jan 2010 17:42:46 +0000 (UTC) Received: from [10.0.5.50] (ppp-71-139-9-149.dsl.snfc21.pacbell.net [71.139.9.149]) by mail.root.org (Postfix) with ESMTP id D9B6140DA; Thu, 14 Jan 2010 17:42:45 +0000 (UTC) Message-ID: <4B4F5791.5020902@root.org> Date: Thu, 14 Jan 2010 09:42:41 -0800 From: Nate Lawson User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Guido van Rooij References: <20100113204228.GA8768@gvr.gvr.org> <4B4E799E.2030405@root.org> <20100114075644.GA18572@gvr.gvr.org> In-Reply-To: <20100114075644.GA18572@gvr.gvr.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI CMBAT notify's never reach devd? 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, 14 Jan 2010 17:42:47 -0000 Guido van Rooij wrote: > On Wed, Jan 13, 2010 at 05:55:42PM -0800, Nate Lawson wrote: >> Most battery systems don't generate the notifies on level changes. So >> our ACPI battery implementation itself is polled. You should probably >> just run a cron job that checks the level. > > That can be done of course, but devd seems a better place. Yes, I just meant for now. >> Perhaps we could add a low and high mark to the kernel code, >> configurable by the user. It would be checked by the cmbat polling code >> and generate an artificial notify to devd if there was a match. >> > > Can you tell me which function in acpi_cmbat is used for polling, > as it seems to me thee is no regular polling. There is a define > CMBAT_POLLRATE but it is never used. It's been a long time since I looked at the code. I think it does it synchronously, in the context of a user requesting the value. So we don't have a periodic polling thread currently. -- Nate