atkbdreg.h revision 42421
142421Syokota/*- 242421Syokota * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 342421Syokota * All rights reserved. 442421Syokota * 542421Syokota * Redistribution and use in source and binary forms, with or without 642421Syokota * modification, are permitted provided that the following conditions 742421Syokota * are met: 842421Syokota * 1. Redistributions of source code must retain the above copyright 942421Syokota * notice, this list of conditions and the following disclaimer as 1042421Syokota * the first lines of this file unmodified. 1142421Syokota * 2. Redistributions in binary form must reproduce the above copyright 1242421Syokota * notice, this list of conditions and the following disclaimer in the 1342421Syokota * documentation and/or other materials provided with the distribution. 1442421Syokota * 1542421Syokota * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 1642421Syokota * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1742421Syokota * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1842421Syokota * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 1942421Syokota * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2042421Syokota * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2142421Syokota * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2242421Syokota * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2342421Syokota * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2442421Syokota * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2542421Syokota * 2642421Syokota * $Id: $ 2742421Syokota */ 2842421Syokota 2942421Syokota#ifndef _DEV_KBD_ATKBDREG_H_ 3042421Syokota#define _DEV_KBD_ATKBDREG_H_ 3142421Syokota 3242421Syokota#define ATKBD_DRIVER_NAME "atkbd" 3342421Syokota#define ATKBD_UNIT(dev) minor(dev) 3442421Syokota#define ATKBD_MKMINOR(unit) (unit) 3542421Syokota 3642421Syokota/* device configuration flags (atkbdprobe, atkbdattach) */ 3742421Syokota#define KB_CONF_FAIL_IF_NO_KBD (1 << 0) /* don't install if no kbd is found */ 3842421Syokota#define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */ 3942421Syokota#define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */ 4042421Syokota 4142421Syokota#ifdef KERNEL 4242421Syokota 4342421Syokotatypedef struct atkbd_softc { 4442421Syokota short flags; 4542421Syokota#define ATKBD_ATTACHED (1 << 0) 4642421Syokota keyboard_t *kbd; 4742421Syokota#ifdef KBD_INSTALL_CDEV 4842421Syokota genkbd_softc_t gensc; 4942421Syokota#endif 5042421Syokota} atkbd_softc_t; 5142421Syokota 5242421Syokota#ifdef __i386__ 5342421Syokotaatkbd_softc_t *atkbd_get_softc(int unit); 5442421Syokota#endif 5542421Syokotaint atkbd_probe_unit(int unit, atkbd_softc_t *sc, 5642421Syokota int port, int irq, int flags); 5742421Syokotaint atkbd_attach_unit(int unit, atkbd_softc_t *sc); 5842421Syokota 5942421Syokota#endif /* KERNEL */ 6042421Syokota 6142421Syokota#endif /* !_DEV_KBD_ATKBDREG_H_ */ 62