From owner-svn-src-head@FreeBSD.ORG Tue Dec 16 09:51:14 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3075D106564A; Tue, 16 Dec 2008 09:51:14 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20DFF8FC12; Tue, 16 Dec 2008 09:51:14 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBG9pDN1032823; Tue, 16 Dec 2008 09:51:13 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBG9pDai032822; Tue, 16 Dec 2008 09:51:13 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <200812160951.mBG9pDai032822@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Tue, 16 Dec 2008 09:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186175 - head/sys/dev/atkbdc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 09:51:14 -0000 Author: dumbbell Date: Tue Dec 16 09:51:13 2008 New Revision: 186175 URL: http://svn.freebsd.org/changeset/base/186175 Log: Rephrase and/or fix some comments in Synaptics touchpad initialization function. Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Tue Dec 16 09:17:05 2008 (r186174) +++ head/sys/dev/atkbdc/psm.c Tue Dec 16 09:51:13 2008 (r186175) @@ -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); /*