From patchwork Sun Nov 9 21:38:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrik De Bie X-Patchwork-Id: 5261921 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ECC77C11AC for ; Sun, 9 Nov 2014 21:39:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0818820127 for ; Sun, 9 Nov 2014 21:39:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2259420158 for ; Sun, 9 Nov 2014 21:39:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751458AbaKIVjL (ORCPT ); Sun, 9 Nov 2014 16:39:11 -0500 Received: from e2big.org ([198.61.226.133]:41429 "EHLO e2big.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439AbaKIVjK (ORCPT ); Sun, 9 Nov 2014 16:39:10 -0500 Received: from 78-23-174-213.access.telenet.be ([78.23.174.213] helo=lantern.debie) by e2big.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1XnaCT-0006Np-PY; Sun, 09 Nov 2014 22:39:09 +0100 From: Ulrik De Bie To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Hans de Goede , David Herrmann , ulrik.debie-os@e2big.org Subject: [PATCH v2 2/3] Input: elantech - provide a sysfs knob for crc_enabled Date: Sun, 9 Nov 2014 22:38:36 +0100 Message-Id: <1415569117-29461-3-git-send-email-ulrik.debie-os@e2big.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1415569117-29461-1-git-send-email-ulrik.debie-os@e2big.org> References: <1415569117-29461-1-git-send-email-ulrik.debie-os@e2big.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The detection of crc_enabled is known to fail for Fujitsu H730. A DMI blacklist is added for that, but it can be expected that other laptops will pop up with this. Here a sysfs knob is provided to alter the behaviour of crc_enabled. Writing 0 or 1 to it sets the variable to 0 or 1. Reading it will show the crc_enabled variable (0 or 1). Reported-by: Stefan Valouch Signed-off-by: Ulrik De Bie --- drivers/input/mouse/elantech.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 8b04b71..3fcb6b3 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1330,6 +1330,7 @@ ELANTECH_INT_ATTR(reg_25, 0x25); ELANTECH_INT_ATTR(reg_26, 0x26); ELANTECH_INT_ATTR(debug, 0); ELANTECH_INT_ATTR(paritycheck, 0); +ELANTECH_INT_ATTR(crc_enabled, 0); static struct attribute *elantech_attrs[] = { &psmouse_attr_reg_07.dattr.attr, @@ -1344,6 +1345,7 @@ static struct attribute *elantech_attrs[] = { &psmouse_attr_reg_26.dattr.attr, &psmouse_attr_debug.dattr.attr, &psmouse_attr_paritycheck.dattr.attr, + &psmouse_attr_crc_enabled.dattr.attr, NULL }; @@ -1485,7 +1487,6 @@ static const struct dmi_system_id elantech_dmi_force_crc_enabled[] = { { } }; - /* * Some hw_version 3 models go into error state when we try to set * bit 3 and/or bit 1 of r10.