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).
This commit is contained in:
jruoho 2010-04-10 17:55:24 +00:00
parent 1ecf20919a
commit 039f34b662
8 changed files with 22 additions and 26 deletions

View File

@ -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

View File

@ -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 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
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 \

View File

@ -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 @@ MAN= apm.4 autoconf.4 \
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

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vald.4,v 1.8 2009/03/10 21:05:02 joerg Exp $
.\" $NetBSD: vald.4,v 1.1 2010/04/10 17:55:25 jruoho Exp $
.\"
.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
.\" All rights reserved.

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.978 2010/04/09 14:02:05 ahoka Exp $
# $NetBSD: GENERIC,v 1.979 2010/04/10 17:55:25 jruoho Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.978 $"
#ident "GENERIC-$Revision: 1.979 $"
maxusers 64 # estimated number of users
@ -376,8 +376,10 @@ mpu* at acpi? # Roland MPU-401 MIDI UART
npx* at acpi? # Math coprocessor
pckbc* at acpi? # PC keyboard controller
pcppi* at acpi? # AT-style speaker sound
sony* at acpi? # Sony Miscellaneous Controller
thinkpad* at acpi? # IBM/Lenovo Thinkpad hotkeys
ug* at acpi? # Abit uGuru Hardware monitor
vald* at acpi? # Toshiba Libretto hotkeys
wb* at acpi? # Winbond W83L518D SD/MMC reader
sdmmc* at wb? # SD/MMC bus
wmidell* at acpiwmibus? # Dell WMI mappings
@ -389,12 +391,6 @@ ym* at acpi? # Yamaha OPL3-SA[23] audio
spic* at acpi? # Sony Programmable I/O Controller
wsmouse* at spic?
# Sony LCD brightness etc.
sony* at acpi? # Sony Miscellaneous Controller
# Toshiba Libretto devices
vald* at acpi?
# Plug-and-Play BIOS and attached devices
#pnpbios* at mainbus?

View File

@ -1,4 +1,4 @@
# $NetBSD: files.i386,v 1.353 2010/01/03 04:06:31 dholland Exp $
# $NetBSD: files.i386,v 1.354 2010/04/10 17:55:25 jruoho Exp $
#
# new style config file for i386 architecture
#
@ -481,11 +481,6 @@ include "arch/i386/pnpbios/files.pnpbios"
include "dev/acpi/files.acpi"
file arch/i386/acpi/acpi_wakeup_low.S acpi
# Toshiba VALD
device vald
attach vald at acpinodebus with vald_acpi
file arch/i386/acpi/vald_acpi.c vald_acpi
# Numeric Processing Extension; Math Co-processor
attach npx at acpinodebus with npx_acpi
file arch/i386/acpi/npx_acpi.c npx_acpi

View File

@ -1,4 +1,4 @@
# $NetBSD: files.acpi,v 1.70 2010/04/08 12:14:19 jruoho Exp $
# $NetBSD: files.acpi,v 1.71 2010/04/10 17:55:24 jruoho Exp $
include "dev/acpi/acpica/files.acpica"
@ -127,6 +127,11 @@ device sony: displaydev
attach sony at acpinodebus with sony_acpi
file dev/acpi/sony_acpi.c sony_acpi
# Toshiba hotkeys
device vald
attach vald at acpinodebus with vald_acpi
file dev/acpi/vald_acpi.c vald_acpi
# Sony SPIC (jog dial etc.)
attach spic at acpinodebus with spic_acpi
file dev/acpi/spic_acpi.c spic_acpi

View File

@ -1,4 +1,4 @@
/* $NetBSD: vald_acpi.c,v 1.33 2010/04/08 04:40:51 jruoho Exp $ */
/* $NetBSD: vald_acpi.c,v 1.1 2010/04/10 17:55:24 jruoho Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vald_acpi.c,v 1.33 2010/04/08 04:40:51 jruoho Exp $");
__KERNEL_RCSID(0, "$NetBSD: vald_acpi.c,v 1.1 2010/04/10 17:55:24 jruoho Exp $");
#include <sys/param.h>
#include <sys/systm.h>