From patchwork Tue May 29 09:57:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 10434763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 17BE1602BF for ; Tue, 29 May 2018 10:03:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09CB427B81 for ; Tue, 29 May 2018 10:03:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2A38285C5; Tue, 29 May 2018 10:03:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D06427B81 for ; Tue, 29 May 2018 10:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932726AbeE2KDd (ORCPT ); Tue, 29 May 2018 06:03:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57462 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932828AbeE2J6J (ORCPT ); Tue, 29 May 2018 05:58:09 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4744B400E9BA; Tue, 29 May 2018 09:58:09 +0000 (UTC) Received: from plouf.banquise.eu.com (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06D1311166E7; Tue, 29 May 2018 09:58:07 +0000 (UTC) From: Benjamin Tissoires To: Jiri Kosina , Dmitry Torokhov Cc: Mario.Limonciello@dell.com, Peter Hutterer , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires Subject: [PATCH 1/9] Input: mt - export MT_TOOL in input_mt_init_slot() Date: Tue, 29 May 2018 11:57:52 +0200 Message-Id: <20180529095800.13504-2-benjamin.tissoires@redhat.com> In-Reply-To: <20180529095800.13504-1-benjamin.tissoires@redhat.com> References: <20180529095800.13504-1-benjamin.tissoires@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 29 May 2018 09:58:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 29 May 2018 09:58:09 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'benjamin.tissoires@redhat.com' RCPT:'' Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Looks like we require users to set a tool but input_mt_init_slots() never set the tool bit for us. Meaning that this is a useless information the driver tries to forward. Signed-off-by: Benjamin Tissoires --- drivers/input/input-mt.c | 1 + drivers/input/rmi4/rmi_2d_sensor.c | 2 -- drivers/input/touchscreen/atmel_mxt_ts.c | 2 -- drivers/input/touchscreen/hideep.c | 2 -- drivers/input/touchscreen/wacom_w8001.c | 2 -- 5 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index a1bbec9cda8d..3900686c5d0f 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -57,6 +57,7 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, mt->flags = flags; input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0); input_set_abs_params(dev, ABS_MT_TRACKING_ID, 0, TRKID_MAX, 0, 0); + input_set_abs_params(dev, ABS_MT_TOOL_TYPE, 0, MT_TOOL_MAX, 0, 0); if (flags & (INPUT_MT_POINTER | INPUT_MT_DIRECT)) { __set_bit(EV_KEY, dev->evbit); diff --git a/drivers/input/rmi4/rmi_2d_sensor.c b/drivers/input/rmi4/rmi_2d_sensor.c index 8bb866c7b985..23e666bd2539 100644 --- a/drivers/input/rmi4/rmi_2d_sensor.c +++ b/drivers/input/rmi4/rmi_2d_sensor.c @@ -186,8 +186,6 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor) input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 0x0f, 0, 0); input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 0x0f, 0, 0); input_set_abs_params(input, ABS_MT_ORIENTATION, 0, 1, 0, 0); - input_set_abs_params(input, ABS_MT_TOOL_TYPE, - 0, MT_TOOL_MAX, 0, 0); if (sensor->sensor_type == rmi_sensor_touchpad) input_flags = INPUT_MT_POINTER; diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 54fe190fd4bc..0dcf48100dc1 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2021,8 +2021,6 @@ static int mxt_initialize_input_device(struct mxt_data *data) } if (data->multitouch == MXT_TOUCH_MULTITOUCHSCREEN_T100) { - input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE, - 0, MT_TOOL_MAX, 0, 0); input_set_abs_params(input_dev, ABS_MT_DISTANCE, MXT_DISTANCE_ACTIVE_TOUCH, MXT_DISTANCE_HOVERING, diff --git a/drivers/input/touchscreen/hideep.c b/drivers/input/touchscreen/hideep.c index f1cd4dd9a4a3..980539d8d551 100644 --- a/drivers/input/touchscreen/hideep.c +++ b/drivers/input/touchscreen/hideep.c @@ -799,8 +799,6 @@ static int hideep_init_input(struct hideep_ts *ts) input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_Y); input_set_abs_params(ts->input_dev, ABS_MT_PRESSURE, 0, 65535, 0, 0); input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); - input_set_abs_params(ts->input_dev, ABS_MT_TOOL_TYPE, - 0, MT_TOOL_MAX, 0, 0); touchscreen_parse_properties(ts->input_dev, true, &ts->prop); if (ts->prop.max_x == 0 || ts->prop.max_y == 0) { diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c index 3715d1eace92..946dca30560b 100644 --- a/drivers/input/touchscreen/wacom_w8001.c +++ b/drivers/input/touchscreen/wacom_w8001.c @@ -529,8 +529,6 @@ static int w8001_setup_touch(struct w8001 *w8001, char *basename, 0, touch.x, 0, 0); input_set_abs_params(dev, ABS_MT_POSITION_Y, 0, touch.y, 0, 0); - input_set_abs_params(dev, ABS_MT_TOOL_TYPE, - 0, MT_TOOL_MAX, 0, 0); input_abs_set_res(dev, ABS_MT_POSITION_X, touch.panel_res); input_abs_set_res(dev, ABS_MT_POSITION_Y, touch.panel_res);