Date: Thu, 14 Jan 2010 18:53:33 +0100 From: Guido van Rooij <guido@gvr.org> To: Nate Lawson <nate@root.org> Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI CMBAT notify's never reach devd? Message-ID: <20100114175333.GA26607@gvr.gvr.org> In-Reply-To: <4B4F5791.5020902@root.org> References: <20100113204228.GA8768@gvr.gvr.org> <4B4E799E.2030405@root.org> <20100114075644.GA18572@gvr.gvr.org> <4B4F5791.5020902@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 14, 2010 at 09:42:41AM -0800, Nate Lawson wrote: > 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. Indeed. That's how I read the code. Having a polling mechanism would involve a new thread (I think) just as with acpi_thermal. I'll just create a crontab for now ;) -Guido
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100114175333.GA26607>