Received: by 10.213.65.68 with SMTP id h4csp1716102imn; Mon, 19 Mar 2018 11:16:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELs3ZIYyGyp+9Czo1+0GPPJ+kwuEw10wqRjm1i8Elscqg6a2YImUk+R9FoKAwkrVnPvVqwDz X-Received: by 2002:a17:902:7045:: with SMTP id h5-v6mr13402737plt.217.1521483405130; Mon, 19 Mar 2018 11:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521483405; cv=none; d=google.com; s=arc-20160816; b=dfpWjcC9mxzKYlqXjjSlqajHBIKS/SLKT5zuQHyF3KCj3zW5rJfRhPvLEvEKClZnhw 7+AE55NUo93VxuRPJBrSC5QfXwIfM2iRGxcBJlRBll0BrE8xCqM4/x5rvq1m/EZGFqfZ XScCcZ/ZD0CA64gpbX7aRWPJbMaUSCm0zy9c9tQUQBb6+TlvfhETYS99Q7CWtka2AfGX 8L+6d45UKzSkf66qsH3s4uTG8zu9b+12ZOWktw9ry60ReQwY34eGKTEmfVPKFg74Pv93 VyLIB4rxDYyoBGjW8TZpRseJN5FPIZgKcJ+QcnLLjJGuF2XqLaFISa7UYliQ/WqGWa+l f5nw== 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=J5OPQMTGwzzyCfI5qMMw+fGdsB8sOJ1Wj99wQ0eC6wY=; b=xibBrGYhcc5KkwBKO5z67CLwIyIXboxiXiqz4Y2/2KyBbgCTTM95t7KTnCeaOa4SN2 6YjXfXWtyBUVmrkJ7gGz7OjWQTXR6vwJFMwKpEFNJyB+t14ryAjAYCgKAd44wFFTviQE dna3gPma5NoDHGWGf0MO0gx4cQ76C6cj0lUrRX7ZL6DGZL/KOahiqkzykLVGU/u9Zat9 nBnoI1y/NetRQVltH0GzU96Mx9qbcI6FOA6nUDvYdZM1dxAX+1FN450YiU1bMB1lYMcu /s/z3qVOfPGCpcI+yE8otwHVi7j0exwWCbn4L05U+YhB3tBXc4oWdm2ehT2VaRSDhn5Z 2Pbg== 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 c5si303798pfn.386.2018.03.19.11.16.29; Mon, 19 Mar 2018 11:16:45 -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 S968941AbeCSSPZ (ORCPT + 99 others); Mon, 19 Mar 2018 14:15:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44550 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968927AbeCSSPU (ORCPT ); Mon, 19 Mar 2018 14:15:20 -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 A6CF0FB6; Mon, 19 Mar 2018 18:15:19 +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.4 081/134] HID: elo: clear BTN_LEFT mapping Date: Mon, 19 Mar 2018 19:06:04 +0100 Message-Id: <20180319171900.997357947@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-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);