Source-Changes-HG archive

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

[src/trunk]: src Move vald(4) to sys/dev/acpi. This is MI and should work als...



details:   https://anonhg.NetBSD.org/src/rev/4a2717af316f
branches:  trunk
changeset: 753796:4a2717af316f
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sat Apr 10 17:55:24 2010 +0000

description:
Move vald(4) to sys/dev/acpi. This is MI and should work also on amd64.

ok jmcneill@

XXX:    This is broken: it calls methods with absolute pathnames (almost
        guaranteed not to be portable across models), it accesses methods
        that are in the domain of other drivers, it walks the namespace on
        its own, it contains plenty of magic constants, it does not
        integrate with existing KPIs, etc. Summa summarum: this should be
        rewritten as a more generic toshiba_acpi(4).

diffstat:

 distrib/sets/lists/man/mi         |    8 +-
 share/man/man4/Makefile           |    4 +-
 share/man/man4/man4.i386/Makefile |    4 +-
 share/man/man4/man4.i386/vald.4   |   73 ---
 share/man/man4/vald.4             |   73 +++
 sys/arch/i386/acpi/vald_acpi.c    |  707 --------------------------------------
 sys/arch/i386/conf/GENERIC        |   12 +-
 sys/arch/i386/conf/files.i386     |    7 +-
 sys/dev/acpi/files.acpi           |    7 +-
 sys/dev/acpi/vald_acpi.c          |  707 ++++++++++++++++++++++++++++++++++++++
 10 files changed, 799 insertions(+), 803 deletions(-)

diffs (truncated from 1753 to 300 lines):

diff -r c8fa6bbdb4b2 -r 4a2717af316f distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sat Apr 10 17:40:36 2010 +0000
+++ b/distrib/sets/lists/man/mi Sat Apr 10 17:55:24 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1201 2010/04/10 04:29:39 jruoho Exp $
+# $NetBSD: mi,v 1.1202 2010/04/10 17:55:25 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1074,7 +1074,6 @@
 ./usr/share/man/cat4/i386/sony.0               man-obsolete            obsolete
 ./usr/share/man/cat4/i386/speaker.0            man-obsolete            obsolete
 ./usr/share/man/cat4/i386/spic.0               man-sys-catman          .cat
-./usr/share/man/cat4/i386/vald.0               man-sys-catman          .cat
 ./usr/share/man/cat4/i386/vesafb.0             man-obsolete            obsolete
 ./usr/share/man/cat4/i4b.0                     man-obsolete            obsolete
 ./usr/share/man/cat4/i4bctl.0                  man-obsolete            obsolete
@@ -1618,6 +1617,7 @@
 ./usr/share/man/cat4/uvscom.0                  man-sys-catman          .cat
 ./usr/share/man/cat4/uyap.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/uyurex.0                  man-sys-catman          .cat
+./usr/share/man/cat4/vald.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/vax/acc.0                 man-sys-catman          .cat
 ./usr/share/man/cat4/vax/ad.0                  man-sys-catman          .cat
 ./usr/share/man/cat4/vax/asc.0                 man-sys-catman          .cat
@@ -3707,7 +3707,6 @@
 ./usr/share/man/html4/i386/pcibios.html                man-sys-htmlman         html
 ./usr/share/man/html4/i386/pnpbios.html                man-sys-htmlman         html
 ./usr/share/man/html4/i386/spic.html           man-sys-htmlman         html
-./usr/share/man/html4/i386/vald.html           man-sys-htmlman         html
 ./usr/share/man/html4/i386/vesafb.html         man-obsolete            obsolete
 ./usr/share/man/html4/i915drm.html             man-sys-htmlman         html
 ./usr/share/man/html4/iavc.html                        man-sys-htmlman         html
@@ -4197,6 +4196,7 @@
 ./usr/share/man/html4/uvscom.html              man-sys-htmlman         html
 ./usr/share/man/html4/uyap.html                        man-sys-htmlman         html
 ./usr/share/man/html4/uyurex.html              man-sys-htmlman         html
