From owner-svn-src-head@FreeBSD.ORG Mon Jun 1 16:01:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119A01065686; Mon, 1 Jun 2009 16:01:09 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id B73288FC25; Mon, 1 Jun 2009 16:01:08 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id ABFFC581DC; Mon, 1 Jun 2009 11:01:07 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id DAPn7mFRm7j8; Mon, 1 Jun 2009 11:01:07 -0500 (CDT) Received: from wanderer.tachypleus.net (e179147144.adsl.alicedsl.de [85.179.147.144]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 6069958295; Mon, 1 Jun 2009 11:01:06 -0500 (CDT) Message-ID: <4A23FB40.1050405@freebsd.org> Date: Mon, 01 Jun 2009 18:01:04 +0200 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.21 (X11/20090410) MIME-Version: 1.0 To: John Baldwin References: <200905311002.n4VA2K6c037776@svn.freebsd.org> <200906010822.19951.jhb@freebsd.org> In-Reply-To: <200906010822.19951.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r193159 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 16:01:09 -0000 John Baldwin wrote: > On Sunday 31 May 2009 6:02:20 am Nathan Whitehorn wrote: > >> Author: nwhitehorn >> Date: Sun May 31 10:02:20 2009 >> New Revision: 193159 >> URL: http://svn.freebsd.org/changeset/base/193159 >> >> Log: >> Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to >> determine whether the computer is plugged in to mains power. >> > > I wonder if it would be a good idea to introduce a > platform-independent 'acline' sysctl? Something like 'hw.acline'? For now > we could simply have these devices create it. We could do something fancier > where AC adapter drivers register with a centralized thingie at some point > and it exports a global setting that is true so long as at least one adapter > is online. I'm not sure that level of complexity is warranted until we have > platforms with multiple AC lines exposed to the OS though. > That would be nice, and easy to implement, though the existing one should be kept for a while for compatibility. In the longer term, pmu(4) also provides an ACPI-alike interface to battery status under dev.pmu.*, which it would likewise be good to report in a platform-independent way. -Nathan