The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/pckbport/pckbportvar.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $NetBSD: pckbportvar.h,v 1.3 2004/03/24 17:26:53 drochner Exp $ */
    2 
    3 /*
    4  * Copyright (c) 2004 Ben Harris
    5  * Copyright (c) 1998
    6  *      Matthias Drochner.  All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or without
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above copyright
   14  *    notice, this list of conditions and the following disclaimer in the
   15  *    documentation and/or other materials provided with the distribution.
   16  *
   17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   27  *
   28  */
   29 
   30 #ifndef _DEV_PCKBPORT_PCKBPORTVAR_H_
   31 #define _DEV_PCKBPORT_PCKBPORTVAR_H_
   32 
   33 #include <sys/callout.h>
   34 
   35 typedef struct pckbport_tag *pckbport_tag_t;
   36 typedef int pckbport_slot_t;
   37 
   38 #define PCKBPORT_KBD_SLOT       0
   39 #define PCKBPORT_AUX_SLOT       1
   40 #define PCKBPORT_NSLOTS 2
   41 
   42 typedef void (*pckbport_inputfcn)(void *, int);
   43 
   44 struct pckbport_accessops {
   45         /* Functions to be provided by controller driver (eg pckbc) */
   46         int     (*t_xt_translation)(void *, pckbport_slot_t, int);
   47         int     (*t_send_devcmd)   (void *, pckbport_slot_t, u_char);
   48         int     (*t_poll_data1)    (void *, pckbport_slot_t);
   49         void    (*t_slot_enable)   (void *, pckbport_slot_t, int);
   50         void    (*t_intr_establish)(void *, pckbport_slot_t);
   51         void    (*t_set_poll)      (void *, pckbport_slot_t, int);
   52 };      
   53 
   54 /*
   55  * external representation (pckbport_tag_t),
   56  * needed early for console operation
   57  */
   58 struct pckbport_tag { 
   59         struct pckbport_slotdata *t_slotdata[PCKBPORT_NSLOTS];
   60 
   61         struct callout t_cleanup;
   62 
   63         pckbport_inputfcn t_inputhandler[PCKBPORT_NSLOTS];
   64         void *t_inputarg[PCKBPORT_NSLOTS];
   65         char *t_subname[PCKBPORT_NSLOTS];
   66 
   67         struct pckbport_accessops const *t_ops;
   68         /* First argument to all those */
   69         void    *t_cookie;
   70 };
   71 
   72 struct pckbport_attach_args {
   73         pckbport_tag_t pa_tag;
   74         pckbport_slot_t pa_slot;
   75 };
   76 
   77 extern const char * const pckbport_slot_names[];
   78 extern struct pckbport_tag pckbport_consdata;
   79 extern int pckbport_console_attached;
   80 
   81 /* Calls from pckbd etc */
   82 void pckbport_set_inputhandler(pckbport_tag_t, pckbport_slot_t,
   83                                  pckbport_inputfcn, void *, char *);
   84 
   85 void pckbport_flush(pckbport_tag_t, pckbport_slot_t);
   86 int pckbport_poll_cmd(pckbport_tag_t, pckbport_slot_t, u_char *, int,
   87                         int, u_char *, int);
   88 int pckbport_enqueue_cmd(pckbport_tag_t, pckbport_slot_t, u_char *, int,
   89                            int, int, u_char *);
   90 int pckbport_poll_data(pckbport_tag_t, pckbport_slot_t);
   91 void pckbport_set_poll(pckbport_tag_t, pckbport_slot_t, int);
   92 int pckbport_xt_translation(pckbport_tag_t, pckbport_slot_t, int);
   93 void pckbport_slot_enable(pckbport_tag_t, pckbport_slot_t, int);
   94 
   95 /* calls from pckbc etc */
   96 int pckbport_cnattach(void *, struct pckbport_accessops const *,
   97                               pckbport_slot_t);
   98 pckbport_tag_t pckbport_attach(void *,
   99                                        struct pckbport_accessops const *);
  100 struct device *pckbport_attach_slot(struct device *, pckbport_tag_t,
  101                                             pckbport_slot_t);
  102 void pckbportintr(pckbport_tag_t, pckbport_slot_t, int);
  103 
  104 /* md hook for use without mi wscons */
  105 int pckbport_machdep_cnattach(pckbport_tag_t, pckbport_slot_t);
  106 
  107 #endif /* _DEV_PCKBPORT_PCKBPORTVAR_H_ */

Cache object: 17e762800120d171294a5507fb8762f5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.