From patchwork Tue Mar 30 08:54:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411683 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279227jai; Tue, 30 Mar 2021 01:55:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzE6bi8bMaSVsA733g/ygjTqrtbOw0ro2u498JPIbubdIGeLobCMl3wZvW7Jy4x56i7cBI X-Received: by 2002:a50:bb47:: with SMTP id y65mr33302400ede.305.1617094522511; Tue, 30 Mar 2021 01:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094522; cv=none; d=google.com; s=arc-20160816; b=0tzb/sGiKLCRJUJi5ECGUjMVIGjmszLg0lmhvvUFdc02Lxv8stOl0FNFnVn5kAHbQe giJGwqw+B2zlXyVOefgspNyavqToRTfeTt1XrQAVWTaBtEsycoQBWy5td9pZZHCM135p KirU1EspEfBE99gCch/hqg+GX9BQTJbDON26Y5AvRoOPwtV3iSG0dln5fmOtPmUZE876 MBzuKWzCfjMjRzA0ZB3fJ16UCM8ILG8haoaRNq2/et8+/ejrD03EFKp7hwV0EOgwLjYv xdp2qACFyG68EJZBHzgjP7GWUeWxlwVrQ26Zsovp56rWba3FFgn9pC5RS5mCI0MsA1tM dx4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/7GlKvi87M8Si6285ApZgfbAtLyH/k4agACd8QLYqS0=; b=m45cY7bfyRgWUsrK1nXDwu8kmIL7nvrQHzy+eRDVT/vSLaSsYvzwbmCOKzxWWMpIXa bEaE5cFYxN8BSWfDFulZO2dJIh4ThuloMIrjR5qvJ8+ixF1wfsZ5wE2XtZAPx/v9W8Ax THD2bk5nOP51OdSfsHSk+MEbChc6TS1JJEBDHz8iS5R+7d5ZA9mGnXRr6pZCRzyCiJQP l/Gw7nvvavepU579SaQ0+PKWdDRjHu4nhjw85tV2RQWO2ub5n2HHPaCUv8P6d2rLwMXd aIPp+MpMFMg9l7uSQpBxLVcQHzqtOnoCYh7TwO8/HsZAS+nyvbq0nSlsNX7JsWAZJrzg riPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Z8cg/k86"; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.22; Tue, 30 Mar 2021 01:55:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Z8cg/k86"; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbhC3Iyu (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbhC3Iy3 (ORCPT ); Tue, 30 Mar 2021 04:54:29 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 680DCC061762 for ; Tue, 30 Mar 2021 01:54:29 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id n138so22653253lfa.3 for ; Tue, 30 Mar 2021 01:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/7GlKvi87M8Si6285ApZgfbAtLyH/k4agACd8QLYqS0=; b=Z8cg/k86hy9BFJPEW6HeuQ4b6sKNo2fusttZ+SIdMiMPBViTUr6P8C1eiZu8iImEob i/eU2/obmck14J5enLSSGjP1Mfs1Bi3nuuoAWJw70N2zMfOB5oaNbUHIe1kmO9cgpIZU 99ixmkYOtWRY+DU2NgdiPoM5uEy5MClrFs28sZONVpJWFSMTAxDaMuPXNYjcNwjFnI5X Q0HEKTfayoVEifhnUirzLtib0i0PjFYilyelA/TUd5eku5GD4w4xNvjfR95uOWuDZB8p //eJm6F6TaUbDDn9+OvG4v5vJRb8m6shqVwCwTm7kaiWFH/MrIySCHsMa5OauC0LXyqq 3d+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/7GlKvi87M8Si6285ApZgfbAtLyH/k4agACd8QLYqS0=; b=B6YB4IEJ13qUfUp/Nsr925KdwEpbS4Do8zD9XHgsxbcN/00gFU4f1TFwXVyc/ayg6v Wxyiw0vTPJ15j+wNB4WMBaoufCV5AYUk/yNzPi3MYXG/1AournnwgUAZbYKGOx709FuQ Bjd73T6t6UhI/cGgnJlbQv9OVPZBmPQ+hmwmGOdbbt8zBZ7T++1bMkEjXfQCCpH4pbAM 3t1v5y2KEHdfqhOwKgYvk5F4DSflPItTVrCuegRuWnFjg7ItcANUwtUvbgce8jtNq64h 27VIBvOL0mkkeVIXVz0k5LvyaXJd4rUil7vr0m9iekAgwi8NEEZ33jJoHSFDU1QFQd6F gfNQ== X-Gm-Message-State: AOAM530P4kLsOUxHSNaF7i3qUK8NmPZH9dXZvhJ5JAAPXp4tC5vC1QWN /l0fMjqM1Hr3FayuB9YYjMw/8Q== X-Received: by 2002:a19:ae07:: with SMTP id f7mr19301555lfc.551.1617094467954; Tue, 30 Mar 2021 01:54:27 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:27 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 1/7] Input: cyttsp - Probe from compatibles Date: Tue, 30 Mar 2021 10:54:18 +0200 Message-Id: <20210330085424.2244653-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The driver (both SPI and I2C interface) should probe from the compatible strings, cypress,cy8ctma340 etc when using device tree, not as now, where it is probing implicitly from the I2C/SPI node name "cypress,cyttsp-i2c" etc. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_i2c.c | 7 +++++++ drivers/input/touchscreen/cyttsp_spi.c | 7 +++++++ 2 files changed, 14 insertions(+) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_i2c.c b/drivers/input/touchscreen/cyttsp_i2c.c index 061debf64a2b..0f097f34832a 100644 --- a/drivers/input/touchscreen/cyttsp_i2c.c +++ b/drivers/input/touchscreen/cyttsp_i2c.c @@ -52,10 +52,17 @@ static const struct i2c_device_id cyttsp_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, cyttsp_i2c_id); +static const struct of_device_id cyttsp_of_i2c_match[] = { + { .compatible = "cypress,cy8ctma340", }, + { .compatible = "cypress,cy8ctst341", }, + { /* sentinel */ } +}; + static struct i2c_driver cyttsp_i2c_driver = { .driver = { .name = CY_I2C_NAME, .pm = &cyttsp_pm_ops, + .of_match_table = cyttsp_of_i2c_match, }, .probe = cyttsp_i2c_probe, .id_table = cyttsp_i2c_id, diff --git a/drivers/input/touchscreen/cyttsp_spi.c b/drivers/input/touchscreen/cyttsp_spi.c index 54e410921d53..ad8b3c6c4d3e 100644 --- a/drivers/input/touchscreen/cyttsp_spi.c +++ b/drivers/input/touchscreen/cyttsp_spi.c @@ -160,10 +160,17 @@ static int cyttsp_spi_probe(struct spi_device *spi) return 0; } +static const struct of_device_id cyttsp_of_spi_match[] = { + { .compatible = "cypress,cy8ctma340", }, + { .compatible = "cypress,cy8ctst341", }, + { /* sentinel */ } +}; + static struct spi_driver cyttsp_spi_driver = { .driver = { .name = CY_SPI_NAME, .pm = &cyttsp_pm_ops, + .of_match_table = cyttsp_of_spi_match, }, .probe = cyttsp_spi_probe, }; From patchwork Tue Mar 30 08:54:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411682 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279220jai; Tue, 30 Mar 2021 01:55:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyamB6FXlB+H2jDNW7KbiZyW9R9fJcj24wZLAZAz8AKaOi8kHS1hMaNv2pv9feyFO6LKCcq X-Received: by 2002:a05:6402:42c9:: with SMTP id i9mr32859824edc.35.1617094522121; Tue, 30 Mar 2021 01:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094522; cv=none; d=google.com; s=arc-20160816; b=rjPW6GQk4UtNOV34xFQUo0sQ2ifeMgSKnL50WxRwJYZQrjpEOMyNAKcljoSlzShxyU Gb9DWiKw59GUdMiLdoGT4NJoBnm62+cg5G9SfuKVbLfqSjnyRvJFJT6ZYj9mMhJT04i/ v3UFkrA+J5Mvoi3KTE0KzMPieZjQF9GBWk8ZREPIz89R80I+5QIwQzdhWFqmtbKiHKiz 5kINE8PJH6HTKoSw2mLYRpN9vk4Lgh6B8POMJE1OIADo06cqqxQ6+EUFtD2peI58+iBK K3Z6cUAMNmC9I3j6nP3fc+ti0pwsLWzhxEqyNxXequlNo8VR6UGYvtIenUl+T0TZ/jMz QVYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m07c7y4tYH8unWOnb0Pzb8s2m7otaYJx80OAF9fD+f0=; b=HfNCT61v0Jtia2Wy0wqRcmJyBXKrTzr0CjTJLoVPbAvJm2wO9Xm+ak3Lwp0z3R9mE3 aQH+Elb/I22VvKzYKxpLjGuLGNH2YlHdFdQL1D0BxZGr8aAa4BwfyOwGz40n3x4hqRyd QUGrryxoCwn4BMM6dRLuqV2/ffzCFlDq5Xi9pjosHLdQTm78Gwd4g3/Gp/C+0MMcGcEQ J3AZMAUeeB9sOW+YW/cn5wnTuXv4xYVqUXzj0T1eNEFtN6OqWIeBZ/Trod2VAVbxHsU0 5v0vHl7ct8Yp9eSi0E+Bb0J10sVRQ+7xCZe5tZkGRPt3FGrbausJfCi79QVF7R/YmUpP zryw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fg3QDwtc; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.21; Tue, 30 Mar 2021 01:55:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fg3QDwtc; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbhC3Iyu (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbhC3Iyb (ORCPT ); Tue, 30 Mar 2021 04:54:31 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 048D4C061762 for ; Tue, 30 Mar 2021 01:54:31 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 12so12240810lfq.13 for ; Tue, 30 Mar 2021 01:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m07c7y4tYH8unWOnb0Pzb8s2m7otaYJx80OAF9fD+f0=; b=Fg3QDwtcUyKXxHPTnQ9okrcd3c7vQXlhG96RXgde/r/libmG9B9dTRqxqYW5vVLSLQ V7SgqADrcFvxfLFgKo/JdF8Y7svn43VvERvMhllPTyIpbf6CzC6lxNcypRndZTs+cdWB EBCcHQTQPz3zOvlv4O89G9cvkyM/bMHG4CZBhhPtdgd4ZvE2Lhd3/oUc3pU+rSgOBpVP /E95ZHjBQ+PLBGEGMv0+C9HI8RV+34vtJHWSlWWstEyR9cnM0efvIOjWENZ2keJmJEwi 4aF1HXCswy4ayTJNb3dDxTyz8dzeJyoO749AFZqHadgJg5Xkdh8+a7uLgUtAdNdkv0pa F3ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m07c7y4tYH8unWOnb0Pzb8s2m7otaYJx80OAF9fD+f0=; b=Auq0CQU9LhLH0JMT1ZAve0+JIQul351lGZuInZZsnwbO2DCYLrRQURcVyadfduGmeh 35ZUVI/ro2XG3kG7n0K9/1V4I+a3d8FZGVvsU0ofchJ2ciGBU2HqmoHrkzjdVRm9bCih t/8++JR3J5C8ab+MAKNKWqAmfryDX6h5SSkeuE56Du8WjK6Z90DSs+bMzY9WTE0YFhW9 xctkH6c5oD9LAIgU0RzCmvgzDC5EYy5d4XKOa02XMeXR1Yaiz8GxzQ/6eXFMltQuGAsZ iV8lnd1A8SsPl9bztlUgTfV/iudThifY+vzZerdPytlBSaVOvAuyn5cTo4EArs7DKYkq T+Ag== X-Gm-Message-State: AOAM533qO65ntP/rG3nWoz2AOoXN60i/+cu90+abXWrqspktEB4uhAHL YYc4Q5IblFczIXjoL2Nga3bqMqv1GuSjMYS0 X-Received: by 2002:ac2:5519:: with SMTP id j25mr19976516lfk.220.1617094469544; Tue, 30 Mar 2021 01:54:29 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:29 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 2/7] Input: cyttsp - Obtain regulators Date: Tue, 30 Mar 2021 10:54:19 +0200 Message-Id: <20210330085424.2244653-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The CYTTSP TMA340 chips have two supplies: VCPIN and VDD for analog and digital voltage respectively. Add some minimal code to obtain and enable these regulators if need be. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 30 +++++++++++++++++++++++-- drivers/input/touchscreen/cyttsp_core.h | 2 ++ 2 files changed, 30 insertions(+), 2 deletions(-) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index b9772192b5ea..a19d7cce95ca 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "cyttsp_core.h" @@ -621,6 +622,19 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, ts->bus_ops = bus_ops; ts->irq = irq; + /* + * VCPIN is the analog voltage supply + * VDD is the digital voltage supply + */ + ts->regulators[0].supply = "vcpin"; + ts->regulators[1].supply = "vdd"; + error = devm_regulator_bulk_get(dev, ARRAY_SIZE(ts->regulators), + ts->regulators); + if (error) { + dev_err(dev, "Failed to get regulators: %d\n", error); + return ERR_PTR(error); + } + ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ts->reset_gpio)) { error = PTR_ERR(ts->reset_gpio); @@ -666,20 +680,32 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, disable_irq(ts->irq); + error = regulator_bulk_enable(ARRAY_SIZE(ts->regulators), + ts->regulators); + if (error) { + dev_err(dev, "Cannot enable regulators: %d\n", error); + return ERR_PTR(error); + } + cyttsp_hard_reset(ts); error = cyttsp_power_on(ts); if (error) - return ERR_PTR(error); + goto err_dis_reg; error = input_register_device(input_dev); if (error) { dev_err(ts->dev, "failed to register input device: %d\n", error); - return ERR_PTR(error); + goto err_dis_reg; } return ts; + +err_dis_reg: + regulator_bulk_disable(ARRAY_SIZE(ts->regulators), + ts->regulators); + return ERR_PTR(error); } EXPORT_SYMBOL_GPL(cyttsp_probe); diff --git a/drivers/input/touchscreen/cyttsp_core.h b/drivers/input/touchscreen/cyttsp_core.h index 8c651336ac12..c102a094e888 100644 --- a/drivers/input/touchscreen/cyttsp_core.h +++ b/drivers/input/touchscreen/cyttsp_core.h @@ -23,6 +23,7 @@ #include #include #include +#include #define CY_NUM_RETRY 16 /* max number of retries for read ops */ @@ -123,6 +124,7 @@ struct cyttsp { enum cyttsp_state state; bool suspended; + struct regulator_bulk_data regulators[2]; struct gpio_desc *reset_gpio; bool use_hndshk; u8 act_dist; From patchwork Tue Mar 30 08:54:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411687 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279247jai; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzTTCMD140ZHtmP6fIws8LpxsP5wkPH55gYyzgHp4Q10Efz7Csouaq1aHHoC2SiUQvNt9f X-Received: by 2002:a17:906:d94:: with SMTP id m20mr31423016eji.511.1617094524045; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094524; cv=none; d=google.com; s=arc-20160816; b=xr4xWkhFmXmDKVSTs4HhjHW8UlYvLXVHH0zsrrORU/z3y2mfEEsOw/105FoxmrVywF ci2pExFzqQ8gsuRKSkixMsEwqCco84JI0UjQ3dpVSM9s5pU27TZNJu4sL7QkqI8s0t77 DrdFSYKV+qVtuLBCtApIN6xV99MRq9nzUHqCMYVOl+m0Kl9FSI/FDwTUPQWkAwZBwNKI OUXo+qWTucHJayW5W8c8CuKw8dJmmAcwbXm8pc1VUsZOzhdBGDWRVQ/Q0js4ozdHPwQC 1DsclVLW3lqMkiA6b08dVzgIC1CNGuQouZvP+g+WZS6iMZqJkH19MesT9JejsxJukmk1 TJaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xL6erVnxQRl61MXnF85N/4HssiewiDMqKG8DTl4YuT0=; b=kRI8r0rkLy5dg61g/DcZaNht3EjrDNVz3C/Y6Rz/UqS2Dz/ts5JxDKv2wywT+RxJGF JXGL5W59rFMGW8GK6LtUcdimdYIo3nyuIUkUKhaQyW3MYA/MR1ujrGNMZoGSc40L5bUD V9n/Wnxn05iO9OqFnLOm80cA8x9nav+NrQVFwgdxnRG2WHa6x/uyPdOuYQxJVjCzwu36 ViOIYSqX1O4DezRM1qMv891F0Dp6FRRLsr37bMIbrD3Kp1tHCEu1O0lODGYEwG3K158n ubXizOfSTVBdiAxeeJUwV/hMpgjtOFv866w955tWRvBPns0AWcWy6XCsYrf5O46Hjiib AQgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sJqtEpMb; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.23; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sJqtEpMb; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231269AbhC3Iyw (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231313AbhC3Iyp (ORCPT ); Tue, 30 Mar 2021 04:54:45 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD9AC061762 for ; Tue, 30 Mar 2021 01:54:33 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id w28so1663735lfn.2 for ; Tue, 30 Mar 2021 01:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xL6erVnxQRl61MXnF85N/4HssiewiDMqKG8DTl4YuT0=; b=sJqtEpMbZ/peEhed9U3nZGgfwzRFiyq986U+KtAl3UM0Dni1Aj22f4aBffF0lrBv1V BrMxyl6kwKrpEweT8OcsyVcKZs5rxgBJXREnq/F8P/+k3wjgN3JZY/RPcFfWnwZJ/4qT 5A7V+n0WcER/Moecomig/XBCpSoYYqMJ+JHHJgceawpxXcHM9OEenKxiE0EjrBxCxIFz BFVqb1s9/sfQah99Nel3rgIxRYkSVnfEeRDaxJs3xPrPa13p/qT4tGEGrFoC6QeLVjPF fROqq0NrsX/qTLeateLqeSbpACaYv+7NWCktiY14clX7bOTHSuYN++vebXfDLjeIQRg0 ZzMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xL6erVnxQRl61MXnF85N/4HssiewiDMqKG8DTl4YuT0=; b=BF8iNKK//Gw9iaWte7F34OYilN6/tG9UWNIbnKxYF60nT8TvPo8pB0enKcLzRQx98c qQoIm/mETkkYHjl0WFsd3jeLVHXJnk7uF4T/Vb240t90NAeVoWPVgB1UYBkJtX1znlQq xLdpvmiKL7kDsfKZszZ7tTHhHJCas+jsMFVkGSfpdPxaSNeoxfuyxvy/QwdDkqdJVMV7 wGY7OLLC5UkmoJGwLT1URN+rBBKYyQvG1L2hsUkeTOX/z+q/Q6WzLaI8X7vZpFi5VnIF S5yh3kgV7p0EKp6PRUCGEicnOyk147sQBsClBtcfC42RRAqNBpywk0sudp9Fc6wMW6l8 q/ew== X-Gm-Message-State: AOAM532U0WY0yU+u/MgoZoHYcoRagJG9tn4HyTSajIJakhDXXVacymur z+t3Pct5jUKfFuMSTRbOlBhZmA== X-Received: by 2002:a19:915:: with SMTP id 21mr18514597lfj.270.1617094471072; Tue, 30 Mar 2021 01:54:31 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:30 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 3/7] Input: cyttsp - Error message on boot mode exit error Date: Tue, 30 Mar 2021 10:54:20 +0200 Message-Id: <20210330085424.2244653-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Provide a proper error message when attempting to exit boot loader mode and failing, which is something that happened to me. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index a19d7cce95ca..91f8f38b3f06 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -410,8 +410,10 @@ static int cyttsp_power_on(struct cyttsp *ts) if (GET_BOOTLOADERMODE(ts->bl_data.bl_status) && IS_VALID_APP(ts->bl_data.bl_status)) { error = cyttsp_exit_bl_mode(ts); - if (error) + if (error) { + dev_err(ts->dev, "failed to exit bootloader mode\n"); return error; + } } if (GET_HSTMODE(ts->bl_data.bl_file) != CY_OPERATE_MODE || From patchwork Tue Mar 30 08:54:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411686 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279239jai; Tue, 30 Mar 2021 01:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbAbc20/yPJhFesNvAB/+2ToS+AKJWX5Rj5zYuKDTrB2lP/51S8E9ZU8gTtmRrxhFQytqy X-Received: by 2002:a17:906:a86:: with SMTP id y6mr33044404ejf.354.1617094523704; Tue, 30 Mar 2021 01:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094523; cv=none; d=google.com; s=arc-20160816; b=a/xvFzE9qqKQPs3GTKNmV65BkuZwyEXKkShmScKXSSb3FmzhoMWRiUheW8RJuvlYrT SWNu4p+UQazWQp4yMxpe3CWa0s8Pm2dUMmyeGYJt8pvWysQifPr5WfbEsvndew6gmkZ7 za6ziYKVRaOmQUJY5vD9Etr9vR8PXbGUzFgWR1xIo9hED6mctEysp6g7W6QI07gjmAVU 0NQqj0K/uxpbbjS893OPoJVcjeOxVrjJT6miP0XLXTbQmwr6ym6vRIDblSkM2U/WTFp1 YtOL93f50o6wMuTzizAu85TnBXAu68NvVYbJtH7RgKRztxfjjy1Fu6Blt2ERMWImNPAG cG8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O+nWoIhda88CRufoRBshjxqM91Z/QYAbPeuTebH+AdA=; b=kveDa4vzK8u3MelP27pXCIqyyrxprMEraDw3skPMtsxy7lufUf6VJtHJ5ixbguURK7 dPFbN1SxZZdNCcAFXMak5K3FXNxyG+212zVPEyYUgztYqEbn7Wi9Focjvt3e244db1rn rmYJ0MEcu4gdW8kVMxc294KattlK69CR9CNvO10gcSgRFyrXyNBLV8HuISDOPFbKlEbe 0boDV4PxwL8H1HM7ygF8nsMWknc6cJHoHzNIE3hJXeyrm/mjdG7zJpbepJ7NhL4lnPdt 1iBzTKH8IsLDskHXISG81tFfjXTDsJtrdkClYE6NLv7WWreke7PAyyTgQgZwGP9IVDA+ z8Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=piJznGsl; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.23; Tue, 30 Mar 2021 01:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=piJznGsl; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229633AbhC3Iyu (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbhC3Iye (ORCPT ); Tue, 30 Mar 2021 04:54:34 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0707AC061764 for ; Tue, 30 Mar 2021 01:54:34 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id o16so4980023ljp.3 for ; Tue, 30 Mar 2021 01:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O+nWoIhda88CRufoRBshjxqM91Z/QYAbPeuTebH+AdA=; b=piJznGslXavbNLo0UigIy4MydA1w2Q+wQg2o+IArBwdMzR+WUapIgcxlmp6jAVP5lU 4nXL3DeRqMCU/3+To+TUMIj9bOF+Qa0aFWGAeyf7q0gC+Kszjy1EBLsEtuw1sDaRQML/ Bp2KPW2GSmMKU3iRgcnyAheH9q8HbQXLu5JlTGRUUsjIsAa1Jf92a1NZuYCVRj8gM9R+ cWY+l4xp4RZC1INBmHTeGj3B6BpqOEEsPv2riRo8goUGANWGQGsEqqljJAmKrJmEg1px KG8egKWfoZQKgkWSBYGktsCyPjq3fXhcuSCICAMA+6mi6V4PWPN61RPcMxZCjZEjK0U2 9N9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O+nWoIhda88CRufoRBshjxqM91Z/QYAbPeuTebH+AdA=; b=rFYmWx5GZPO/BYAV9dP3y69lC8/ypBGu1AUH8H0nZJF3sgdKIdwc20QMLciSzSMoZc /CMZW6Z0/MiiblyZdjvcNFsez5gcg0tqf+Ri6/CDFmt1R4DwtWCA1so388hACBPEiHWw aO9WI/RGBQxIYSuBXi3HotKp6xt9sxhwGdHjPJd4MEvwFJcudWUUYSYgOocWr3TN+PBy AAvKpPSu2UeWHrFTEvAkqEWWcfahfOEQKeEQqxYJgaNMvjfaSEcrq9CBa7tZKnk4vj5E 4K+k4nVvBXw6BUPx/xS+6JhtAkqm6/Igixzn+hWjdSE+gWiHOJQ0MrMB/qFm/RHLtu32 mx2A== X-Gm-Message-State: AOAM533ay0iUGWVI1yatAM5cYj7UowcApt9xkd4e0dU+jFzprjDDw97D tM5/5fFv+0Sk6fTdjydyYBFaHg== X-Received: by 2002:a2e:2e19:: with SMTP id u25mr21184133lju.487.1617094472533; Tue, 30 Mar 2021 01:54:32 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:32 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 4/7] Input: cyttsp - Reduce reset pulse timings Date: Tue, 30 Mar 2021 10:54:21 +0200 Message-Id: <20210330085424.2244653-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The data sheet for CY8CTMA340 specifies that the reset pulse shall be at least 1 ms. Specify 1-2 ms with usleep_range() to cut some slack for the scheduler. Curiously the datasheet does not specify how long we have to wait after a hard reset until the chip is up, but I have found a vendor tree (Samsung GT-S7710) that has code for this touch screen and there this is set to 5 ms so I use this with the same 1 ms fuzz. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 91f8f38b3f06..84f4f1c1a220 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -230,10 +230,16 @@ static int cyttsp_set_sysinfo_regs(struct cyttsp *ts) static void cyttsp_hard_reset(struct cyttsp *ts) { if (ts->reset_gpio) { + /* + * According to the CY8CTMA340 datasheet page 21, the external + * reset pulse width should be >= 1 ms. The datasheet does not + * specify how long we have to wait after reset but a vendor + * tree specifies 5 ms here. + */ gpiod_set_value_cansleep(ts->reset_gpio, 1); - msleep(CY_DELAY_DFLT); + usleep_range(1000, 2000); gpiod_set_value_cansleep(ts->reset_gpio, 0); - msleep(CY_DELAY_DFLT); + usleep_range(5000, 6000); } } From patchwork Tue Mar 30 08:54:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411685 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279235jai; Tue, 30 Mar 2021 01:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG7xehhSpCFOf5p0pWOSj+3WxUoHo3ty2YXhfOtMFil89xD0Uh33xCYx0mI5W53JEXNcHq X-Received: by 2002:a17:906:ecb8:: with SMTP id qh24mr33336990ejb.162.1617094523324; Tue, 30 Mar 2021 01:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094523; cv=none; d=google.com; s=arc-20160816; b=qlGrTmqrwtdMd0JEtHPlM4bwZ6erG5QJ3VGH4SLRDfMNZW9dmcwMghvaEwTf4Uh7YK ijIigAmENoW3kfWHUcvE7bDwdCmvTo6Zeqo1+JgsEJVP7sWwwXOfzdYIUr+vEVDT533u 81EV2ESB5oEMBAkcey388CVQMnSQ0g6nadhjFBChU6NNqXM55BfQgZmIlNYKA1g9jT39 MfRSIWiIW2n0gRkSytN8HF/huZdBg1hFOkLXS4aVzv/z+rfUBfOyZxTJg4CUeX4MuX3B 0JrJKWi1cWvAc96m+ZLDU4Fz6umZ9ud7fmbelhWrq/twX05K2HxWvZZCdIob0GFAKR88 j7pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zjK96CKPYhWJsRojqqw/3kO0UdS2THfbIH/lD9qwZRI=; b=uddqAOinpYBCoZBpwkd0Ss7lFLC3JRyZsSQO8i1okhnCDJIs4crYPXFuSf8qfNA+lC yAAhpG8PS/xVp5A/1SFpuR5Sxlmphw5jCTM8Q9uX6r2dfdjtGdK7tblgq1HylvCGQBOm BT0fTSJpUVbx22jhK1XfJMRip7UguR0868I76YHTOqTlm34qLX9SYKzTDhwGHJxovDqB t1RkUPQQHYYXYX5Ddk4TYsRJfGt/5dFFASIVq+iS51N7c8+kyvIMfC8wBrFybPvBvsuM bNiM7zapXSos3+nfJuKL7Ow0X3z+3wOClZUJwdn4E3g0+Lotc5N+w/oi1JxYZOkoN1Mx wXHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y3UM4XVZ; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.23; Tue, 30 Mar 2021 01:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y3UM4XVZ; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbhC3Iyu (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbhC3Iyg (ORCPT ); Tue, 30 Mar 2021 04:54:36 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93374C061764 for ; Tue, 30 Mar 2021 01:54:35 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id b4so22621652lfi.6 for ; Tue, 30 Mar 2021 01:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zjK96CKPYhWJsRojqqw/3kO0UdS2THfbIH/lD9qwZRI=; b=y3UM4XVZ+jolBdJ/j2UQym3ri6kZusUPIXy9i/t2h7HkTqDKc8B0EH6ho6JZFnNqdY 2anbTQKIuOfI+OokvQEwlK1M561LxC3ZY5Q138ixoagINf27ZM1p4hk/GKCsVafEPrA/ snqKm8xpDjN5Levl/VI6UIZpH1JwmufJfBp8ZQ8beTP0plHsT+lB/CDusgwYMR596sOa BDYmfPmsWv6khM1A1Q98QpQ9xR6P1d6ZtXdYnR5ymNxocqlUOgLD1BFh4WM9HEf64k19 whEZdFQ4aoQ1J5ueZ/onoAH8XtuGNkbfbJVos0ufAa+/SNge2TijYNMwW/5ros+tOfE/ uB2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zjK96CKPYhWJsRojqqw/3kO0UdS2THfbIH/lD9qwZRI=; b=ZqemHoZQa6IIGG/CYi13zKjFYvikZE12r7aB8kL62lWfPuW+MnhieotGpzkpAYqjbz VgEFueHrORWTamndIDK3PmtDi+qqVTght8ljIMFpt2N572zxNSMcYdrs6rwUcup4f2Vn Y5H1BCXkQFYS4J4+AtAoOPgjBL1rGZTMzkOGZgjw0WYTFQsuQm+dfwbQ+6CKl3oEMQ8z +xubSgsAa4bBMgxAnCEba5kY+N1MVVTrmhBYNFdFKVcl+jKk939ax9W3eXYZM7FDALdh 8GizUrLq96XrdGXyYpT8oLVYe/15gZdqSWfsDvJRAgufxZ7pUCp7ocy19bryva03FFQF 0WdQ== X-Gm-Message-State: AOAM531Q+yLqD+dytuJtm7PebDxiOJiJQJPtGUxX1iY7Tx+hKvYLexIN 0NtqsLgH6xXhBqvNmIEK0qvJbA== X-Received: by 2002:a19:7412:: with SMTP id v18mr18359157lfe.234.1617094474159; Tue, 30 Mar 2021 01:54:34 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:33 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 5/7] Input: cyttsp - Drop the phys path Date: Tue, 30 Mar 2021 10:54:22 +0200 Message-Id: <20210330085424.2244653-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org When I test to use the CY8CTMA340 with PostmarketOS I don't have any problem whatsoever in dropping this phys path, it finds and uses the touchscreen just as well. I suppose it is because userspace is using modern input libraries. I challenge the maintainers to point out a valid and still used userspace that actually need this. I say we drop it. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 2 -- drivers/input/touchscreen/cyttsp_core.h | 1 - 2 files changed, 3 deletions(-) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 84f4f1c1a220..8ae9f00e5e31 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -655,10 +655,8 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, return ERR_PTR(error); init_completion(&ts->bl_ready); - snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(dev)); input_dev->name = "Cypress TTSP TouchScreen"; - input_dev->phys = ts->phys; input_dev->id.bustype = bus_ops->bustype; input_dev->dev.parent = ts->dev; diff --git a/drivers/input/touchscreen/cyttsp_core.h b/drivers/input/touchscreen/cyttsp_core.h index c102a094e888..8eba9d8ba74a 100644 --- a/drivers/input/touchscreen/cyttsp_core.h +++ b/drivers/input/touchscreen/cyttsp_core.h @@ -115,7 +115,6 @@ struct cyttsp { struct device *dev; int irq; struct input_dev *input; - char phys[32]; const struct cyttsp_bus_ops *bus_ops; struct cyttsp_bootloader_data bl_data; struct cyttsp_sysinfo_data sysinfo_data; From patchwork Tue Mar 30 08:54:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411689 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279253jai; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlH9IulIf0Qo1BOtWc+KZD2BoTrHyNbH6LQdE1ZMtRjtfOvPnq6ZvxdS3Hru46ucoUFCV2 X-Received: by 2002:a17:906:ecb8:: with SMTP id qh24mr33337064ejb.162.1617094524759; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094524; cv=none; d=google.com; s=arc-20160816; b=qFbzci9DrIsKxJIpeAcLE4sIDPcdhPLdJ0v7ukEk63Nh+VMZCRjnFdM7fmbQwx5Vl1 +4Jrq8AkjLrmrlSYMa9zGqrgnCf6u2q2bI4bgy9kV6ShUt9lKm2aP9UyxVw9CwyqcQf/ Aarqk4mUqW1Z6Kmc1wqUKO8kI1oa1cS3fS3J8wwUgVHXrUGigdjnHXtFcUnFnP3wYJvB dQ4NrHBm0OQFqnycGY6k5z8HOJp+f6Epb0zJiXgHSGAQ/zvUMmNvRJ6SSmTJ5f9Y1ijz Q58PZ4oNq1QQxT7y7FikSnr3dWjpkl7dn9/Wo6IlSKVcCOT98ZxPqqNyPDc9n5Pm2fyZ nZqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WeDMmUHMqTW6OH9fZV+W9CUsFCKVXgQjWfbISHyWnmo=; b=L0edWbhPPLz/5CD+e3KpdvlnKrI5Hxjb/KbKjtXw0cr8Q6ie8S6CJOZI/Tz42UoshA +TytzNppiXqMukOo9JMzpihCO6VnExzyO1M6gKUTie6rlL0h6qOovTZllyB0tlk3xQjU IGkLJE//W+EF9g0uZCp18OEQLOibg6uwLLp9wq3tuJrYUSDehIO7C2GJCoWdvdDusEPL VXETodOGnIDNlzjzOgYjnwl31yHXNx25LHu6ymHMmJArbyKkpk2NN3ksh7SKHLwqjcQw /GSaefw3el3jfbGuGQ86S4jp97ErTxTuQ16THLEgmoU8cvPBRFkLmzxdm/d4yLRvMeaa 0Q4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qQ4m2s7e; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.24; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qQ4m2s7e; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231154AbhC3Iyv (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbhC3Iyh (ORCPT ); Tue, 30 Mar 2021 04:54:37 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F18F8C061764 for ; Tue, 30 Mar 2021 01:54:36 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id a1so19041215ljp.2 for ; Tue, 30 Mar 2021 01:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WeDMmUHMqTW6OH9fZV+W9CUsFCKVXgQjWfbISHyWnmo=; b=qQ4m2s7ext90HzptdeeG/jREjBptW9hyrZcFLN4TBNbeizr2atRcTioxUnH++RKGcR 3haHGYFTVYD1yvPZWOlcnHBJlt/MBl0t5g3uveI5bS+BS6yTtvMATJqz+J7Ye12xKw2p 1qY8I9vsQ/9WN7e21UASG4kojxtFtWcLascetWPEa2TA3EIIIiC3y7WJTQggoXKZaj5T FVZ5kTAvLup5rTe0NDSQXwcsCzwWuggjug3HQOHhqSwyKqZROpDELVnnYRVStynOw7cd fqazuBzXppiFNZjCjTFLOgkUc+oMcPMov884h/f9FSySsmuir/SiNpivoJgaWYVgbqQC 2F4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WeDMmUHMqTW6OH9fZV+W9CUsFCKVXgQjWfbISHyWnmo=; b=CBJgIglL4FUpVRcuDqerkuuKJ34KTWakc3cNcVduoMl3noRQarTIG7VJ3RvRIOc18P cBCqdvEOp3fcZw1Bt+z35Lpm00iq/bbBE6Ig0lp1Y+3ML5XHn2euPjpS5xkbu9wTQ/lx 2Qvc2DWvrDWyqGLufwCOFdHEoZUbgqufxAqbxkvvgMKnoJKeHnpeQ2dMDfklvJnB8VRA pSTJsYSN0ZQ0iF8qTkVegsb1+4VzlZFvfT1yVPUcQhaWCnzNa2AerVdxa/M8FEE8y41C w9xIcRgvd1YpvuYQ7Mx/Gf+1ekZxT01KItfjVlWKaWXf9RdipCc2vZj8R18CPqcCCy36 r/Gw== X-Gm-Message-State: AOAM533iz+3d1bKrKztuCHWB7vy9LQ263YjecaF6JKGgH3IpFSeA1yQ3 GEaSp8kVvcWFdNeOLAKR+aeRdQ== X-Received: by 2002:a2e:a177:: with SMTP id u23mr20494915ljl.286.1617094475521; Tue, 30 Mar 2021 01:54:35 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:35 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 6/7] Input: cyttsp - Set abs params for ABS_MT_TOUCH_MAJOR Date: Tue, 30 Mar 2021 10:54:23 +0200 Message-Id: <20210330085424.2244653-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The driver is certainly reporting pressure in cyttsp_report_tchdata() with input_report_abs(input, ABS_MT_TOUCH_MAJOR, tch->z); so we should also advertise this capability. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 8ae9f00e5e31..ac412bcb15d8 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -667,6 +667,9 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X); input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y); + /* One byte for width 0..255 so this is the limit */ + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); + touchscreen_parse_properties(input_dev, true, NULL); error = input_mt_init_slots(input_dev, CY_MAX_ID, 0); From patchwork Tue Mar 30 08:54:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 411688 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4279250jai; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmZgbJOluTkIzkVfzFlNBRolAQuaKq2777mutmnkJhYnpGyouzJvOAOmazEDP8lbkWfyWY X-Received: by 2002:a17:906:85b:: with SMTP id f27mr32845145ejd.414.1617094524426; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617094524; cv=none; d=google.com; s=arc-20160816; b=T6YhzYJJ7HUWOOpiaCbXXH1OLavcvzElCEEsddB2AIOi0G94+Jt78Tkfs5n3vmK0Nm I23WJBOW8k3x8unU7wFyChXGPcm/l+49covn2Rk0jeXBhcOeEFYweq2gxRfeobvUWMTy qgINB9O53KXZtgdtDWwxSw6cPrPb50dy+hzLicdsakPnyhPqarkF8MmpoPtJMt6tEgBD fzdiYbY+AogO4ZmGeHAi7/xTcKRnXdtlWuO2kPVp7ufUMjb/wAxhGduOeCNNqPf+03Rb noQTcpCuZnvCkz686qXYKNDm4Bgm0tvWrm1pCvEhhEKCDZhvrarvCzQc+XfndWtLDUhS kQ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UfaoV/sNb42ikH43Koy/D/irGAW84Qvp9X/UlbMwEzk=; b=ob7rT1j8rM+7D0wPucuf8deCbBMRZrWO0+3WTFToVxnEm58OwY0DSJ6N+7ynTz6hht 5EPaUJWPpFX1o6sKFDwklyqjxfcUupl/6ZqlWhtIC8HXYCoFlQCwOb9Y7UC0t+wcqOZm KQoUF5BB/9kiYwW3Y5tcOIdsYgzr/pFaMUP9T4nsWE6otRTx09aKKcMhT3vt2icUKy9g EsmeOld8ygP3rWCMRIRdCfjlf/rYDjREHpn0Cf/PT7TgYf2JqA09K1qviSMB1z+3p7PA 3h+7PNsHIN7TfecGKJ4IDbDt2j86FnZEc8Y9l7i2EhZk7B2QqVQ69ue6pIe50tFtRgR5 Q67g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k32sLOji; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si14273072edv.24.2021.03.30.01.55.24; Tue, 30 Mar 2021 01:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k32sLOji; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbhC3Iyv (ORCPT + 1 other); Tue, 30 Mar 2021 04:54:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231310AbhC3Iyi (ORCPT ); Tue, 30 Mar 2021 04:54:38 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56E65C061764 for ; Tue, 30 Mar 2021 01:54:38 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id s17so19024894ljc.5 for ; Tue, 30 Mar 2021 01:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UfaoV/sNb42ikH43Koy/D/irGAW84Qvp9X/UlbMwEzk=; b=k32sLOjiJYsWxfXX9S+t/N5vmo6WuHtFecVAec02o04ogYTmrhDbf49bzsuQmTcarm k1AzPPp4N2U9XcEGtTrriIUaPI6fs8t8aYOVdmhh5M5f5SxVuRx/sp5uoJ0PyW1AVtyC pPedra8xXAQW9smWbiy4HqQMxs7FfMBq3LJdhSi/eRIPz4+7iFPU+vN/bIlUt4CD84q+ M9D27r375cxfmS5yrLiLPpt4ThCv0wejNxLobKsI+50W6dqXFD0GDO4nSPyEf8MdpInt X+D79lXpVr3qJAfD0/ysNE18sAvgjEr21FRKPjJCNkv5vntN71KtpvX3TPSTTmmPqPFb EiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UfaoV/sNb42ikH43Koy/D/irGAW84Qvp9X/UlbMwEzk=; b=ZMofqDZywWhOKSDeQqal6nKp5pQXKpcZJMp4CWc8gc7YF9AJG1kwaWXz7iMgJQYbTm 9mVTQsovxSrle7stJlokUWwlPc6RBqSc1nNQs9W6veZQ/fYVaPKbDN4WL8u6pV7H5DFB 36xz8ADAlxxcZXOFm0mHLPPzxOhMkCZnqmaJ8cBoHf3hdSsBinxsxevqBTN519fGMTVP PMTDlqJo6JkrqmKXn2zsUXHbJC7BbW4L9UQl2fo+pB0rzEB3a6R6O0OyO3F/CXC0qzla nj8yE0S0ZMxQB0r+hq7s84p9c7ojvosA9unJjGL6DV6bgxkMGQULIbCv1k3erTasVlcx kR/w== X-Gm-Message-State: AOAM531EgdQz75nR6ExS27HnwGfsX86XxqsmKibPU14ygoPTumRs/URh 2s6h3fekYJU1O3Wd5dJxWJaBCw== X-Received: by 2002:a2e:9a96:: with SMTP id p22mr19652691lji.167.1617094476870; Tue, 30 Mar 2021 01:54:36 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id 201sm2104238lfm.108.2021.03.30.01.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 01:54:36 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , Javier Martinez Canillas Cc: Henrik Rydberg , linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 7/7] Input: cyttsp - Flag the device properly Date: Tue, 30 Mar 2021 10:54:24 +0200 Message-Id: <20210330085424.2244653-8-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330085424.2244653-1-linus.walleij@linaro.org> References: <20210330085424.2244653-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This device is certainly a very simple touchscreen so we set INPUT_MT_DIRECT. The sibling driver for CY8CTMA140 also sets INPUT_MT_DROP_UNUSED and experimenting with this driver it clearly does not hurt: the touchscreen is working just fine so let's set it for this one as well. Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.29.2 Reviewed-by: Javier Martinez Canillas diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index ac412bcb15d8..fb71cd0d2070 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -672,7 +672,8 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, touchscreen_parse_properties(input_dev, true, NULL); - error = input_mt_init_slots(input_dev, CY_MAX_ID, 0); + error = input_mt_init_slots(input_dev, CY_MAX_ID, + INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); if (error) { dev_err(dev, "Unable to init MT slots.\n"); return ERR_PTR(error);