Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add a dummy-driver for ACPI fans.



details:   https://anonhg.NetBSD.org/src/rev/f403b2936ca0
branches:  trunk
changeset: 760624:f403b2936ca0
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Jan 09 15:12:33 2011 +0000

description:
Add a dummy-driver for ACPI fans.

diffstat:

 distrib/sets/lists/man/mi           |    5 +-
 distrib/sets/lists/modules/md.amd64 |    4 +-
 distrib/sets/lists/modules/md.i386  |    4 +-
 share/man/man4/Makefile             |    4 +-
 share/man/man4/acpi.4               |    7 +-
 share/man/man4/acpifan.4            |   75 ++++++++++
 share/man/man4/acpitz.4             |    9 +-
 sys/arch/amd64/conf/GENERIC         |    5 +-
 sys/arch/i386/conf/ALL              |   13 +-
 sys/arch/i386/conf/GENERIC          |    5 +-
 sys/dev/acpi/acpi_fan.c             |  256 ++++++++++++++++++++++++++++++++++++
 sys/dev/acpi/files.acpi             |    7 +-
 sys/modules/Makefile                |    3 +-
 sys/modules/acpifan/ACPIFAN.ioconf  |   10 +
 sys/modules/acpifan/Makefile        |   13 +
 15 files changed, 397 insertions(+), 23 deletions(-)

diffs (truncated from 648 to 300 lines):

diff -r 54c8d53213bf -r f403b2936ca0 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sun Jan 09 14:58:10 2011 +0000
+++ b/distrib/sets/lists/man/mi Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1272 2011/01/05 20:08:12 jruoho Exp $
+# $NetBSD: mi,v 1.1273 2011/01/09 15:12:33 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -635,6 +635,7 @@
 ./usr/share/man/cat4/acpidalb.0                        man-sys-catman          .cat
 ./usr/share/man/cat4/acpiec.0                  man-sys-catman          .cat
 ./usr/share/man/cat4/acpiecdt.0                        man-sys-catman          .cat
+./usr/share/man/cat4/acpifan.0                 man-sys-catman          .cat
 ./usr/share/man/cat4/acpilid.0                 man-sys-catman          .cat
 ./usr/share/man/cat4/acpiout.0                 man-sys-catman          .cat
 ./usr/share/man/cat4/acpipmtr.0                        man-sys-catman          .cat
@@ -3400,6 +3401,7 @@
 ./usr/share/man/html4/acpidalb.html            man-sys-htmlman         html
 ./usr/share/man/html4/acpiec.html              man-sys-htmlman         html
 ./usr/share/man/html4/acpiecdt.html            man-sys-htmlman         html
+./usr/share/man/html4/acpifan.html             man-sys-htmlman         html
 ./usr/share/man/html4/acpilid.html             man-sys-htmlman         html
 ./usr/share/man/html4/acpiout.html             man-sys-htmlman         html
 ./usr/share/man/html4/acpipmtr.html            man-sys-htmlman         html
@@ -5865,6 +5867,7 @@
 ./usr/share/man/man4/acpidalb.4                        man-sys-man             .man
 ./usr/share/man/man4/acpiec.4                  man-sys-man             .man
 ./usr/share/man/man4/acpiecdt.4                        man-sys-man             .man
+./usr/share/man/man4/acpifan.4                 man-sys-man             .man
 ./usr/share/man/man4/acpilid.4                 man-sys-man             .man
 ./usr/share/man/man4/acpiout.4                 man-sys-man             .man
 ./usr/share/man/man4/acpipmtr.4                        man-sys-man             .man
diff -r 54c8d53213bf -r f403b2936ca0 distrib/sets/lists/modules/md.amd64
--- a/distrib/sets/lists/modules/md.amd64       Sun Jan 09 14:58:10 2011 +0000
+++ b/distrib/sets/lists/modules/md.amd64       Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.10 2011/01/05 20:15:52 jruoho Exp $
+# $NetBSD: md.amd64,v 1.11 2011/01/09 15:12:33 jruoho Exp $
 ./@MODULEDIR@/acpiacad                         base-kernel-modules     kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod           base-kernel-modules     kmod
 ./@MODULEDIR@/acpibat                          base-kernel-modules     kmod
@@ -9,6 +9,8 @@
 ./@MODULEDIR@/acpicpu/acpicpu.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/acpidalb                         base-kernel-modules     kmod
 ./@MODULEDIR@/acpidalb/acpidalb.kmod           base-kernel-modules     kmod
+./@MODULEDIR@/acpifan                          base-kernel-modules     kmod
+./@MODULEDIR@/acpifan/acpifan.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/acpilid                          base-kernel-modules     kmod
 ./@MODULEDIR@/acpilid/acpilid.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/acpipmtr                         base-kernel-modules     kmod
diff -r 54c8d53213bf -r f403b2936ca0 distrib/sets/lists/modules/md.i386
--- a/distrib/sets/lists/modules/md.i386        Sun Jan 09 14:58:10 2011 +0000
+++ b/distrib/sets/lists/modules/md.i386        Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.11 2011/01/05 20:15:52 jruoho Exp $
+# $NetBSD: md.i386,v 1.12 2011/01/09 15:12:33 jruoho Exp $
 ./@MODULEDIR@/acpiacad                         base-kernel-modules     kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod           base-kernel-modules     kmod
 ./@MODULEDIR@/acpibat                          base-kernel-modules     kmod
@@ -9,6 +9,8 @@
 ./@MODULEDIR@/acpicpu/acpicpu.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/acpidalb                         base-kernel-modules     kmod
 ./@MODULEDIR@/acpidalb/acpidalb.kmod           base-kernel-modules     kmod
+./@MODULEDIR@/acpifan                          base-kernel-modules     kmod
+./@MODULEDIR@/acpifan/acpifan.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/acpilid                          base-kernel-modules     kmod
 ./@MODULEDIR@/acpilid/acpilid.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/acpipmtr                         base-kernel-modules     kmod
diff -r 54c8d53213bf -r f403b2936ca0 share/man/man4/Makefile
--- a/share/man/man4/Makefile   Sun Jan 09 14:58:10 2011 +0000
+++ b/share/man/man4/Makefile   Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.541 2011/01/05 20:08:13 jruoho Exp $
+#      $NetBSD: Makefile,v 1.542 2011/01/09 15:12:34 jruoho Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -82,7 +82,7 @@
 
 # ACPI devices
 MAN+=  acpi.4 acpiacad.4 acpibat.4 acpibut.4 acpicpu.4 \
-       acpidalb.4 acpiec.4 acpilid.4 \
+       acpidalb.4 acpiec.4 acpifan.4 acpilid.4 \
        acpipmtr.4 acpismbus.4 acpitz.4 acpivga.4 acpiwmi.4
 
 # Radio devices
diff -r 54c8d53213bf -r f403b2936ca0 share/man/man4/acpi.4
--- a/share/man/man4/acpi.4     Sun Jan 09 14:58:10 2011 +0000
+++ b/share/man/man4/acpi.4     Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpi.4,v 1.65 2011/01/05 21:09:16 jruoho Exp $
+.\" $NetBSD: acpi.4,v 1.66 2011/01/09 15:12:34 jruoho Exp $
 .\"
 .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 5, 2011
+.Dd January 9, 2011
 .Dt ACPI 4
 .Os
 .Sh NAME
@@ -238,6 +238,9 @@
 .Tn ACPI
 Embedded Controller Boot Resource Table
 .Pq Tn ECDT .
+.It Xr acpifan 4
+.Tn ACPI
+fans.
 .It Xr acpilid 4
 .Tn ACPI
 lid switches.
diff -r 54c8d53213bf -r f403b2936ca0 share/man/man4/acpifan.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/acpifan.4  Sun Jan 09 15:12:33 2011 +0000
@@ -0,0 +1,75 @@
+.\" $NetBSD
+.\"
+.\" Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Neither the name of the author nor the names of any
+.\"    contributors may be used to endorse or promote products derived
+.\"    from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 9, 2011
+.Dt ACPIFAN 4
+.Os
+.Sh NAME
+.Nm acpifan
+.Nd ACPI Fan
+.Sh SYNOPSIS
+.Cd "acpifan* at acpi?"
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports fans possibly exposed by the
+.Tn BIOS .
+Even though a system may have only one physical fan, multiple
+.Nm
+instances may be present.
+In such cases each
+.Nm
+typically represents an
+.Xr acpitz 4
+thermal zone, and the combined state of all
+instances reveals the speed of the fan.
+.Pp
+The
+.Nm
+driver does not support controlling the fan.
+The current state (on or off) is made available through the
+.Xr envsys 4
+.Tn API
+and the
+.Xr envstat 8
+command.
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr acpitz 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 6.0 .
+.Sh AUTHORS
+.An Jukka Ruohonen
+.Aq jruohonen%iki.fi@localhost
+.Sh BUGS
+The
+.Nm
+driver does not yet support additional functionality introduced in the
+.Tn ACPI
+4.0 specification.
diff -r 54c8d53213bf -r f403b2936ca0 share/man/man4/acpitz.4
--- a/share/man/man4/acpitz.4   Sun Jan 09 14:58:10 2011 +0000
+++ b/share/man/man4/acpitz.4   Sun Jan 09 15:12:33 2011 +0000
@@ -1,6 +1,6 @@
-.\" $NetBSD: acpitz.4,v 1.11 2010/04/25 06:54:40 jruoho Exp $
+.\" $NetBSD: acpitz.4,v 1.12 2011/01/09 15:12:34 jruoho Exp $
 .\"
