Received: by 10.213.65.68 with SMTP id h4csp487806imn; Fri, 16 Mar 2018 09:14:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELtB9WBWXT6WO994S+Eld/XWggEJ9vNphuWpLnxld1jLc9gt7FHgAZNUmQ+6tjskV9yrevJA X-Received: by 10.98.75.18 with SMTP id y18mr2050367pfa.124.1521216855704; Fri, 16 Mar 2018 09:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216855; cv=none; d=google.com; s=arc-20160816; b=my3Ri0/I22byoeiC+OeNr0yGCZhCrPaWdhYuWFCdf99fvUa1HXF9GtZhQuxuhkEUiG ReM/igPDA2tbFCaLh01ms/eVgdnQ9TT6C6LJNHZd8f31zUFaI0rfHR3VL8w7T975R7uR p0i8vAs1QOqf7nZnMAGiHaK9gGN6RRqqvOrgobNVcC/PVRPQTHJv/ARj69CnU2L3/W/I bsqVz9smO8sf4Z3oF0w/cXCG0JuJ8VXRa7Y2ir058OfSmOT4CGRyAwLXIz+wqeGPxu9o SDI/W5hUJfTYuFk4WohSShJ2JJvFYfB+VYLx5AqrU51VyYzMfW8xzg64lwbx/SEq04gj LR4Q== 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=JJQGoN0/omvaMsAjiwTb1Q3rYcxLwG9IgVN4/9tftmc=; b=Utv03h780WAPFN+EQjodxpNlK6OSj6MWjOhzzZEzmaHwXTu4io5TR2MfvOwyssPA2G I9PesRC8mKSsEO3Ri2A3cD8WdJfrc0q7yCuCCYo7L27uRtCSjo7LEE3pkrtivirvfEZq S701SN+3fAjLV3bMJ2ssJJAK1SfA8EZjJ+XBdc98VksNejROiDFdaO9a8PS+lKEbLVh/ 6xGcKZ/kiUb+eLijEZDrayzAWyOayEXsyRUWSbxBa/PegszICXt3O4Zg0o99jgBnT1jK tZTzBkxCeed5pnzjBe4rTCeiXvWe69bfycU1C5ngIEBVHXIKRZFswbamRAhV8EQjWmpH dihw== 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 o61-v6si6252771pld.692.2018.03.16.09.14.00; Fri, 16 Mar 2018 09:14:15 -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 S1754679AbeCPQLm (ORCPT + 99 others); Fri, 16 Mar 2018 12:11:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43738 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754507AbeCPPkm (ORCPT ); Fri, 16 Mar 2018 11:40:42 -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 22AC7E7A; Fri, 16 Mar 2018 15:40:40 +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.15 036/128] HID: elo: clear BTN_LEFT mapping Date: Fri, 16 Mar 2018 16:22:57 +0100 Message-Id: <20180316152338.468166408@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@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.15-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);