summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2008-12-16 09:51:13 +0000
committerdumbbell <dumbbell@FreeBSD.org>2008-12-16 09:51:13 +0000
commitc7b031dfae85e49ae6d24a726fba9f55d96fcf71 (patch)
tree674861e7ec42a74eec5a7d828bc0eb1474a138d0 /sys/dev/atkbdc
parent1283f09c3e8cc38a46bb1cd7c5a02033d71977e6 (diff)
downloadFreeBSD-src-c7b031dfae85e49ae6d24a726fba9f55d96fcf71.zip
FreeBSD-src-c7b031dfae85e49ae6d24a726fba9f55d96fcf71.tar.gz
Rephrase and/or fix some comments in Synaptics touchpad initialization
function.
Diffstat (limited to 'sys/dev/atkbdc')
-rw-r--r--sys/dev/atkbdc/psm.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 2b1117f..6eae9c2 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -4267,10 +4267,15 @@ enable_synaptics(struct psm_softc *sc)
sc->hw.buttons = 3;
sc->squelch = 0;
- /* Just to be on the safe side */
+ /*
+ * Just to be on the safe side: this avoids troubles with
+ * following mouse_ext_command() when the previous command
+ * was PSMC_SET_RESOLUTION. Set Scaling has no effect on
+ * Synaptics Touchpad behaviour.
+ */
set_mouse_scaling(kbdc, 1);
- /* Identify the Touchpad version */
+ /* Identify the Touchpad version. */
if (mouse_ext_command(kbdc, 0) == 0)
return (FALSE);
if (get_mouse_status(kbdc, status, 0, 3) != 3)
@@ -4290,7 +4295,7 @@ enable_synaptics(struct psm_softc *sc)
return (FALSE);
}
- /* Get the Touchpad model information */
+ /* Get the Touchpad model information. */
if (mouse_ext_command(kbdc, 3) == 0)
return (FALSE);
if (get_mouse_status(kbdc, status, 0, 3) != 3)
@@ -4321,7 +4326,7 @@ enable_synaptics(struct psm_softc *sc)
printf(" infoGeometry: %d\n", sc->synhw.infoGeometry);
}
- /* Read the extended capability bits */
+ /* Read the extended capability bits. */
if (mouse_ext_command(kbdc, 2) == 0)
return (FALSE);
if (get_mouse_status(kbdc, status, 0, 3) != 3)
@@ -4331,7 +4336,7 @@ enable_synaptics(struct psm_softc *sc)
return (FALSE);
}
- /* Set the different capabilities when they exist */
+ /* Set the different capabilities when they exist. */
if ((status[0] & 0x80) >> 7) {
sc->synhw.capExtended = (status[0] & 0x80) >> 7;
sc->synhw.capPassthrough = (status[2] & 0x80) >> 7;
@@ -4355,8 +4360,8 @@ enable_synaptics(struct psm_softc *sc)
}
/*
- * if we have bits set in status[0] & 0x70 - then we can load
- * more information about buttons using query 0x09
+ * If we have bits set in status[0] & 0x70, then we can load
+ * more information about buttons using query 0x09.
*/
if (status[0] & 0x70) {
if (mouse_ext_command(kbdc, 0x09) == 0)
@@ -4376,7 +4381,7 @@ enable_synaptics(struct psm_softc *sc)
}
/*
- * Read the mode byte
+ * Read the mode byte.
*
* XXX: Note the Synaptics documentation also defines the first
* byte of the response to this query to be a constant 0x3b, this
@@ -4391,13 +4396,13 @@ enable_synaptics(struct psm_softc *sc)
return (FALSE);
}
- /* Set the mode byte -- request wmode where available */
+ /* Set the mode byte; request wmode where available. */
if (sc->synhw.capExtended)
mouse_ext_command(kbdc, 0xc1);
else
mouse_ext_command(kbdc, 0xc0);
- /* Reset the sampling rate */
+ /* "Commit" the Set Mode Byte command sent above. */
set_mouse_sampling_rate(kbdc, 20);
/*
OpenPOWER on IntegriCloud