+./usr/share/man/html4/vald.html                        man-sys-htmlman         html
 ./usr/share/man/html4/vax/acc.html             man-sys-htmlman         html
 ./usr/share/man/html4/vax/ad.html              man-sys-htmlman         html
 ./usr/share/man/html4/vax/asc.html             man-sys-htmlman         html
@@ -6162,7 +6162,6 @@
 ./usr/share/man/man4/i386/sony.4               man-obsolete            obsolete
 ./usr/share/man/man4/i386/speaker.4            man-obsolete            obsolete
 ./usr/share/man/man4/i386/spic.4               man-sys-man             .man
-./usr/share/man/man4/i386/vald.4               man-sys-man             .man
 ./usr/share/man/man4/i386/vesafb.4             man-obsolete            obsolete
 ./usr/share/man/man4/i4b.4                     man-obsolete            obsolete
 ./usr/share/man/man4/i4bctl.4                  man-obsolete            obsolete
@@ -6706,6 +6705,7 @@
 ./usr/share/man/man4/uvscom.4                  man-sys-man             .man
 ./usr/share/man/man4/uyap.4                    man-sys-man             .man
 ./usr/share/man/man4/uyurex.4                  man-sys-man             .man
+./usr/share/man/man4/vald.4                    man-sys-man             .man
 ./usr/share/man/man4/vax/acc.4                 man-sys-man             .man
 ./usr/share/man/man4/vax/ad.4                  man-sys-man             .man
 ./usr/share/man/man4/vax/asc.4                 man-sys-man             .man
diff -r c8fa6bbdb4b2 -r 4a2717af316f share/man/man4/Makefile
--- a/share/man/man4/Makefile   Sat Apr 10 17:40:36 2010 +0000
+++ b/share/man/man4/Makefile   Sat Apr 10 17:55:24 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.515 2010/04/08 18:20:46 jruoho Exp $
+#      $NetBSD: Makefile,v 1.516 2010/04/10 17:55:25 jruoho Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -57,7 +57,7 @@
        ti.4 tl.4 tlp.4 tlphy.4 \
        tp.4 tr.4 tra.4 trm.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \
        ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \
-       veriexec.4 vga.4 vge.4 viaide.4 video.4 vlan.4 vmmon.4 vmnet.4 \
+       vald.4 veriexec.4 vga.4 vge.4 viaide.4 video.4 vlan.4 vmmon.4 vmnet.4 \
        vnd.4 vr.4 \
        wapbl.4 wb.4 wbsio.4 wd.4 wdc.4 wi.4 wm.4 wpi.4 \
        wscons.4 wsdisplay.4 wsfont.4 wskbd.4 wsmouse.4 wsmux.4 \
diff -r c8fa6bbdb4b2 -r 4a2717af316f share/man/man4/man4.i386/Makefile
--- a/share/man/man4/man4.i386/Makefile Sat Apr 10 17:40:36 2010 +0000
+++ b/share/man/man4/man4.i386/Makefile Sat Apr 10 17:55:24 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.72 2009/02/19 00:57:10 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.73 2010/04/10 17:55:25 jruoho Exp $
 #      from: @(#)Makefile      8.1 (Berkeley) 6/5/93
 
 MAN=   apm.4 autoconf.4 \
@@ -7,7 +7,7 @@
        fdc.4 \
        gcscide.4 gcscpcib.4 geodewdog.4 geodecntr.4 glxsb.4 gscpcib.4 \
        intro.4 io.4 lms.4 lpt.4 mem.4 mms.4 npx.4 ndis.4 \
-       pcibios.4 pnpbios.4 spic.4 vald.4
+       pcibios.4 pnpbios.4 spic.4
 MLINKS=        mem.4 kmem.4
 MLINKS+=lpt.4 lpa.4
 MLINKS+=pcibios.4 PCIBIOS.4
