From patchwork Thu Feb 19 01:43:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 5849611 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 541B59F373 for ; Thu, 19 Feb 2015 01:53:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB7D220149 for ; Thu, 19 Feb 2015 01:53:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FD4220165 for ; Thu, 19 Feb 2015 01:53:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752295AbbBSBxL (ORCPT ); Wed, 18 Feb 2015 20:53:11 -0500 Received: from ausxippc101.us.dell.com ([143.166.85.207]:56218 "EHLO ausxippc101.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbbBSBxK (ORCPT ); Wed, 18 Feb 2015 20:53:10 -0500 X-Greylist: delayed 575 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Feb 2015 20:53:10 EST DomainKey-Signature: s=smtpout; d=dell.com; c=nofws; q=dns; h=X-LoopCount0:X-IronPort-AV:From:To:Cc:Subject:Date: Message-Id:X-Mailer; b=s9JRgSa+ZzPM7CGfBA+/cEjmK6fHp6vUU6uWgVk6+S5XHn3xfYYYLcuS 0FBVPpYnEai34NZtAe8RxKBlGsHXSAYL9Haj1doZJwYDqhZYp/YR1Jk+y vlyTIs5DUUWuurnUlmIWfbGLqOVOe4Vk2vVokfn0N5aK6c22ptV0tCK/s k=; DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1424310791; x=1455846791; h=from:to:cc:subject:date:message-id; bh=BJW+o+HyUkoY5XQo+SXYwFq0NcAeHxnkftAb67ufCCA=; b=Zk5XOZV8K1b2RmEFFEjwgJOLwAqFz0UYszY71agO75v1ATL5z7+ILoM0 gtgDf0YSRdU8e/lFYjTi6Qwgcb+r1f+M1yBlTIPDdxxcg27Ib4ym/89zy zzS1hFnvzD/CHZylxu9yafZHBN6j5lUCczrES0bz9Exd9a/AyHdvQL/70 I=; X-LoopCount0: from 10.208.46.70 X-IronPort-AV: E=Sophos;i="5.09,605,1418104800"; d="scan'208";a="623369473" From: Mario Limonciello To: dmitry.torokhov@gmail.com Cc: LKML , linux-input@vger.kernel.org, Mario Limonciello Subject: [PATCH] Add a quirk for the Dell XPS 13 (2015) when in PS/2 mode. Date: Wed, 18 Feb 2015 19:43:00 -0600 Message-Id: <1424310180-2512-1-git-send-email-mario_limonciello@dell.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the touchpad for the Dell XPS 13 is running in PS/2 mode the EC has a tendency to glitch causing the driver to receive bad data. This doesn't affect the usage of the touchpad until enough bad data is received that causes the driver to reset and "freeze". Signed-off-by: Mario Limonciello --- drivers/input/mouse/synaptics.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 7e705ee..4dc456c 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -1244,6 +1244,21 @@ static int synaptics_reconnect(struct psmouse *psmouse) return 0; } +static bool dell_ec_glitch; + +static const struct dmi_system_id dell_dmi_table[] __initconst = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) + { + /* XPS 13 (2015) */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343"), + }, + }, + { } +#endif +}; + static bool impaired_toshiba_kbc; static const struct dmi_system_id toshiba_dmi_table[] __initconst = { @@ -1334,6 +1349,8 @@ void __init synaptics_module_init(void) * so we have to resort to checking DMI. */ is_forcepad = dmi_check_system(forcepad_dmi_table); + dell_ec_glitch = dmi_check_system(dell_dmi_table); + } static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode) @@ -1426,6 +1443,17 @@ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode) psmouse->rate = 40; } + /* + * Some Dell touchpads have a problem where the EC will glitch causing + * bad packets that are otherwise harmless unless they cause psmouse + * to reset. + */ + if (psmouse->resetafter > 0 && dell_ec_glitch) { + psmouse_info(psmouse, "Dell %s detected, disabling tpad reset.\n", + dmi_get_system_info(DMI_PRODUCT_NAME)); + psmouse->resetafter = 0; + } + if (!priv->absolute_mode && SYN_ID_DISGEST_SUPPORTED(priv->identity)) { err = device_create_file(&psmouse->ps2dev.serio->dev, &psmouse_attr_disable_gesture.dattr);