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);