diff -r c8fa6bbdb4b2 -r 4a2717af316f share/man/man4/man4.i386/vald.4
--- a/share/man/man4/man4.i386/vald.4   Sat Apr 10 17:40:36 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-.\" $NetBSD: vald.4,v 1.8 2009/03/10 21:05:02 joerg Exp $
-.\"
-.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
-.\" 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. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 25, 2008
-.Dt VALD 4 i386
-.Os
-.Sh NAME
-.Nm vald
-.Nd Toshiba Programmable I/O controller
-.Sh SYNOPSIS
-.Cd "vald* at acpi?"
-.Sh DESCRIPTION
-Some Toshiba computers have a special I/O controller that handles various
-interface devices.
-This special I/O controller is accessed by the
-.Dq GHCI
-ACPI method.
-The
-.Nm
-driver provides some support for it.
-.Pp
-The
-.Nm
-driver handles the following hot-keys:
-.Pp
-.Bl -tag -compact -offset indent -width "Fn+F5"
-.It Fn+F5
-Switch between LCD and External Video output.
-.It Fn+F6
-Decrease LCD brightness.
-.It Fn+F7
-Increase LCD brightness.
-.It Fn+F8
-Switch fan (ON/OFF).
-.El
-.Pp
-The
-.Nm
-driver has only been tested on the Libretto L3 and on the Portege 3440.
-.Sh SEE ALSO
-.Xr acpi 4
-.Sh HISTORY
-The
-.Nm
-driver appeared in
-.Nx 1.6 .
-.Sh BUGS
-.Nm
-may have problems with X11 when switching between LCD
-and External Video output.
diff -r c8fa6bbdb4b2 -r 4a2717af316f share/man/man4/vald.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/vald.4     Sat Apr 10 17:55:24 2010 +0000
@@ -0,0 +1,73 @@
+.\" $NetBSD: vald.4,v 1.1 2010/04/10 17:55:25 jruoho Exp $
+.\"
+.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
+.\" 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. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 25, 2008
+.Dt VALD 4 i386
+.Os
+.Sh NAME
+.Nm vald
+.Nd Toshiba Programmable I/O controller
+.Sh SYNOPSIS
+.Cd "vald* at acpi?"
+.Sh DESCRIPTION
+Some Toshiba computers have a special I/O controller that handles various
+interface devices.
+This special I/O controller is accessed by the
+.Dq GHCI
+ACPI method.
+The
+.Nm
+driver provides some support for it.
+.Pp
+The
+.Nm
+driver handles the following hot-keys:
+.Pp
+.Bl -tag -compact -offset indent -width "Fn+F5"
+.It Fn+F5
+Switch between LCD and External Video output.
+.It Fn+F6
+Decrease LCD brightness.
+.It Fn+F7
+Increase LCD brightness.
+.It Fn+F8
+Switch fan (ON/OFF).
+.El
+.Pp
+The
+.Nm
+driver has only been tested on the Libretto L3 and on the Portege 3440.
+.Sh SEE ALSO
+.Xr acpi 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Nx 1.6 .
+.Sh BUGS
+.Nm
+may have problems with X11 when switching between LCD
+and External Video output.
diff -r c8fa6bbdb4b2 -r 4a2717af316f sys/arch/i386/acpi/vald_acpi.c
--- a/sys/arch/i386/acpi/vald_acpi.c    Sat Apr 10 17:40:36 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,707 +0,0 @@
-/*     $NetBSD: vald_acpi.c,v 1.33 2010/04/08 04:40:51 jruoho Exp $    */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Masanori Kanaoka.
- *
- * 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. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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.
- */
-
-/*
- * Copyright 2001 Bill Sommerfeld.
- * 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. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed for the NetBSD Project by
- *     Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *    or promote products derived from this software without specific prior



Home | Main Index | Thread Index | Old Index