Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbport Enable Synaptics multifinger capability (Ex...
details: https://anonhg.NetBSD.org/src/rev/05ad12b10a2e
branches: trunk
changeset: 319558:05ad12b10a2e
user: ryoon <ryoon%NetBSD.org@localhost>
date: Sun Jun 03 07:24:18 2018 +0000
description:
Enable Synaptics multifinger capability (Extended W mode)
Magic parameters are taken from
https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/.
Tested on HP ProBook 4630s, Lenovo E530, VAIO Pro 11 and HP Spectre x360 ae.
diffstat:
sys/dev/pckbport/synaptics.c | 49 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 47 insertions(+), 2 deletions(-)
diffs (77 lines):
diff -r f5021d4ac68b -r 05ad12b10a2e sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c Sun Jun 03 05:55:08 2018 +0000
+++ b/sys/dev/pckbport/synaptics.c Sun Jun 03 07:24:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synaptics.c,v 1.38 2018/05/30 13:20:39 ryoon Exp $ */
+/* $NetBSD: synaptics.c,v 1.39 2018/06/03 07:24:18 ryoon Exp $ */
/*
* Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
#include "opt_pms.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.38 2018/05/30 13:20:39 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.39 2018/06/03 07:24:18 ryoon Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -433,6 +433,7 @@
struct synaptics_softc *sc = &psc->u.synaptics;
u_char enable_modes;
int res;
+ u_char cmd[1], resp[3];
if (sc->flags & SYN_FLAG_HAS_PASSTHROUGH) {
/*
@@ -474,6 +475,50 @@
for (int i = 0; i < 2; i++)
synaptics_poll_cmd(psc, PMS_SET_SCALE11, 0);
+ /*
+ * Enable multi-finger capability in cold boot case with
+ * undocumented dequence.
+ * Parameters from
+ * https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/
+ * VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
+ * setTouchPadModeByte function.
+ */
+ if (sc->flags & SYN_FLAG_HAS_EXTENDED_WMODE) {
+ cmd[0] = 0xe6;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0xe8;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0x00;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0xe8;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0x00;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0xe8;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0x00;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0xe8;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0x03;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0xf3;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ cmd[0] = 0xc8;
+ (void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
+ cmd, 1, 3, resp, 0);
+ }
+
synaptics_poll_cmd(psc, PMS_DEV_ENABLE, 0);
sc->up_down = 0;
Home |
Main Index |
Thread Index |
Old Index