Home | History | Annotate | Line # | Download | only in pckbport
pmsvar.h revision 1.5.28.2
      1  1.5.28.1       mjf /*	$NetBSD: pmsvar.h,v 1.5.28.2 2009/01/17 13:29:07 mjf Exp $	*/
      2       1.1  christos 
      3       1.1  christos /*-
      4       1.1  christos  * Copyright (c) 2004 Kentaro Kurahone.
      5       1.1  christos  * Copyright (c) 2004 Ales Krenek.
      6       1.1  christos  * Copyright (c) 1994 Charles M. Hannum.
      7       1.1  christos  * Copyright (c) 1992, 1993 Erik Forsberg.
      8       1.1  christos  * All rights reserved.
      9       1.1  christos  *
     10       1.1  christos  * Redistribution and use in source and binary forms, with or without
     11       1.1  christos  * modification, are permitted provided that the following conditions
     12       1.1  christos  * are met:
     13       1.1  christos  * 1. Redistributions of source code must retain the above copyright
     14       1.1  christos  *    notice, this list of conditions and the following disclaimer.
     15       1.1  christos  *
     16       1.1  christos  * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
     17       1.1  christos  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     18       1.1  christos  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
     19       1.1  christos  * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     20       1.1  christos  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     21       1.1  christos  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     22       1.1  christos  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     23       1.1  christos  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     24       1.1  christos  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     25       1.1  christos  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26       1.1  christos  */
     27       1.1  christos 
     28       1.1  christos #ifndef _DEV_PCKBCPORT_PMSVAR_H_
     29       1.1  christos #define _DEV_PCKBCPORT_PMSVAR_H_
     30       1.1  christos 
     31  1.5.28.2       mjf #include <dev/pckbport/synapticsvar.h>
     32  1.5.28.2       mjf #include <dev/pckbport/elantechvar.h>
     33  1.5.28.2       mjf 
     34       1.1  christos enum pms_type {
     35       1.1  christos 	PMS_UNKNOWN,
     36       1.1  christos 	PMS_STANDARD,
     37       1.1  christos 	PMS_SCROLL3,
     38       1.1  christos 	PMS_SCROLL5,
     39  1.5.28.2       mjf 	PMS_SYNAPTICS,
     40  1.5.28.2       mjf 	PMS_ELANTECH
     41       1.1  christos };
     42       1.1  christos 
     43       1.1  christos struct pms_protocol {
     44       1.1  christos 	int rates[3];
     45       1.1  christos 	int response;
     46       1.1  christos 	const char *name;
     47       1.3     perry };
     48       1.1  christos 
     49       1.1  christos struct pms_softc {		/* driver status information */
     50  1.5.28.1       mjf 	device_t sc_dev;
     51       1.1  christos 
     52       1.1  christos 	pckbport_tag_t sc_kbctag;
     53       1.1  christos 	int sc_kbcslot;
     54       1.1  christos 
     55       1.1  christos 	int sc_enabled;		/* input enabled? */
     56       1.1  christos #ifndef PMS_DISABLE_POWERHOOK
     57       1.1  christos 	void *sc_powerhook;	/* cookie from power hook */
     58       1.1  christos 	int sc_suspended;	/* suspended? */
     59       1.1  christos #endif /* !PMS_DISABLE_POWERHOOK */
     60       1.1  christos 	int inputstate;		/* number of bytes received for this packet */
     61       1.1  christos 	u_int buttons;		/* mouse button status */
     62       1.1  christos 	enum pms_type protocol;
     63       1.1  christos 	unsigned char packet[6];
     64       1.1  christos 	struct timeval last, current;
     65       1.1  christos 
     66  1.5.28.1       mjf 	device_t sc_wsmousedev;
     67       1.5        ad 	struct lwp *sc_event_thread;
     68       1.1  christos 
     69  1.5.28.2       mjf #if defined(PMS_SYNAPTICS_TOUCHPAD) || defined(PMS_ELANTECH_TOUCHPAD)
     70       1.1  christos 	union {
     71  1.5.28.2       mjf #ifdef PMS_SYNAPTICS_TOUCHPAD
     72       1.1  christos 		struct synaptics_softc synaptics;
     73  1.5.28.2       mjf #endif
     74  1.5.28.2       mjf #ifdef PMS_ELANTECH_TOUCHPAD
     75  1.5.28.2       mjf 		struct elantech_softc elantech;
     76  1.5.28.2       mjf #endif
     77       1.1  christos 	} u;
     78       1.2       scw #endif
     79       1.1  christos };
     80       1.1  christos 
     81       1.1  christos #endif
     82