You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <sch...@us...> - 2010-08-03 07:15:01
|
Revision: 11 http://pmss.svn.sourceforge.net/pmss/?rev=11&view=rev Author: schulte2005 Date: 2010-08-03 07:14:54 +0000 (Tue, 03 Aug 2010) Log Message: ----------- o Removed a redundant forward declaration. Modified Paths: -------------- trunk/pms_synaptics.c Modified: trunk/pms_synaptics.c =================================================================== --- trunk/pms_synaptics.c 2010-08-02 09:45:11 UTC (rev 10) +++ trunk/pms_synaptics.c 2010-08-03 07:14:54 UTC (rev 11) @@ -276,7 +276,6 @@ }; int pmss_change_state(struct pmss_softc *, int); -int pmss_enable(void *); int pmss_ioctl(void *, u_long, caddr_t, int, struct proc *); int pmss_enable(void *); void pmss_disable(void *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sch...@us...> - 2010-08-02 09:45:18
|
Revision: 10 http://pmss.svn.sourceforge.net/pmss/?rev=10&view=rev Author: schulte2005 Date: 2010-08-02 09:45:11 +0000 (Mon, 02 Aug 2010) Log Message: ----------- o Added suspend/resume support. Modified Paths: -------------- trunk/README.txt trunk/pms_synaptics.c Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2010-05-27 06:31:12 UTC (rev 9) +++ trunk/README.txt 2010-08-02 09:45:11 UTC (rev 10) @@ -3,8 +3,8 @@ Introduction This archive contains an experimental Synaptics TouchPad driver for the - OpenBSD operating system kernel. I wrote it mainly to add support for - the 3rd button available on my laptop and to get the right-edge vertical + OpenBSD operating system kernel. It was written to add support for the + 3rd button available on my laptop and to get the right-edge vertical scrolling I got used to over the years working. As of this writing, that one touchpad is the only one, this driver has ever been tested with. The Sourceforge project got created mainly for archival purposes. Please @@ -46,5 +46,5 @@ including a patch. If you want to trace the packets received from the touch pad, additionally - add a PMSSDEBUG option. This will print any packet received to the console, - so will produce lots of output. + add a PMSSDEBUG option. This will print any packet received to the console + (lots of output). Modified: trunk/pms_synaptics.c =================================================================== --- trunk/pms_synaptics.c 2010-05-27 06:31:12 UTC (rev 9) +++ trunk/pms_synaptics.c 2010-08-02 09:45:11 UTC (rev 10) @@ -218,9 +218,17 @@ pckbc_tag_t sc_kbctag; pckbc_slot_t sc_kbcslot; - int sc_enabled; + int sc_state; +#define PMSS_STATE_DISABLED 0 +#define PMSS_STATE_ENABLED 1 +#define PMSS_STATE_SUSPENDED 2 + int sc_inputstate; +#ifdef PMSSDEBUG + u_int syn_packetid; +#endif + u_int syn_identification; u_int syn_capabilities; u_int syn_modebits; @@ -238,7 +246,7 @@ }; #define PMSS_SOFTC_ENABLE(sc) \ - (sc)->sc_enabled = 1; \ + (sc)->sc_state = PMSS_STATE_ENABLED; \ (sc)->sc_inputstate = 0; \ (sc)->syn_auxbuttons = 0; \ (sc)->syn_ax = 0; \ @@ -248,7 +256,7 @@ bzero(&(sc)->syn_packet, sizeof ((sc)->syn_packet)); #define PMSS_SOFTC_DISABLE(sc) \ - (sc)->sc_enabled = 0; \ + (sc)->sc_state = PMSS_STATE_DISABLED; \ (sc)->sc_inputstate = 0; \ (sc)->syn_auxbuttons = 0; \ (sc)->syn_ax = 0; \ @@ -259,15 +267,19 @@ int pmssprobe(struct device *, void *, void *); void pmssattach(struct device *, struct device *, void *); +int pmssactivate(struct device *, int); void pmssinput(void *, int); struct cfattach pmss_ca = { - sizeof(struct pmss_softc), pmssprobe, pmssattach, + sizeof(struct pmss_softc), pmssprobe, pmssattach, NULL, + pmssactivate }; +int pmss_change_state(struct pmss_softc *, int); int pmss_enable(void *); int pmss_ioctl(void *, u_long, caddr_t, int, struct proc *); -void pmss_disable(void *); +int pmss_enable(void *); +void pmss_disable(void *); const struct wsmouse_accessops pmss_accessops = { pmss_enable, @@ -712,44 +724,78 @@ } int -pmss_enable(v) - void *v; +pmssactivate(struct device *self, int act) { - struct pmss_softc *sc = v; + struct pmss_softc *sc = (struct pmss_softc *)self; + switch (act) { + case DVACT_SUSPEND: + if (sc->sc_state == PMSS_STATE_ENABLED) + pmss_change_state(sc, PMSS_STATE_SUSPENDED); + break; + case DVACT_RESUME: + if (sc->sc_state == PMSS_STATE_SUSPENDED) + pmss_change_state(sc, PMSS_STATE_ENABLED); + break; + } + return (0); +} + +int +pmss_change_state(struct pmss_softc *sc, int newstate) +{ u_char cmd[1]; int res; - if (sc->sc_enabled) - return EBUSY; + switch (newstate) { + case PMSS_STATE_ENABLED: + if (sc->sc_state == PMSS_STATE_ENABLED) + return EBUSY; - pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 1); + pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 1); - cmd[0] = PMS_DEV_ENABLE; - res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 0, NULL); + cmd[0] = PMS_DEV_ENABLE; + res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 0, NULL); - if (res) - printf("%s: enable device error %d\n", sc->sc_dev.dv_xname, res); + if (res) { + printf("%s: enable device error %d\n", sc->sc_dev.dv_xname, res); + } else { + PMSS_SOFTC_ENABLE(sc) + sc->sc_state = newstate; + } + break; - PMSS_SOFTC_ENABLE(sc) - return (0); + case PMSS_STATE_DISABLED: + /* FALLTHROUGH */ + case PMSS_STATE_SUSPENDED: + cmd[0] = PMS_DEV_DISABLE; + res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 0, NULL); + + if (res) { + printf("%s: disable device error %d\n", sc->sc_dev.dv_xname); + } else { + pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0); + PMSS_SOFTC_DISABLE(sc) + sc->sc_state = newstate; + } + + break; + } + + return 0; } + +int +pmss_enable(void *v) +{ + struct pmss_softc *sc = v; + return pmss_change_state(sc, PMSS_STATE_ENABLED); +} void -pmss_disable(v) - void *v; +pmss_disable(void *v) { struct pmss_softc *sc = v; - u_char cmd[1]; - int res; - - PMSS_SOFTC_DISABLE(sc) - cmd[0] = PMS_DEV_DISABLE; - res = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, cmd, 1, 0, 0, NULL); - - if (res) - printf("%s: disable device error %d\n", sc->sc_dev.dv_xname); - - pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0); + pmss_change_state(sc, PMSS_STATE_DISABLED); } int @@ -806,9 +852,8 @@ dx = dy = dz = dw = rdx = rdy = 0; w = 4; /* Default to normal finger width. */ - if (!sc->sc_enabled) { + if (sc->sc_state != PMSS_STATE_ENABLED) { /* Interrupts are not expected. Discard the byte. */ - PMSS_SOFTC_DISABLE(sc) return; } @@ -845,10 +890,10 @@ return; #ifdef PMSSDEBUG - printf("%s: packet 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x\n", - sc->sc_dev.dv_xname, sc->syn_packet[0], sc->syn_packet[1], - sc->syn_packet[2], sc->syn_packet[3], sc->syn_packet[4], - sc->syn_packet[5]); + printf("%s: packet[%d] 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x\n", + sc->sc_dev.dv_xname, sc->syn_packetid, sc->syn_packet[0], + sc->syn_packet[1], sc->syn_packet[2], sc->syn_packet[3], + sc->syn_packet[4], sc->syn_packet[5]); #endif @@ -1088,8 +1133,9 @@ wsmouse_input(sc->sc_wsmousedev, bt, dx, dy, dz, dw, WSMOUSE_INPUT_DELTA); #ifdef PMSSDEBUG - printf("%s: ax=%d, ay=%d, bt=%d, dx=%d, dy=%d, dz=%d, dw=%d, z=%d, w=%d\n", - sc->sc_dev.dv_xname, ax, ay, bt, dx, dy, dz, dw, z, w); + printf("%s: packet[%d] ax=%d, ay=%d, bt=%d, dx=%d, dy=%d, dz=%d, dw=%d, "\ + "z=%d, w=%d\n", sc->sc_dev.dv_xname, sc->syn_packetid++, ax, ay, + bt, dx, dy, dz, dw, z, w); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sch...@us...> - 2010-05-27 06:31:23
|
Revision: 9 http://pmss.svn.sourceforge.net/pmss/?rev=9&view=rev Author: schulte2005 Date: 2010-05-27 06:31:12 +0000 (Thu, 27 May 2010) Log Message: ----------- o Removed static modifier since "This should not be done in kernel land since it makes it impossible to use the kernel debugger". Modified Paths: -------------- trunk/pms_synaptics.c Modified: trunk/pms_synaptics.c =================================================================== --- trunk/pms_synaptics.c 2010-05-20 03:52:43 UTC (rev 8) +++ trunk/pms_synaptics.c 2010-05-27 06:31:12 UTC (rev 9) @@ -275,22 +275,22 @@ pmss_disable, }; -static int +int pmss_syn_query(pckbc_tag_t tag, pckbc_slot_t slot, u_char arg, u_int *resp); -static int +int pmss_syn_serial(pckbc_tag_t tag, pckbc_slot_t slot, u_long *serial); -static int +int pmss_syn_setmode(pckbc_tag_t tag, pckbc_slot_t slot, u_int modebits); -static int +int pmss_syn_initialize(struct pmss_softc *sc); -static void +void pmss_syn_reset_work(void *arg1, void *arg2); -static int +int pmss_syn_query(tag, slot, arg, resp) pckbc_tag_t tag; pckbc_slot_t slot; @@ -332,7 +332,7 @@ return (0); } -static int +int pmss_syn_setmode(tag, slot, modebits) pckbc_tag_t tag; pckbc_slot_t slot; @@ -366,7 +366,7 @@ return (res); } -static int +int pmss_syn_serial(tag, slot, serial) pckbc_tag_t tag; pckbc_slot_t slot; @@ -396,7 +396,7 @@ return (0); } -static int +int pmss_syn_initialize(sc) struct pmss_softc *sc; { @@ -591,7 +591,7 @@ return (0); } -static void +void pmss_syn_reset_work(void *arg1, void *arg2) { struct pmss_softc *sc = arg1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sch...@us...> - 2010-05-20 03:52:49
|
Revision: 8 http://pmss.svn.sourceforge.net/pmss/?rev=8&view=rev Author: schulte2005 Date: 2010-05-20 03:52:43 +0000 (Thu, 20 May 2010) Log Message: ----------- o Updated to display version information only with PMSSVERBOSE. Modified Paths: -------------- trunk/pms_synaptics.c Modified: trunk/pms_synaptics.c =================================================================== --- trunk/pms_synaptics.c 2010-05-19 22:49:11 UTC (rev 7) +++ trunk/pms_synaptics.c 2010-05-20 03:52:43 UTC (rev 8) @@ -37,7 +37,8 @@ #include <dev/wscons/wsconsio.h> #include <dev/wscons/wsmousevar.h> -#define PMSS_VERSION "$Id$" +#define PMSS_VERSION \ + "$Id$" /* Synaptics queries. */ #define PMSS_SYN_IDENTIFY_TOUCHPAD 0x00 @@ -705,7 +706,9 @@ sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0); - printf("%s %s\n", sc->sc_dev.dv_xname, PMSS_VERSION); +#ifdef PMSSVERBOSE + printf("pmssattach: %s\n", PMSS_VERSION); +#endif } int This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sch...@us...> - 2010-05-19 22:49:17
|
Revision: 7 http://pmss.svn.sourceforge.net/pmss/?rev=7&view=rev Author: schulte2005 Date: 2010-05-19 22:49:11 +0000 (Wed, 19 May 2010) Log Message: ----------- o Updated to only display version information on first attach. Modified Paths: -------------- trunk/pms_synaptics.c Modified: trunk/pms_synaptics.c =================================================================== --- trunk/pms_synaptics.c 2010-05-19 20:41:32 UTC (rev 6) +++ trunk/pms_synaptics.c 2010-05-19 22:49:11 UTC (rev 7) @@ -587,7 +587,6 @@ #endif sc->syn_modebits = rsp; - printf("%s: %s\n", sc->sc_dev.dv_xname, PMSS_VERSION); return (0); } @@ -706,6 +705,7 @@ sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0); + printf("%s %s\n", sc->sc_dev.dv_xname, PMSS_VERSION); } int This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |