diff options
author | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2011-08-17 16:10:28 +0000 |
---|---|---|
committer | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2011-08-17 16:10:28 +0000 |
commit | 83a4b2c1d01916a4f37477934f43d1634cb37950 (patch) | |
tree | 0967a4d87db7487a97dd2f4ce00d3ca5151984e1 /sys/dev/wscons | |
parent | ace31360c8511d1cf6cdc79a7cb1a24860a8b1cd (diff) |
Adding support Synaptics touchpad. Thanks all for test.
ok miod@, matthieu@
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r-- | sys/dev/wscons/wsmouse.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index e1ab5d29802..e5c72b09732 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmouse.c,v 1.21 2010/07/26 01:56:27 guenther Exp $ */ +/* $OpenBSD: wsmouse.c,v 1.22 2011/08/17 16:10:27 shadchin Exp $ */ /* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */ /* @@ -507,6 +507,14 @@ wsmouseopen(dev_t dev, int flags, int mode, struct proc *p) return (0); /* always allow open for write so ioctl() is possible. */ +#if NWSMUX > 0 + if (sc->sc_base.me_parent != NULL) { + /* Grab the mouse out of the greedy hands of the mux. */ + DPRINTF(("wsmouseopen: detach\n")); + wsmux_detach_sc(&sc->sc_base); + } +#endif + if (sc->sc_base.me_evp != NULL) return (EBUSY); @@ -541,6 +549,21 @@ wsmouseclose(dev_t dev, int flags, int mode, struct proc *p) (*sc->sc_accessops->disable)(sc->sc_accesscookie); wsevent_fini(evar); +#if NWSMUX > 0 + if (sc->sc_base.me_parent == NULL) { + int mux, error; + + DPRINTF(("wsmouseclose: attach\n")); + mux = sc->sc_base.me_dv.dv_cfdata->wsmousedevcf_mux; + if (mux >= 0) { + error = wsmux_attach_sc(wsmux_getmux(mux), &sc->sc_base); + if (error) + printf("%s: can't attach mux (error=%d)\n", + sc->sc_base.me_dv.dv_xname, error); + } + } +#endif + return (0); } |