From patchwork Mon Jun 5 20:27:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 9767469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A44E1602BF for ; Mon, 5 Jun 2017 20:28:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90C362837E for ; Mon, 5 Jun 2017 20:28:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84C7C28426; Mon, 5 Jun 2017 20:28:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1281C2837E for ; Mon, 5 Jun 2017 20:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751194AbdFEU2B (ORCPT ); Mon, 5 Jun 2017 16:28:01 -0400 Received: from mail-vk0-f48.google.com ([209.85.213.48]:35853 "EHLO mail-vk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbdFEU2A (ORCPT ); Mon, 5 Jun 2017 16:28:00 -0400 Received: by mail-vk0-f48.google.com with SMTP id p85so72292097vkd.3 for ; Mon, 05 Jun 2017 13:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=zV5QBrwZ+pX6fXI/Tc3xI3T0hhBY9RTlNeIij0TcstY=; b=hC6WkPkiMgCz2ZGbJgmkBmVfy+xYjQZPDgL7A/qWo8uwTwu5LhS2fSqAJYyP2BlyQ/ 1n+8Efxl5C8O1xOUpSswilXWszg933Iq//R5wa0v+1cb5EijjIKvd+T3MjDYpEeyr+sO ptbFDy8EmrWqArFQq7MzvNHpNdrX8mNTZDP44rhocJ2WiNhd/WwT9ON0aKCC9oOdG4AL w7W5BLWbST+zRGryv0AtnQP5vI7k3c2f+Vgp3JGBllpFFkDYLN0G9QSH1GCE0O/ms56v olABxPn2a18yPoSWXo2uCNSK5oMxMgAKCkFs2xEcafzmjKThfyFDLOWrZgFr/1RNw5oh j/tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zV5QBrwZ+pX6fXI/Tc3xI3T0hhBY9RTlNeIij0TcstY=; b=ZqVpa6wTGZvFl5qaEyElArAgi5v02tWi6cWvJMc+jr7lRr/hO+L4DMwNxZ+Y2PFHzx zYOT2qg5joZGtqsJ6Yo2sbFP5xFucY+ewshtqd1L+oYIk3obpeENu8LpVxJjretTJo0s tWHrDvubpwJ340nSX4hAbiwtrd5xcYxShyyDi6D7vDZLf7XJjJNVs1Affer2mVqjsmxy 1UuKjTNm6//YFFoI6l1C+iASiFu/I3o6V0AQ3MiRBw5dHAMmY3VPeq0/YldCs8JiLAWC MP6kNaFOLyAoIGBj5KP9hX0HXUJujO17boKyrf3iSV6w9LK8pJaN8oLY6BnSEupAwCD/ hb5A== X-Gm-Message-State: AODbwcA8wrf9pDu+AdS/xxmbHmlRGiif+8CxwY+X79I9V3MVptdxTOud qiy3fYDtLf8fcnuV X-Received: by 10.31.167.146 with SMTP id q140mr11376006vke.4.1496694479456; Mon, 05 Jun 2017 13:27:59 -0700 (PDT) Received: from localhost.localdomain ([186.77.198.42]) by smtp.gmail.com with ESMTPSA id d129sm7911075vke.0.2017.06.05.13.27.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 13:27:58 -0700 (PDT) From: Daniel Drake To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux@endlessm.com, chiu@endlessm.com Subject: [PATCH] Input: psmouse - reset device during probe Date: Mon, 5 Jun 2017 14:27:52 -0600 Message-Id: <20170605202752.8061-1-drake@endlessm.com> X-Mailer: git-send-email 2.11.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP New Acer laptops (Aspire A315-31 and several others) have an EC which expects the PS/2 reset command to happen during boot. On Linux, that means that currently the touchpad is unresponsive until suspend/resume, when psmouse_reconnect() resets the device. We observe that Windows sends a PS/2 reset command during boot. Make Linux do the same here, making the touchpad usable on these new products. Signed-off-by: Daniel Drake --- drivers/input/mouse/psmouse-base.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index f73b47b8c578..8f3c903db7b9 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1591,6 +1591,12 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv) psmouse->resync_time = parent ? 0 : psmouse_resync_time; psmouse->smartscroll = psmouse_smartscroll; + /* Reset the device, even though we would ordinarily expect it to + * already be in the reset state. This matches Windows behaviour, + * which some ECs require. + */ + psmouse_reset(psmouse); + psmouse_switch_protocol(psmouse, NULL); if (!psmouse->protocol->smbus_companion) {