Received: by 10.213.65.68 with SMTP id h4csp503237imn; Fri, 16 Mar 2018 09:43:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELu/6i1tVRls6f7bAt/xDj+G0K+d3yog2tbT2dBKRc5WRlcqPafTyp7Lh5Gj/bTZwX6aFs7U X-Received: by 2002:a17:902:a589:: with SMTP id az9-v6mr2793358plb.283.1521218630546; Fri, 16 Mar 2018 09:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218630; cv=none; d=google.com; s=arc-20160816; b=LAg2vCKuaYHRbV/oFzI5Hn8SnZ98s3PNWwj6qeGmhCnVCdFtAr7Nn8skXCvtR+EZl5 b7104W/cXWvaoRYVmNEdqQy/64NMSTEfvMhJ19KfSwszSQQiBJVrNWw+JHyQWCu00fzV 4c18HqnAN01NTk09o7Z77LiVYngVbLI+XHc3UUPQrmAGZvgNNYJogh8uLwPzSPXpiyOx Ya4UF2Ze6D4hiEfbrtWqoNd+7wuYN5dc8hHnjaGkVT3tXrdWDWBJa1u2EvDLkJeHQ5YA 3DCaTCgzxcte0IGmLRPmvXWqH6OGSuBkbkWdTQS2ls8vnDkA9ChoBQRL+xpxdfMO/XF/ LMWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QataehqBUrzwCicyqz30p4R1lHjjgFQG35aUlhd9FEg=; b=VJjqHozV18ExsgvqumbsW3LhDV9aEnjbH+x79ehjGUW/+EcYW9jNHqJAIrxzaYgZQa YTe+vPf5+9IZQAnVEmP1HS0y1wm+ijRNajhz9l6Di2AlYYc3eE5p8NX8go6G4bcSzn6S JIAqLwHyTQaIE75HOVhCsh/WBoIHTiz4aDeX5EMDE5NQy0jJpRM0Q6RXXmJSUSLjQERq cNRSFaezdPb16XeViVfeYxRfKlcnWWS6zM8mziWgvcDGiSFOIcfyAK72orpgnRSZtjFG O9yzeYsPkiq0vUGwT2CEPM1trE5INKMutHeARX3GvFxQD/XHJ7QFoLn9ZdK2YcaevCex kqhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si5186539pgb.365.2018.03.16.09.43.36; Fri, 16 Mar 2018 09:43:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753202AbeCPQlb (ORCPT + 99 others); Fri, 16 Mar 2018 12:41:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40420 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934329AbeCPPgp (ORCPT ); Fri, 16 Mar 2018 11:36:45 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3912310F8; Fri, 16 Mar 2018 15:36:45 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Kosina , Sasha Levin Subject: [PATCH 4.14 031/109] HID: elo: clear BTN_LEFT mapping Date: Fri, 16 Mar 2018 16:23:00 +0100 Message-Id: <20180316152331.671172404@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiri Kosina [ Upstream commit 9abd04af951e5734c9d5cfee9b49790844b734cf ] ELO devices have one Button usage in GenDesk field, which makes hid-input map it to BTN_LEFT; that confuses userspace, which then considers the device to be a mouse/touchpad instead of touchscreen. Fix that by unmapping BTN_LEFT and keeping only BTN_TOUCH in place. Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-elo.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/hid/hid-elo.c +++ b/drivers/hid/hid-elo.c @@ -42,6 +42,12 @@ static int elo_input_configured(struct h { struct input_dev *input = hidinput->input; + /* + * ELO devices have one Button usage in GenDesk field, which makes + * hid-input map it to BTN_LEFT; that confuses userspace, which then + * considers the device to be a mouse/touchpad instead of touchscreen. + */ + clear_bit(BTN_LEFT, input->keybit); set_bit(BTN_TOUCH, input->keybit); set_bit(ABS_PRESSURE, input->absbit); input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);