diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-04 12:47:00 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-04 12:47:00 +1000 |
commit | d6fc5be2969b9eede3c0fdd6e03daec4100a8c9f (patch) | |
tree | 34c7615bead1a2a0df108064da23a0dd2b34d0f6 | |
parent | de0dfb76444ad4160468d00515876c91a9fa20bf (diff) | |
parent | cf451f34e3bdd52a4eb072ce9f4b514eb83a1cfc (diff) |
Merge branch 'next'
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/alpscomm.c | 13 | ||||
-rw-r--r-- | src/alpscomm.h | 33 | ||||
-rw-r--r-- | src/eventcomm.c | 1 | ||||
-rw-r--r-- | src/ps2comm.c | 46 | ||||
-rw-r--r-- | src/ps2comm.h | 13 | ||||
-rw-r--r-- | src/psmcomm.c | 27 | ||||
-rw-r--r-- | src/synaptics.c | 100 | ||||
-rw-r--r-- | src/synapticsstr.h | 3 | ||||
-rw-r--r-- | src/synproto.h | 19 |
11 files changed, 106 insertions, 177 deletions
diff --git a/configure.ac b/configure.ac index c057ffb..c3605f3 100644 --- a/configure.ac +++ b/configure.ac @@ -98,21 +98,31 @@ AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) AC_MSG_CHECKING([which optional backends will be build]) case "${host}" in *linux*) - AC_MSG_RESULT([eventcomm]) + AC_MSG_RESULT([ps2comm alpscomm eventcomm]) + BUILD_PS2COMM="yes" BUILD_EVENTCOMM="yes" - AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled]) ;; -*freebsd* | *openbsd* | *netbsd* | *dragonfly*) - AC_MSG_RESULT([psmcomm]) +*freebsd* | *netbsd* | *dragonfly*) + AC_MSG_RESULT([ps2comm alpscomm psmcomm]) + BUILD_PS2COMM="yes" BUILD_PSMCOMM="yes" - AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled]) ;; *) AC_MSG_RESULT([none]) ;; esac +if test "x$BUILD_EVENTCOMM" = xyes; then + AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled]) +fi +if test "x$BUILD_PSMCOMM" = xyes; then + AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled]) +fi +if test "x$BUILD_PS2COMM" = xyes; then + AC_DEFINE(BUILD_PS2COMM, 1, [Optional backend ps2comm and alpscomm enabled]) +fi AM_CONDITIONAL([BUILD_EVENTCOMM], [test "x${BUILD_EVENTCOMM}" = "xyes"]) AM_CONDITIONAL([BUILD_PSMCOMM], [test "x${BUILD_PSMCOMM}" = "xyes"]) +AM_CONDITIONAL([BUILD_PS2COMM], [test "x${BUILD_PS2COMM}" = "xyes"]) # ----------------------------------------------------------------------------- # Dependencies for synclient and syndaemon diff --git a/src/Makefile.am b/src/Makefile.am index 980ab5e..ff513f1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,11 +32,15 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c synapticsstr.h \ - alpscomm.c alpscomm.h \ - ps2comm.c ps2comm.h \ synproto.h \ properties.c +if BUILD_PS2COMM +@DRIVER_NAME@_drv_la_SOURCES += \ + alpscomm.c \ + ps2comm.c ps2comm.h +endif + if BUILD_EVENTCOMM @DRIVER_NAME@_drv_la_SOURCES += \ eventcomm.c eventcomm.h diff --git a/src/alpscomm.c b/src/alpscomm.c index 84d2136..dc76655 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -33,10 +33,10 @@ #endif #include <xorg-server.h> -#include "alpscomm.h" #include "synproto.h" #include "synaptics.h" #include "synapticsstr.h" +#include "ps2comm.h" #include <xf86.h> @@ -206,7 +206,6 @@ ALPS_process_packet(unsigned char *packet, struct SynapticsHwState *hw) static Bool ALPSReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { unsigned char *buf = comm->protoBuf; @@ -221,17 +220,11 @@ ALPSReadHwState(InputInfoPtr pInfo, return TRUE; } -static Bool -ALPSAutoDevProbe(InputInfoPtr pInfo) -{ - return FALSE; -} - struct SynapticsProtocolOperations alps_proto_operations = { NULL, NULL, ALPSQueryHardware, ALPSReadHwState, - ALPSAutoDevProbe, - SynapticsDefaultDimensions + NULL, + NULL }; diff --git a/src/alpscomm.h b/src/alpscomm.h deleted file mode 100644 index 547cf72..0000000 --- a/src/alpscomm.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright © 2004 Peter Osterlund - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of Red Hat - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. Red - * Hat makes no representations about the suitability of this software - * for any purpose. It is provided "as is" without express or implied - * warranty. - * - * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN - * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Authors: - * Peter Osterlund (petero2@telia.com) - */ - -#ifndef _ALPSCOMM_H_ -#define _ALPSCOMM_H_ - -#include "ps2comm.h" - - -#endif /* _ALPSCOMM_H_ */ diff --git a/src/eventcomm.c b/src/eventcomm.c index 1a31c54..d394d3f 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -316,7 +316,6 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev) static Bool EventReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { struct input_event ev; diff --git a/src/ps2comm.c b/src/ps2comm.c index 4e372b3..0e9b861 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -37,10 +37,10 @@ #endif #include <xorg-server.h> -#include "ps2comm.h" #include "synproto.h" #include "synaptics.h" #include "synapticsstr.h" +#include "ps2comm.h" #include <xf86.h> #define MAX_UNSYNC_PACKETS 10 /* i.e. 10 to 60 bytes */ @@ -82,13 +82,6 @@ #define PS2DBG(x) #endif -struct SynapticsHwInfo { - unsigned int model_id; /* Model-ID */ - unsigned int capabilities; /* Capabilities */ - unsigned int ext_cap; /* Extended Capabilities */ - unsigned int identity; /* Identification */ -}; - /***************************************************************************** * PS/2 Utility functions. * Many parts adapted from tpconfig.c by C. Scott Ananian @@ -221,7 +214,7 @@ ps2_synaptics_reset(int fd) * see also SYN_MODEL_* macros */ static Bool -ps2_synaptics_model_id(int fd, struct SynapticsHwInfo *synhw) +ps2_synaptics_model_id(int fd, struct PS2SynapticsHwInfo *synhw) { byte mi[3]; @@ -246,7 +239,7 @@ ps2_synaptics_model_id(int fd, struct SynapticsHwInfo *synhw) * see also the SYN_CAP_* macros */ static Bool -ps2_synaptics_capability(int fd, struct SynapticsHwInfo *synhw) +ps2_synaptics_capability(int fd, struct PS2SynapticsHwInfo *synhw) { byte cap[3]; @@ -286,7 +279,7 @@ ps2_synaptics_capability(int fd, struct SynapticsHwInfo *synhw) * See also the SYN_ID_* macros */ static Bool -ps2_synaptics_identify(int fd, struct SynapticsHwInfo *synhw) +ps2_synaptics_identify(int fd, struct PS2SynapticsHwInfo *synhw) { byte id[3]; @@ -322,7 +315,7 @@ ps2_synaptics_disable_device(int fd) } static Bool -ps2_query_is_synaptics(int fd, struct SynapticsHwInfo* synhw) +ps2_query_is_synaptics(int fd, struct PS2SynapticsHwInfo* synhw) { int i; @@ -342,7 +335,7 @@ ps2_query_is_synaptics(int fd, struct SynapticsHwInfo* synhw) } void -ps2_print_ident(const struct SynapticsHwInfo *synhw) +ps2_print_ident(const struct PS2SynapticsHwInfo *synhw) { xf86Msg(X_PROBED, " Synaptics Touchpad, model: %d\n", SYN_ID_MODEL(synhw)); xf86Msg(X_PROBED, " Firmware: %d.%d\n", SYN_ID_MAJOR(synhw), @@ -388,11 +381,11 @@ PS2QueryHardware(InputInfoPtr pInfo) { int mode; SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private; - struct SynapticsHwInfo *synhw; + struct PS2SynapticsHwInfo *synhw; if (!priv->proto_data) - priv->proto_data = calloc(1, sizeof(struct SynapticsHwInfo)); - synhw = (struct SynapticsHwInfo*)priv->proto_data; + priv->proto_data = calloc(1, sizeof(struct PS2SynapticsHwInfo)); + synhw = (struct PS2SynapticsHwInfo*)priv->proto_data; /* is the synaptics touchpad active? */ if (!ps2_query_is_synaptics(pInfo->fd, synhw)) @@ -431,7 +424,7 @@ PS2QueryHardware(InputInfoPtr pInfo) * Decide if the current packet stored in priv->protoBuf is valid. */ static Bool -ps2_packet_ok(struct SynapticsHwInfo *synhw, struct CommData *comm) +ps2_packet_ok(struct PS2SynapticsHwInfo *synhw, struct CommData *comm) { unsigned char *buf = comm->protoBuf; int newabs = SYN_MODEL_NEWABS(synhw); @@ -460,7 +453,7 @@ ps2_packet_ok(struct SynapticsHwInfo *synhw, struct CommData *comm) } static Bool -ps2_synaptics_get_packet(InputInfoPtr pInfo, struct SynapticsHwInfo *synhw, +ps2_synaptics_get_packet(InputInfoPtr pInfo, struct PS2SynapticsHwInfo *synhw, struct SynapticsProtocolOperations *proto_ops, struct CommData *comm) { @@ -520,8 +513,8 @@ ps2_synaptics_get_packet(InputInfoPtr pInfo, struct SynapticsHwInfo *synhw, return FALSE; } -static Bool -PS2ReadHwState(InputInfoPtr pInfo, +Bool +PS2ReadHwStateProto(InputInfoPtr pInfo, struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { @@ -529,11 +522,11 @@ PS2ReadHwState(InputInfoPtr pInfo, struct SynapticsHwState *hw = &(comm->hwState); SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private; SynapticsParameters *para = &priv->synpara; - struct SynapticsHwInfo *synhw; + struct PS2SynapticsHwInfo *synhw; int newabs; int w, i; - synhw = (struct SynapticsHwInfo*)priv->proto_data; + synhw = (struct PS2SynapticsHwInfo*)priv->proto_data; if (!synhw) { xf86Msg(X_ERROR, @@ -661,9 +654,10 @@ PS2ReadHwState(InputInfoPtr pInfo, } static Bool -PS2AutoDevProbe(InputInfoPtr pInfo) +PS2ReadHwState(InputInfoPtr pInfo, + struct CommData *comm, struct SynapticsHwState *hwRet) { - return FALSE; + return PS2ReadHwStateProto(pInfo, &psaux_proto_operations, comm, hwRet); } struct SynapticsProtocolOperations psaux_proto_operations = { @@ -671,6 +665,6 @@ struct SynapticsProtocolOperations psaux_proto_operations = { PS2DeviceOffHook, PS2QueryHardware, PS2ReadHwState, - PS2AutoDevProbe, - SynapticsDefaultDimensions + NULL, + NULL }; diff --git a/src/ps2comm.h b/src/ps2comm.h index fec5634..006cc3f 100644 --- a/src/ps2comm.h +++ b/src/ps2comm.h @@ -94,10 +94,17 @@ typedef unsigned char byte; +struct PS2SynapticsHwInfo { + unsigned int model_id; /* Model-ID */ + unsigned int capabilities; /* Capabilities */ + unsigned int ext_cap; /* Extended Capabilities */ + unsigned int identity; /* Identification */ +}; Bool ps2_putbyte(int fd, byte b); - -struct SynapticsHwInfo; -void ps2_print_ident(const struct SynapticsHwInfo *synhw); +void ps2_print_ident(const struct PS2SynapticsHwInfo *synhw); +Bool PS2ReadHwStateProto(InputInfoPtr pInfo, + struct SynapticsProtocolOperations *proto_ops, + struct CommData *comm, struct SynapticsHwState *hwRet); #endif /* _PS2COMM_H_ */ diff --git a/src/psmcomm.c b/src/psmcomm.c index 741cd1d..73ad079 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -52,13 +52,6 @@ #define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) -struct SynapticsHwInfo { - unsigned int model_id; /* Model-ID */ - unsigned int capabilities; /* Capabilities */ - unsigned int ext_cap; /* Extended Capabilities */ - unsigned int identity; /* Identification */ -}; - /* * Identify Touchpad * See also the SYN_ID_* macros @@ -110,7 +103,7 @@ PSMQueryIsSynaptics(InputInfoPtr pInfo) } static void -convert_hw_info(const synapticshw_t *psm_ident, struct SynapticsHwInfo *synhw) +convert_hw_info(const synapticshw_t *psm_ident, struct PS2SynapticsHwInfo *synhw) { memset(synhw, 0, sizeof(*synhw)); synhw->model_id = ((psm_ident->infoRot180 << 23) | @@ -137,14 +130,14 @@ static Bool PSMQueryHardware(InputInfoPtr pInfo) { synapticshw_t psm_ident; - struct SynapticsHwInfo *synhw; + struct PS2SynapticsHwInfo *synhw; SynapticsPrivate *priv; priv = (SynapticsPrivate *)pInfo->private; if(!priv->proto_data) - priv->proto_data = calloc(1, sizeof(struct SynapticsHwInfo)); - synhw = (struct SynapticsHwInfo*)priv->proto_data; + priv->proto_data = calloc(1, sizeof(struct PS2SynapticsHwInfo)); + synhw = (struct PS2SynapticsHwInfo*)priv->proto_data; /* is the synaptics touchpad active? */ if (!PSMQueryIsSynaptics(pInfo)) @@ -164,15 +157,9 @@ PSMQueryHardware(InputInfoPtr pInfo) static Bool PSMReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { - return psaux_proto_operations.ReadHwState(pInfo, proto_ops, comm, hwRet); -} - -static Bool PSMAutoDevProbe(InputInfoPtr pInfo) -{ - return FALSE; + return PS2ReadHwStateProto(pInfo, &psm_proto_operations, comm, hwRet); } struct SynapticsProtocolOperations psm_proto_operations = { @@ -180,6 +167,6 @@ struct SynapticsProtocolOperations psm_proto_operations = { NULL, PSMQueryHardware, PSMReadHwState, - PSMAutoDevProbe, - SynapticsDefaultDimensions + NULL, + NULL }; diff --git a/src/synaptics.c b/src/synaptics.c index 56ce725..1233917 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -130,11 +130,29 @@ static Bool QueryHardware(InputInfoPtr); static void ReadDevDimensions(InputInfoPtr); static void ScaleCoordinates(SynapticsPrivate *priv, struct SynapticsHwState *hw); static void CalculateScalingCoeffs(SynapticsPrivate *priv); +static void SanitizeDimensions(InputInfoPtr pInfo); void InitDeviceProperties(InputInfoPtr pInfo); int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly); +const static struct { + const char *name; + struct SynapticsProtocolOperations *proto_ops; +} protocols[] = { +#ifdef BUILD_EVENTCOMM + {"event", &event_proto_operations}, +#endif +#ifdef BUILD_PSMCOMM + {"psm", &psm_proto_operations}, +#endif +#ifdef BUILD_PS2COMM + {"psaux", &psaux_proto_operations}, + {"alps", &alps_proto_operations}, +#endif + {NULL, NULL} +}; + InputDriverRec SYNAPTICS = { 1, "synaptics", @@ -183,8 +201,8 @@ _X_EXPORT XF86ModuleData synapticsModuleData = { * The default values 1900, etc. come from the dawn of time, when men where * men, or possibly apes. */ -void -SynapticsDefaultDimensions(InputInfoPtr pInfo) +static void +SanitizeDimensions(InputInfoPtr pInfo) { SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private; @@ -203,7 +221,7 @@ SynapticsDefaultDimensions(InputInfoPtr pInfo) { priv->miny = 1729; priv->maxy = 4171; - priv->resx = 0; + priv->resy = 0; xf86Msg(X_PROBED, "%s: invalid y-axis range. defaulting to %d - %d\n", @@ -234,61 +252,24 @@ SynapticsDefaultDimensions(InputInfoPtr pInfo) static void SetDeviceAndProtocol(InputInfoPtr pInfo) { - char *str_par, *device; SynapticsPrivate *priv = pInfo->private; - enum SynapticsProtocol proto = SYN_PROTO_PSAUX; + char *proto, *device; + int i; + proto = xf86SetStrOption(pInfo->options, "Protocol", NULL); device = xf86SetStrOption(pInfo->options, "Device", NULL); - if (!device) { - device = xf86SetStrOption(pInfo->options, "Path", NULL); - if (device) { - pInfo->options = - xf86ReplaceStrOption(pInfo->options, "Device", device); - } - } - if (device && strstr(device, "/dev/input/event")) { -#ifdef BUILD_EVENTCOMM - proto = SYN_PROTO_EVENT; -#endif - } else { - str_par = xf86FindOptionValue(pInfo->options, "Protocol"); - if (str_par && !strcmp(str_par, "psaux")) { - /* Already set up */ -#ifdef BUILD_EVENTCOMM - } else if (str_par && !strcmp(str_par, "event")) { - proto = SYN_PROTO_EVENT; -#endif /* BUILD_EVENTCOMM */ -#ifdef BUILD_PSMCOMM - } else if (str_par && !strcmp(str_par, "psm")) { - proto = SYN_PROTO_PSM; -#endif /* BUILD_PSMCOMM */ - } else if (str_par && !strcmp(str_par, "alps")) { - proto = SYN_PROTO_ALPS; - } else { /* default to auto-dev */ -#ifdef BUILD_EVENTCOMM - if (!device && event_proto_operations.AutoDevProbe(pInfo)) - proto = SYN_PROTO_EVENT; -#endif - } - } - switch (proto) { - case SYN_PROTO_PSAUX: - priv->proto_ops = &psaux_proto_operations; - break; -#ifdef BUILD_EVENTCOMM - case SYN_PROTO_EVENT: - priv->proto_ops = &event_proto_operations; - break; -#endif /* BUILD_EVENTCOMM */ -#ifdef BUILD_PSMCOMM - case SYN_PROTO_PSM: - priv->proto_ops = &psm_proto_operations; - break; -#endif /* BUILD_PSMCOMM */ - case SYN_PROTO_ALPS: - priv->proto_ops = &alps_proto_operations; - break; + for (i = 0; protocols[i].name; i++) { + if ((!device || !proto) && + protocols[i].proto_ops->AutoDevProbe && + protocols[i].proto_ops->AutoDevProbe(pInfo)) + break; + else if (proto && !strcmp(proto, protocols[i].name)) + break; } + free(proto); + free(device); + + priv->proto_ops = protocols[i].proto_ops; } /* @@ -444,7 +425,6 @@ static void set_default_parameters(InputInfoPtr pInfo) * If the range was autodetected, apply these edge widths to all four * sides. */ - SynapticsDefaultDimensions(pInfo); width = abs(priv->maxx - priv->minx); height = abs(priv->maxy - priv->miny); @@ -714,6 +694,10 @@ SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) /* may change pInfo->options */ SetDeviceAndProtocol(pInfo); + if (priv->proto_ops == NULL) { + xf86Msg(X_ERROR, "Synaptics driver unable to detect protocol\n"); + goto SetupProc_fail; + } /* open the touchpad device */ pInfo->fd = xf86OpenSerial(pInfo->options); @@ -844,7 +828,6 @@ DeviceOn(DeviceIntPtr dev) DBG(3, "Synaptics DeviceOn called\n"); - SetDeviceAndProtocol(pInfo); pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) { xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); @@ -1255,8 +1238,7 @@ static Bool SynapticsGetHwState(InputInfoPtr pInfo, SynapticsPrivate *priv, struct SynapticsHwState *hw) { - return priv->proto_ops->ReadHwState(pInfo, priv->proto_ops, - &priv->comm, hw); + return priv->proto_ops->ReadHwState(pInfo, &priv->comm, hw); } /* @@ -2613,6 +2595,8 @@ ReadDevDimensions(InputInfoPtr pInfo) if (priv->proto_ops->ReadDevDimensions) priv->proto_ops->ReadDevDimensions(pInfo); + + SanitizeDimensions(pInfo); } static Bool diff --git a/src/synapticsstr.h b/src/synapticsstr.h index 066b3f3..8f6593e 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -243,7 +243,4 @@ typedef struct _SynapticsPrivateRec enum TouchpadModel model; /* The detected model */ } SynapticsPrivate; - -extern void SynapticsDefaultDimensions(InputInfoPtr pInfo); - #endif /* _SYNAPTICSSTR_H_ */ diff --git a/src/synproto.h b/src/synproto.h index 96ddf3e..251dc84 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -67,40 +67,27 @@ struct CommData { Bool threeFingers; }; -enum SynapticsProtocol { - SYN_PROTO_PSAUX, /* Raw psaux device */ -#ifdef BUILD_EVENTCOMM - SYN_PROTO_EVENT, /* Linux kernel event interface */ -#endif /* BUILD_EVENTCOMM */ -#ifdef BUILD_PSMCOMM - SYN_PROTO_PSM, /* FreeBSD psm driver */ -#endif /* BUILD_PSMCOMM */ - SYN_PROTO_ALPS /* ALPS touchpad protocol */ -}; - struct _SynapticsParameters; -struct SynapticsHwInfo; -struct CommData; struct SynapticsProtocolOperations { void (*DeviceOnHook)(InputInfoPtr pInfo, struct _SynapticsParameters *para); void (*DeviceOffHook)(InputInfoPtr pInfo); Bool (*QueryHardware)(InputInfoPtr pInfo); Bool (*ReadHwState)(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet); Bool (*AutoDevProbe)(InputInfoPtr pInfo); void (*ReadDevDimensions)(InputInfoPtr pInfo); }; +#ifdef BUILD_PS2COMM extern struct SynapticsProtocolOperations psaux_proto_operations; +extern struct SynapticsProtocolOperations alps_proto_operations; +#endif /* BUILD_PS2COMM */ #ifdef BUILD_EVENTCOMM extern struct SynapticsProtocolOperations event_proto_operations; #endif /* BUILD_EVENTCOMM */ #ifdef BUILD_PSMCOMM extern struct SynapticsProtocolOperations psm_proto_operations; #endif /* BUILD_PSMCOMM */ -extern struct SynapticsProtocolOperations alps_proto_operations; - #endif /* _SYNPROTO_H_ */ |