From owner-svn-src-head@FreeBSD.ORG Wed Dec 17 10:42:53 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 EAC1A106564A; Wed, 17 Dec 2008 10:42:53 +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 D9BE68FC17; Wed, 17 Dec 2008 10:42:53 +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 mBHAgrju001907; Wed, 17 Dec 2008 10:42:53 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBHAgraR001906; Wed, 17 Dec 2008 10:42:53 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <200812171042.mBHAgraR001906@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Wed, 17 Dec 2008 10:42:53 +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: r186218 - 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: Wed, 17 Dec 2008 10:42:54 -0000 Author: dumbbell Date: Wed Dec 17 10:42:53 2008 New Revision: 186218 URL: http://svn.freebsd.org/changeset/base/186218 Log: Synaptics touchpads must be reinitialized after suspend/resume. This fixes touchpad resume on Asus EeePC among others. Submitted by: rpaulo Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Wed Dec 17 10:27:34 2008 (r186217) +++ head/sys/dev/atkbdc/psm.c Wed Dec 17 10:42:53 2008 (r186218) @@ -3956,6 +3956,9 @@ static void synaptics_sysctl_create_tree(struct psm_softc *sc) { + if (sc->syninfo.sysctl_tree != NULL) + return; + /* Attach extra synaptics sysctl nodes under hw.psm.synaptics */ sysctl_ctx_init(&sc->syninfo.sysctl_ctx); sc->syninfo.sysctl_tree = SYSCTL_ADD_NODE(&sc->syninfo.sysctl_ctx, @@ -4263,7 +4266,6 @@ enable_synaptics(struct psm_softc *sc) kbdc = sc->kbdc; VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n")); - disable_aux_dev(kbdc); sc->hw.buttons = 3; sc->squelch = 0; @@ -4419,6 +4421,12 @@ enable_synaptics(struct psm_softc *sc) /* Create sysctl tree. */ synaptics_sysctl_create_tree(sc); + /* + * The touchpad will have to be reinitialized after + * suspend/resume. + */ + sc->config |= PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND; + return (TRUE); }