Received: by 10.213.65.68 with SMTP id h4csp1722626imn; Mon, 19 Mar 2018 11:27:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELtZlDsTjIHEtbOZ5+n8AGffAnrVlAbTQZk0zllO3Sp1r4O+A0iSK0dw4tkjKAUYYMx98oZV X-Received: by 10.98.103.199 with SMTP id t68mr7764801pfj.24.1521484039535; Mon, 19 Mar 2018 11:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521484039; cv=none; d=google.com; s=arc-20160816; b=R0sdjAyazFozqgq2ip8ejLfwP9UzDketEK8Ih9R6YJBnI7UExEi6Ro3rpvWLxCZi9k Wf0hub2knMRd0ETwxGPjkww3k9jN4AHbE24/noE0XXTE1a1sj6bCTQV8hPBcKd285HQ2 d6Nx3BDOt8Y0Y9NXDrqIivbNNeKMHREqmLuia9DwWNHtGRCs0Hgv74HAAmusAJrjUo9R AEa9rv/HGJgnvq4D1uwkzpyNWq0Dd5eMaSJcrLxA964mCrFitdSaQhGT13rk2PSLtCrK 5Z3AdnXp4w48T/QXwT40mB4HuavnG8YNMDsa8osVEpTUMiXXNV8Jf+HSVaK9bSDQgv4t rhCg== 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=BU04hODEiKGJQYfMxCvcxyYYP570pjLvkrfpu8cisYo=; b=r7edxDK1f6fZt8FFk7a/6rp1khBYXN8qC98k6JGsQRrS1zUD106SWTMhH9iNPPtycn dHCvzLHC6HUH3jrHIPXzKjpZ6GuTVw51EZhbMtTkp3YUa/Rmoab33lVK7KB7OkJ2Wls+ U6ZNNEOvOdFgs5SXLMJfqFyIUaLAwB/k3LcM7PJ3r7Jf1RPNg4QRiYo3MChtXgVEv2+2 L3d6WENLuh3c5UvI5Ob1MoJwA6uv0tnEK+4iP5JMvef/mTG0SJyxQO2i5pnE2+Yb2e2R phoBY65U5Qa6FxC4Y6pKtqwmbd3TPSKgCMekeOyC7KJN2MQB1VB9fyHprT7bb2BUtLZ0 wRMQ== 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 s9-v6si461041plk.490.2018.03.19.11.27.05; Mon, 19 Mar 2018 11:27:19 -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 S969738AbeCSSZa (ORCPT + 99 others); Mon, 19 Mar 2018 14:25:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50360 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967637AbeCSSZW (ORCPT ); Mon, 19 Mar 2018 14:25:22 -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 0AE9B100B; Mon, 19 Mar 2018 18:25:21 +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.9 166/241] HID: elo: clear BTN_LEFT mapping Date: Mon, 19 Mar 2018 19:07:11 +0100 Message-Id: <20180319180758.032392117@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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);