1*b87210faStsutsui /* $NetBSD: kbvar.h,v 1.3 2008/05/14 13:29:28 tsutsui Exp $ */ 208f4daf2Stsutsui 308f4daf2Stsutsui /*- 4*b87210faStsutsui * Copyright (c) 2001 Izumi Tsutsui. All rights reserved. 508f4daf2Stsutsui * 608f4daf2Stsutsui * Redistribution and use in source and binary forms, with or without 708f4daf2Stsutsui * modification, are permitted provided that the following conditions 808f4daf2Stsutsui * are met: 908f4daf2Stsutsui * 1. Redistributions of source code must retain the above copyright 1008f4daf2Stsutsui * notice, this list of conditions and the following disclaimer. 1108f4daf2Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 1208f4daf2Stsutsui * notice, this list of conditions and the following disclaimer in the 1308f4daf2Stsutsui * documentation and/or other materials provided with the distribution. 1408f4daf2Stsutsui * 1508f4daf2Stsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1608f4daf2Stsutsui * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1708f4daf2Stsutsui * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1808f4daf2Stsutsui * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1908f4daf2Stsutsui * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2008f4daf2Stsutsui * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2108f4daf2Stsutsui * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2208f4daf2Stsutsui * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*b87210faStsutsui * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*b87210faStsutsui * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2508f4daf2Stsutsui */ 2608f4daf2Stsutsui 2708f4daf2Stsutsui struct console_softc { 2808f4daf2Stsutsui u_long cs_nintr; 2908f4daf2Stsutsui u_long cs_nkeyevents; 3008f4daf2Stsutsui int cs_isconsole; 3108f4daf2Stsutsui int cs_polling; 3208f4daf2Stsutsui int cs_key; 3308f4daf2Stsutsui u_int cs_type; 3408f4daf2Stsutsui int cs_val; 3508f4daf2Stsutsui }; 3608f4daf2Stsutsui 3708f4daf2Stsutsui struct kb_softc { 38820a544dStsutsui device_t sc_dev; 39820a544dStsutsui device_t sc_wskbddev; 4008f4daf2Stsutsui struct console_softc *sc_conssc; 4108f4daf2Stsutsui bus_space_tag_t sc_bt; 4208f4daf2Stsutsui bus_space_handle_t sc_bh; 4308f4daf2Stsutsui bus_size_t sc_offset; /* kb data port offset */ 4408f4daf2Stsutsui }; 4508f4daf2Stsutsui 4608f4daf2Stsutsui extern struct wskbd_accessops kb_accessops; 4708f4daf2Stsutsui extern struct wskbd_consops kb_consops; 4808f4daf2Stsutsui extern struct wskbd_mapdata kb_keymapdata; 4908f4daf2Stsutsui 5008f4daf2Stsutsui void kb_intr(struct kb_softc *); 5108f4daf2Stsutsui int kb_cnattach(struct console_softc *); 52