Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2281089pxb; Mon, 19 Apr 2021 01:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSarHGUg7X3dWHSEI3zBBkHVO0KT96KcMSeTc41SAtq+oxjmob6eja6hCdOKjd3EH0l4vU X-Received: by 2002:a17:90a:c203:: with SMTP id e3mr23353528pjt.173.1618821625589; Mon, 19 Apr 2021 01:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618821625; cv=none; d=google.com; s=arc-20160816; b=sXl1KiUpeXoMVYaAktmRF6SNuFg/51FEMOiJc8qWXBJD6G1yz2PvrzdW5OeMtY5g5S 8hGuZemRY5+YW/1z95LYQPMVZUflljM6u0S8Xd4jtDFU/CxqinBCshp+EheCWxkTwz9/ o8irf372Dku7KsNiCgxG3Bbr69w75X9VeKFeJdO+eHo3QcDZ9VpLBwiv+KzCQbOYqWbQ NxTo66Ug5+yOW2ZlNvAwmXDmQTQuJqva/wfwI7YMAZzfFGjyxazHnWYY5MDlxGhLoKCx joJEjF8DwzSzc88B+aCTH7kMml/nWe0q+2DhNucCpdLkf4C13TIg+faeLnHFcuNSA8hg SXxg== 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:dkim-signature; bh=Ce9Y9YKTf2RGN+1Lg+fvm8yJDxZYIMZFZEP5ALleVhM=; b=KZNkLT1HdSemNsBaAVHrJxRwsefjeJmjaMoLYjzzhYp19mMMSzoq7uEDflZIkJnRZd Bj1sp8v2p3MsZQebsYII0QPVJvq5uD0iUy2rgn6wdA4inlvjNgpXhkFO1v//zYkCJJiB ApT2BLcFxno2O5YF8OHNAGgCf6xDufFU3mF9vYWUINQUUWyVeIKRQMGCWOPaDTXsT9i1 4Hoqoyv/LDpbXktt3C+GwHdnIicq7jyJljrqXCVw6YwLjFipJSTJUnnj10yv0k7Y9flm PA9xFw82LvHqwnOsX48TbbQn4d/gH5RV+J7HfjXRVaNReTkCqyMryGcm2jRnnnymXQ4V 0IPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm3 header.b=Fky6wf+d; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ErldjM1z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si15923393pfn.11.2021.04.19.01.40.10; Mon, 19 Apr 2021 01:40:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@alistair23.me header.s=fm3 header.b=Fky6wf+d; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ErldjM1z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237923AbhDSIkD (ORCPT + 99 others); Mon, 19 Apr 2021 04:40:03 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59415 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237717AbhDSIj5 (ORCPT ); Mon, 19 Apr 2021 04:39:57 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1FB6E5C00D6; Mon, 19 Apr 2021 04:39:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 19 Apr 2021 04:39:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=Ce9Y9YKTf2RGN +1Lg+fvm8yJDxZYIMZFZEP5ALleVhM=; b=Fky6wf+dNakOSJskz3NvOTyu0rgfE xWPs67af36YFHQU0AJ4ewa5MTMXwwJNrxKA+u79O8zbhc2GINibKITbyFbHnKI9/ b7CbObmtldrxMdZMTvv8HkIh+jolgO8FhvwfLWqsAmWGUQpMvrX7+iqfU8SFwOXo oWZdrLXv7xfJU2tLCMzTa04ARXbUZb96r6O0y/qRaink5rH7zSAEA0pRDOCFVxyU avqRwr4WPDeH/Bg6bwclU4YRKaND+8HdoZtPlj4JjvHXzwkRZQ/tl/RsGXXrK4X8 qmj4lzmHKM6i0AKmLfL5ochK92erFdTVbqALXAuNnv/S6Ccyl3ymzqflg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=Ce9Y9YKTf2RGN+1Lg+fvm8yJDxZYIMZFZEP5ALleVhM=; b=ErldjM1z kO7d9PeA6gPtMr2RN6gm/6QOjjtCRGF/hFIVmLhRO/A2nbYMwIngGOaKrPQgMpiR 2Qo6fKLlZLzKT9deAWwsZ1OxM+Fo3bfTByxRtH/aNLuGf1cOh7M8jvNVLmCo3RfE mYqu8uffCNvgqeP+Qwg9IDVxz7aNHDJKVRtN40Pxs06dJBRZNJA8p7fhghLoRp/X qVBBcuZtIAJfIuMlIhhIxKLxDqBy0DzAj1paxr0lq+VE5Y6PVDpLSLpwU3k2fExC aKQ83/xXbaFAvk3IoVsXS2v9G5om8zfLshgC4EGqatsyuXNeBhH0McqRcnbDGmbZ aJ3n5KVu9z0sDA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucfkphepkeelrdeg gedruddtrdduvdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: from ThinkpadX1Yoga3.localdomain (unknown [89.44.10.123]) by mail.messagingengine.com (Postfix) with ESMTPA id 5552A108005B; Mon, 19 Apr 2021 04:39:25 -0400 (EDT) From: Alistair Francis To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v5 4/9] Input: wacom_i2c - Add touchscren properties Date: Mon, 19 Apr 2021 07:00:59 +1000 Message-Id: <20210418210104.2876-4-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210418210104.2876-1-alistair@alistair23.me> References: <20210418210104.2876-1-alistair@alistair23.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Connect touchscreen properties to the wacom_i2c. Signed-off-by: Alistair Francis --- drivers/input/touchscreen/wacom_i2c.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c index dd3fc54d3825..28290724b3da 100644 --- a/drivers/input/touchscreen/wacom_i2c.c +++ b/drivers/input/touchscreen/wacom_i2c.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ struct wacom_features { struct wacom_i2c { struct i2c_client *client; struct input_dev *input; + struct touchscreen_properties props; u8 data[WACOM_QUERY_SIZE]; bool prox; int tool; @@ -114,12 +116,12 @@ static irqreturn_t wacom_i2c_irq(int irq, void *dev_id) wac_i2c->prox = data[3] & 0x20; + touchscreen_report_pos(input, &wac_i2c->props, features.x_max, + features.y_max, true); input_report_key(input, BTN_TOUCH, tsw || ers); input_report_key(input, wac_i2c->tool, wac_i2c->prox); input_report_key(input, BTN_STYLUS, f1); input_report_key(input, BTN_STYLUS2, f2); - input_report_abs(input, ABS_X, x); - input_report_abs(input, ABS_Y, y); input_report_abs(input, ABS_PRESSURE, pressure); input_sync(input); @@ -188,6 +190,7 @@ static int wacom_i2c_probe(struct i2c_client *client, __set_bit(BTN_STYLUS2, input->keybit); __set_bit(BTN_TOUCH, input->keybit); + touchscreen_parse_properties(input, true, &wac_i2c->props); input_set_abs_params(input, ABS_X, 0, features.x_max, 0, 0); input_set_abs_params(input, ABS_Y, 0, features.y_max, 0, 0); input_set_abs_params(input, ABS_PRESSURE, -- 2.31.1