-.\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2003, 2004, 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 25, 2010
+.Dd January 9, 2011
 .Dt ACPITZ 4
 .Os
 .Sh NAME
@@ -94,6 +94,7 @@
 instantly and no event will have a chance to be sent.
 .Sh SEE ALSO
 .Xr acpi 4 ,
+.Xr acpifan 4 ,
 .Xr envsys 4 ,
 .Xr envstat 8 ,
 .Xr powerd 8
@@ -103,6 +104,8 @@
 driver
 appeared in
 .Nx 2.0 .
+.Sh AUTHORS
+.An Jared D. McNeill Aq jmcneill%invisible.ca@localhost
 .Sh CAVEATS
 While no pronounced bugs are known to exist,
 several caveats can be mentioned:
diff -r 54c8d53213bf -r f403b2936ca0 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Sun Jan 09 14:58:10 2011 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.297 2011/01/09 08:05:47 jruoho Exp $
+# $NetBSD: GENERIC,v 1.298 2011/01/09 15:12:33 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.297 $"
+#ident                 "GENERIC-$Revision: 1.298 $"
 
 maxusers       64              # estimated number of users
 
@@ -278,6 +278,7 @@
 acpidalb*      at acpi?                # Direct Application Launch Button
 acpiec*        at acpi?                # ACPI Embedded Controller (late)
 acpiecdt*      at acpi?                # ACPI Embedded Controller (early)
+acpifan*       at acpi?                # ACPI Fan
 acpilid*       at acpi?                # ACPI Lid Switch
 #acpipmtr*     at acpi?                # ACPI Power Meter (experimental)
 #acpismbus*    at acpi?                # ACPI SMBus CMI (experimental)
diff -r 54c8d53213bf -r f403b2936ca0 sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL    Sun Jan 09 14:58:10 2011 +0000
+++ b/sys/arch/i386/conf/ALL    Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.283 2011/01/03 06:07:43 tsutsui Exp $
+# $NetBSD: ALL,v 1.284 2011/01/09 15:12:33 jruoho Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "ALL-$Revision: 1.283 $"
+#ident                 "ALL-$Revision: 1.284 $"
 
 maxusers       64              # estimated number of users
 
@@ -364,12 +364,11 @@
 acpibut*       at acpi?                # ACPI Button
 acpicpu*       at acpi?                # ACPI CPU
 acpidalb*      at acpi?                # ACPI Direct Application Launch Button
-# The ACPI Embedded Controller is generally configured via the special ECDT.
-# This is required as parts of the DSDT can reference the EC before the normal
-# attach phase.
-acpiec*        at acpi?                # ACPI Embedded Controller (late binding)
-acpiecdt*      at acpi?                # ACPI Embedded Controller (early binding)
+acpiec*        at acpi?                # ACPI Embedded Controller (late)
+acpiecdt*      at acpi?                # ACPI Embedded Controller (early)
+acpifan*       at acpi?                # ACPI Fan
 acpilid*       at acpi?                # ACPI Lid Switch
+acpipmtr*      at acpi?                # ACPI Power Meter (experimental)
 # XXX Do not enable this in a real kernel unless you also disable any
 # XXX "native" i2c controller.  Otherwise you'll have two accessors to
 # XXX the same bus, and bad things (tm) will happen!
diff -r 54c8d53213bf -r f403b2936ca0 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Sun Jan 09 14:58:10 2011 +0000
+++ b/sys/arch/i386/conf/GENERIC        Sun Jan 09 15:12:33 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1005 2011/01/05 20:08:12 jruoho Exp $
+# $NetBSD: GENERIC,v 1.1006 2011/01/09 15:12:33 jruoho Exp $
 #



Home | Main Index | Thread Index | Old Index