From patchwork Fri Mar 1 16:41:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 208944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp9205dyc; Fri, 1 Mar 2024 08:56:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUgZyN4F/wXnisEC5DfRueUnnWN521wS/UeXj8JyM88Qp36IfnOMo0aBSFEhh4WdVpkXLvx4K5A+YGmMTvKFLkzDDXk1Q== X-Google-Smtp-Source: AGHT+IHFRZ1XOVOVyQwkxhYPniN6nynyqeFnrzumSkfzHm3FH7umZ5SYiH1YskMqn0DAKaZhoaWb X-Received: by 2002:a05:6808:7c1:b0:3be:d941:621b with SMTP id f1-20020a05680807c100b003bed941621bmr2167242oij.26.1709312173839; Fri, 01 Mar 2024 08:56:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709312173; cv=pass; d=google.com; s=arc-20160816; b=PVBkDHIldDlfGvtJpGULFrhANUiCjd9eMWV8k8CXYMpobgaWnrSSadW0nfQzfFVGm1 uSa3rEIAdYkjMfpiS0YZIf+6Sk2KfDnyremRV4/nsHOkm/ieR6ONjXbZ9NLsD7Qi6foa 2TxnOjgVsPuhHMpvgvCjHMj3XonUB9cTIyOaDGOL8JBBk2O16phdJTXkobLyEy4wK2My kezCTUvQp3ekZ5DHFEmy4ty2QKVMT9/it7sVTyz3PzzXwHPIiOwcKhvfusIrjFJxm2aB TQGg2T3Sn0GQAi0xk+ja5H6/5Wnhmgb1oxpUz8flCUS8VoOgqEld0s/5zh7t1T75dTDm euYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MzQyNh0lmPrUf5VQAXcfQbK2Nrbh1wqtC9TEwhif52Y=; fh=3dN3s9rK30FPLMWv6b8wsC55ZALaDhhrbsSyCcljd7Q=; b=U73bQS70S3CgdGWWKk83Xfuz7utwOQi5XGBnnId7kAN9L6I5gfo96wdigRHF9JtCFx MPvpCddHW8ShadNHKmnv3cdjJ9hKzL2D5+sH5KIYYB0c05EU44V2H5wkWAhEDE3vFHIu SIkdr4cScHpRbSoyAogUNDb6Fx7ncT855gWXxTnYvHQMItf51/TLPkspzj1ouFgNItaG bU6ves9yVHjC5xU9rfZNH/FzdROj8ss9gy+VEAQGuvRyO2Xugdw28sZr1RZlfahC9AZ1 QwdsbfVMAQsamcxThYRfvjItnK3e8QFfUkmu48+98WXxpZydn+UFVk5gv+WjSzy4c3bK Hmpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=TsDgkS3E; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88770-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kq17-20020ac86191000000b0042e60bf5c20si3615600qtb.239.2024.03.01.08.56.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 08:56:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=TsDgkS3E; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88770-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9BE8E1C23112 for ; Fri, 1 Mar 2024 16:56:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C20D25610; Fri, 1 Mar 2024 16:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="TsDgkS3E" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E97FEAE3; Fri, 1 Mar 2024 16:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311665; cv=none; b=EFWksUwm9xQLyNKUBJ4GWUMrSRGknG6z/XjqBP3FOtHQfMlTxl7kL9Bt7qw/VNkMsMvfwK0G7plka0BEtp1uIYOQP+9fm3LMktmhiA07iIkvx77RDnc+1lD285V4nQF9c3olLf5akNaGWdEtaPsLwGMYEW1sKzff3F50ZELLgGs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311665; c=relaxed/simple; bh=7SNXsS7kBFov5BbXviDXSo57rCWVnyXGBObGdVtBwWo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NXKIiDuHMwsezXTGOZS4loOSuwB9UGLp4Omccn0/9FSTbkhvR7QD0ipawP/VDs9HG3juDOGeNGsCNZiXigNzwQSHKBkqavR/GGMDA2MfNjufm/18JZtLGEoionYL8BR35M2Tn7jTXvmNDos88vg/Fg7PAkPieo0e55ppzXbo77w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=TsDgkS3E; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 27971284254; Fri, 1 Mar 2024 17:47:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1709311654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MzQyNh0lmPrUf5VQAXcfQbK2Nrbh1wqtC9TEwhif52Y=; b=TsDgkS3EKsIigNO2qT2q+sX/7CnLddaDNhyPl78+6XjH18OVE8v+gGNGtqztqFZp6IBxx+ WYuPd9orJX/XOUtT3SnLUlBj6TkzlwP4vHuCkd+2U2ok8oGb58FQfRf8mfil1SZR14kH8f g0XrCDGzkMtsOTnk81dRjmkg+3idNME= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 02CE74587C6; Fri, 1 Mar 2024 17:47:34 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, karelb@gimli.ms.mff.cuni.cz Subject: [RESEND PATCH v5 1/5] input/touchscreen: imagis: Correct the maximum touch area value Date: Fri, 1 Mar 2024 17:41:00 +0100 Message-ID: <20240301164659.13240-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> References: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792343721832136570 X-GMAIL-MSGID: 1792343721832136570 From: Markuss Broks As specified in downstream IST3038B driver and proved by testing, the correct maximum reported value of touch area is 16. Signed-off-by: Markuss Broks Signed-off-by: Karel Balej --- drivers/input/touchscreen/imagis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index 07111ca24455..e67fd3011027 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -210,7 +210,7 @@ static int imagis_init_input_dev(struct imagis_ts *ts) input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X); input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y); - input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 16, 0, 0); touchscreen_parse_properties(input_dev, true, &ts->prop); if (!ts->prop.max_x || !ts->prop.max_y) { From patchwork Fri Mar 1 16:41:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 208948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp11884dyc; Fri, 1 Mar 2024 09:00:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVAsFi95GymJADZXAQg5SL1JesxGFGEGsZ4sPykonRHH8/LNKEwJBCMw8XeMTM5Jd8VU2CKX74ymSzw+ioE1H1SpfPWbA== X-Google-Smtp-Source: AGHT+IG2SL3Z/ucqnqbBMqCRNiwpwbyTJ8jfKbabOyjdqHB05u8//gyb+A6WcuWpcVjMc/y5aQic X-Received: by 2002:a5d:9bd5:0:b0:7c7:9c16:7a6b with SMTP id d21-20020a5d9bd5000000b007c79c167a6bmr2408866ion.4.1709312455811; Fri, 01 Mar 2024 09:00:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709312455; cv=pass; d=google.com; s=arc-20160816; b=fRhAcmudlhorqh1xlxUdydrf2F3GLWobjh1+5c7HhlgJ+kaj2N36groLnnoz07IvOD ouoNIxxEaamwiMA/XkUpkZTqAXacx62xEByEFGyolOB14+fhtxFhzoA7uN5Z7Bl3teJJ 9oIZwA5AbVWWY3imh+rOFlToQ05rvnJdkbYUgRGjSXkt3Wy8KqRb+1XpRqd6mi9TgaBb AYEozG2PiJFTZnodwJu0me0u8Q7cVJmHKqNciPDJV1t9BcIqwAW01/0e5CbQTMZRcjtV RjJiL+IVCNEDPvackJRpgMKEAvEPU8oCD+nkVpKMt7EAQkwIWy9K5CdGPoXzCblJXmYT tXZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=qwToY8aGzzgZXoPxLc+siTU0nymhjCfDtUmF5U3SxWA=; fh=3dN3s9rK30FPLMWv6b8wsC55ZALaDhhrbsSyCcljd7Q=; b=po2qZ9fna2Ylg7et8mfzKkk7FmXx7MbwJ2U/xHYWQEOJz9i7BSVhfvagz2vso0zoJE QRVs51fAM4w4jYij72MmbCBJHa6hGITMxpPYj+3xDY8IrO046w3wlBesePN+14a+V6Lq GPCSKfzSJBYKmZdxwDcqV1jks149GyL6+fk0v1rVEeb55qhl+SrQRZSDatJY/kbcnnCM TI83HDEszZdICcLYBV/CH/MUKOj0DtgUT/NqKmHuspK+Thfj2p9kzvRYqyoGtJPCRxNi 5nMHaKe5yp1okKLb5Lp1xRvJ2+hpW/f5SN5RcGl/c8YM2DExlhdgDHxMcuGBz6uDJMel hghQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=ltqO98cH; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88772-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88772-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 26-20020a05660220da00b007c768772c3csi1251187ioz.72.2024.03.01.09.00.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:00:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88772-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=ltqO98cH; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88772-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88772-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A8178288ECB for ; Fri, 1 Mar 2024 16:56:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9C8970CA7; Fri, 1 Mar 2024 16:47:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="ltqO98cH" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FFACEAED; Fri, 1 Mar 2024 16:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311667; cv=none; b=saA98Yk7ZpxvEhu/fmgMfOwefws1G5P8TK6WkN4Q0Zfj+8iurFHQxok0/RDPSIP4sOUN9ycK3eKKJXkIomdWHl9L7zI26E9pq/kyVF2y6PqyCNWGWm6gamwMQ5Jd9QNoComV5v+ZKaMtPyUKfl+LprNoGT1oqwgOwcv3SLhyJnw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311667; c=relaxed/simple; bh=ESdxNUTZV8huBaCXfnANhXBOuC/wSr95nB+gwaKgrIk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q6nQ+dKIeMWPRmzAmJwTB/vtVDl8Pes/VNcRv+pqH59Y7L2nrydtqfhm1ijFEYhTeZhiOAlfc8MYAtU4w9UpU2t9B8U4i6RX22nKf/iEOz4ZaZt6hWRyHVWuINdRTw6gJ9JLaBjl+MegV3ODCAvGSJcNeyg+3pG7QWoX4uZCIjo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=ltqO98cH; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 35513284255; Fri, 1 Mar 2024 17:47:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1709311655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qwToY8aGzzgZXoPxLc+siTU0nymhjCfDtUmF5U3SxWA=; b=ltqO98cHBqtHCz3GqvW410/jJhgE1CouQVt/I37gGFBdwfPYKRVqcOs9CGrJUxxJ+qbzMK YLbvef8mDj412KVYC2m28OtUzQQTf9MAG7pqAvSf9J91777LmTL+uIRtw6WSJ2eJEw1/yP QyLC1SMPMpHeK4G94qA9wPMrsP0EQV0= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 116974587C6; Fri, 1 Mar 2024 17:47:35 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, karelb@gimli.ms.mff.cuni.cz Subject: [RESEND PATCH v5 2/5] dt-bindings: input/touchscreen: Add compatible for IST3038B Date: Fri, 1 Mar 2024 17:41:01 +0100 Message-ID: <20240301164659.13240-3-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> References: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792344017732748430 X-GMAIL-MSGID: 1792344017732748430 From: Markuss Broks Imagis IST3038B is a variant (firmware?) of Imagis IST3038 IC differing from IST3038C in its register interface. Add the compatible for it to the IST3038C bindings. Signed-off-by: Markuss Broks Acked-by: Conor Dooley [balejk@matfyz.cz: elaborate chip differences in the commit message] Signed-off-by: Karel Balej --- Notes: v4: * Mention how the chip is different in terms of the programming model in the commit message. * Add Conor's trailer. .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml index 0d6b033fd5fb..b5372c4eae56 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: + - imagis,ist3038b - imagis,ist3038c reg: From patchwork Fri Mar 1 16:41:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 208946 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp9511dyc; Fri, 1 Mar 2024 08:56:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW4hM81lLGCdfOtjOniyGS4wtyHm+n7Gh6cOiYKzwNI7Jk33eMGm8L1BufPaZYWA1KE1UEvjCuJuh7gd3mGYOln6qnf8Q== X-Google-Smtp-Source: AGHT+IEtl6qM16mC2W0ykM+CgmQ38XUXXJ59Zhua6+9474l2WIVzJLCHxtUef+Y0/0xLQrEs6ufK X-Received: by 2002:a05:6214:192d:b0:68f:43ec:7df7 with SMTP id es13-20020a056214192d00b0068f43ec7df7mr2062742qvb.37.1709312211715; Fri, 01 Mar 2024 08:56:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709312211; cv=pass; d=google.com; s=arc-20160816; b=O4tMgAmqamaStLSyy9tHXPJNUz0/1YmN/odX/2vaEVJ/tcBFjMm29jj24F3owYNNd6 VqIm20Aq19pbe3RWri8D6MPkPuwxmI42KwBycO+mCsG6cnxDHXlKmVFm0hnqjXsZBLT6 XgvFLvfbn/galMS1HOrC2ZtvL3UlKWM8OPUJF7yYZna7NdcBRrCplisKszn82DrwdJKp 0uE7Stt2MB+mo875w16f8cWRFDFJ6D8BjHpcklwK8te/Yo7XN3/pt5I3hV/zTuABKPAI 2+cVMExDxQsrFTwiFWR07n6kF4xLP0kuB7X/l2Nrw1+MF1k0+zJEih7Hq7cj46Kd+rtO qTgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=UIOJbI8z5ZyOMQWDFPQDTypDMqqUoXAjCw3t6tPK0Go=; fh=3dN3s9rK30FPLMWv6b8wsC55ZALaDhhrbsSyCcljd7Q=; b=tmt7yv8CFlHCMZ18MzrW/o3vsVDbVh+SaGEPkVEutMdTKTE/VYYFwI7n5h/riFsKHX kBOugjrs35f0yXTxCMJE79+zPl/JIiAUqHTTSlb5W+kh5q0i4kD3FFVt1OP5drkucHlW hCCujztt5GZrKpG0tSShKz/LPK9sPzBJlIWy/gBJIWaIEnbKsFswUgh1avuiOI0KSeMY hxJlqJaG0DP56BygAJ6JAUdkXuyWSF9KaiNM+ncoWMe8mZV5oW2OPREMc0TraN3oXl8s 2nok7v2iZYQSQAA8xDwdevI/EywBpZpRmRPYsVjDJOmRuBdQ3UJcGIE1UgPZKyG0zqQP ISWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=IjQhgqn6; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88773-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88773-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e4-20020a0562141d0400b0068cfba18abbsi3998740qvd.418.2024.03.01.08.56.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 08:56:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88773-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=IjQhgqn6; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88773-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88773-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 730711C25064 for ; Fri, 1 Mar 2024 16:56:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAFB471ED1; Fri, 1 Mar 2024 16:47:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="IjQhgqn6" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86990F4E1; Fri, 1 Mar 2024 16:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311667; cv=none; b=jGBrT4v4BOvqWpVkM+J1YPmmFmYz/u5sbLOv4PrW4ZVsVRlKXpM5R8KDP0kEDLWdEZ5oJV4YF8qV4aDUlfMHmlDkuDwq+iYlNO6wBOvb2S+3TGef1tCs/cBn6CoJQ3lleTshNSWH+uF+rxenw2dy39J4p8mJNDEskrT/Un0SDJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311667; c=relaxed/simple; bh=K8hTHNxD7+xc0Mc6CH9dFB5iscDhBxHrwGYHo/Go1Yg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CfxMpt/XmQ0PEO3WYxYsioj2OhdVLzOS29b7H/EJliwGeKiB293r2kYirRqiqcDLN4jYSinftahWvIS0Z/wYSX2rt0cIke6RwOpJMKwJOtf5E21e2RG0TQT6mwvbWKTawlY7xm5h3I1FcxBiXOnJKhoVa/16OyKwZHURz3DSnrY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=IjQhgqn6; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 554D6284256; Fri, 1 Mar 2024 17:47:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1709311656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UIOJbI8z5ZyOMQWDFPQDTypDMqqUoXAjCw3t6tPK0Go=; b=IjQhgqn66urguwESquoCjndFHh1+oDPeuexfly/NYccDG6G8M8qDV6NgaaXTkp05QDSHJT PaZ+PwQ4uFnSCnWeZIM3lIhLG1MprIgmt690RqvXb0kEOgI0Q/reOo8l8UYrCtmcUPW9/q Y1E281nSFVy+t2ugS4RdFnX74m6375I= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 3428A4587C6; Fri, 1 Mar 2024 17:47:36 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, karelb@gimli.ms.mff.cuni.cz Subject: [RESEND PATCH v5 3/5] input/touchscreen: imagis: Add support for Imagis IST3038B Date: Fri, 1 Mar 2024 17:41:02 +0100 Message-ID: <20240301164659.13240-4-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> References: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792343761942771986 X-GMAIL-MSGID: 1792343761942771986 From: Markuss Broks Imagis IST3038B is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). This should also work for IST3044B (though untested), however other variants using this interface/protocol(IST3026, IST3032, IST3026B, IST3032B) have a different format for coordinates, and they'd need additional effort to be supported by this driver. Signed-off-by: Markuss Broks Signed-off-by: Karel Balej --- Notes: v4: * Sort the definitions in alphanumerical order. drivers/input/touchscreen/imagis.c | 58 ++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index e67fd3011027..9af8a6332ae6 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -11,9 +11,13 @@ #include #include +#define IST3038B_REG_STATUS 0x20 +#define IST3038B_REG_CHIPID 0x30 +#define IST3038B_WHOAMI 0x30380b + #define IST3038C_HIB_ACCESS (0x800B << 16) #define IST3038C_DIRECT_ACCESS BIT(31) -#define IST3038C_REG_CHIPID 0x40001000 +#define IST3038C_REG_CHIPID (0x40001000 | IST3038C_DIRECT_ACCESS) #define IST3038C_REG_HIB_BASE 0x30000100 #define IST3038C_REG_TOUCH_STATUS (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACCESS) #define IST3038C_REG_TOUCH_COORD (IST3038C_REG_HIB_BASE | IST3038C_HIB_ACCESS | 0x8) @@ -31,8 +35,17 @@ #define IST3038C_FINGER_COUNT_SHIFT 12 #define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0) +struct imagis_properties { + unsigned int interrupt_msg_cmd; + unsigned int touch_coord_cmd; + unsigned int whoami_cmd; + unsigned int whoami_val; + bool protocol_b; +}; + struct imagis_ts { struct i2c_client *client; + const struct imagis_properties *tdata; struct input_dev *input_dev; struct touchscreen_properties prop; struct regulator_bulk_data supplies[2]; @@ -84,8 +97,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) int i; int error; - error = imagis_i2c_read_reg(ts, IST3038C_REG_INTR_MESSAGE, - &intr_message); + error = imagis_i2c_read_reg(ts, ts->tdata->interrupt_msg_cmd, &intr_message); if (error) { dev_err(&ts->client->dev, "failed to read the interrupt message: %d\n", error); @@ -104,9 +116,13 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id) finger_pressed = intr_message & IST3038C_FINGER_STATUS_MASK; for (i = 0; i < finger_count; i++) { - error = imagis_i2c_read_reg(ts, - IST3038C_REG_TOUCH_COORD + (i * 4), - &finger_status); + if (ts->tdata->protocol_b) + error = imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd, &finger_status); + else + error = imagis_i2c_read_reg(ts, + ts->tdata->touch_coord_cmd + (i * 4), + &finger_status); if (error) { dev_err(&ts->client->dev, "failed to read coordinates for finger %d: %d\n", @@ -261,6 +277,12 @@ static int imagis_probe(struct i2c_client *i2c) ts->client = i2c; + ts->tdata = device_get_match_data(dev); + if (!ts->tdata) { + dev_err(dev, "missing chip data\n"); + return -EINVAL; + } + error = imagis_init_regulators(ts); if (error) { dev_err(dev, "regulator init error: %d\n", error); @@ -279,15 +301,13 @@ static int imagis_probe(struct i2c_client *i2c) return error; } - error = imagis_i2c_read_reg(ts, - IST3038C_REG_CHIPID | IST3038C_DIRECT_ACCESS, - &chip_id); + error = imagis_i2c_read_reg(ts, ts->tdata->whoami_cmd, &chip_id); if (error) { dev_err(dev, "chip ID read failure: %d\n", error); return error; } - if (chip_id != IST3038C_WHOAMI) { + if (chip_id != ts->tdata->whoami_val) { dev_err(dev, "unknown chip ID: 0x%x\n", chip_id); return -EINVAL; } @@ -343,9 +363,25 @@ static int imagis_resume(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); +static const struct imagis_properties imagis_3038b_data = { + .interrupt_msg_cmd = IST3038B_REG_STATUS, + .touch_coord_cmd = IST3038B_REG_STATUS, + .whoami_cmd = IST3038B_REG_CHIPID, + .whoami_val = IST3038B_WHOAMI, + .protocol_b = true, +}; + +static const struct imagis_properties imagis_3038c_data = { + .interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE, + .touch_coord_cmd = IST3038C_REG_TOUCH_COORD, + .whoami_cmd = IST3038C_REG_CHIPID, + .whoami_val = IST3038C_WHOAMI, +}; + #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { - { .compatible = "imagis,ist3038c", }, + { .compatible = "imagis,ist3038b", .data = &imagis_3038b_data }, + { .compatible = "imagis,ist3038c", .data = &imagis_3038c_data }, { }, }; MODULE_DEVICE_TABLE(of, imagis_of_match); From patchwork Fri Mar 1 16:41:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 208965 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp32864dyc; Fri, 1 Mar 2024 09:32:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXk1a8lzMvpKCAwt8n0oIqUpP94wBQydC0ejuEeuKqljg7yBZfPH1c9eAwb2SiytTlZAirDJU+DUKFdCeH61bs0yJav7g== X-Google-Smtp-Source: AGHT+IHRmt8YwHKfu5I9rf2L69siNR1VfYUK/3iTPdQ/uKtcqgD561WXfVi8h7Qu9tb9rb8PQlAn X-Received: by 2002:a17:90b:23d0:b0:299:8265:ec70 with SMTP id md16-20020a17090b23d000b002998265ec70mr2247747pjb.16.1709314342995; Fri, 01 Mar 2024 09:32:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709314342; cv=pass; d=google.com; s=arc-20160816; b=XG4P+xbImdGms+SXoLsQHrx4kEUfuZvUC0fDRl2lBeuGVmApDI5oUaSOX8B8ZiQeN3 g/D26SyLcrVCmVOC2RLnRL47Y/npdulxXuO5kcBCMHd60DVHzWOFQmPRpDURrxQTwgWu jtO15Bco7O7Kq0lHZPs6hUGJkV3RtJmHmGwgaO4e6vM7of56t7txGgY2KkAYuEewWBn3 6aZWrSvdxMa2IOc05hqWNdZvuAgLuOPtTh++DdvdG91IEAC0+cDdKIS1gxYbwUZyC7e3 SOzbUFFg/jWBotXUgfBHjnMsdDh2p567+ZfF2MBg+mUSrpTJtnmYK9caK+sC5yxrd9TS XQbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+Te2cu5IWLMOf63F8UHnTyXgS+llf7Gs1S1hHLvmrD0=; fh=3dN3s9rK30FPLMWv6b8wsC55ZALaDhhrbsSyCcljd7Q=; b=zLCCHOwoKYT7IjeVeU+t2k0fbpt04tIgGPdQIaGG0MvZYuO19ForYNGMg14c4HgWWq Sr4PyUqtlcdtV5tH1p0xpQtQv2qyBGJOgJV0F2ezlkG7MKWi+Z8BKmooH7YtmJoBWFy9 js4qJZt+ElylCuDtW8QsuWFtUU5W9DuWW+aP8gms/koZfzAQIJj3UmQRnFM8ynejUvxm kXWfTHnRsQbe3IQG5aveTgviK5hV0eH/JoBzywyNwK6Orp8vJmMlPEmF2YtGr2NgRUUc udZKUlOwlo5miKp9nvUMEX9AdkNK/NtbRA9FUMBUo7b1tMIeVW2QwW78KlW2njM45kNM gu8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=u+gZsrAi; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88774-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88774-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v7-20020a17090a458700b0029a48def500si5976506pjg.144.2024.03.01.09.32.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:32:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88774-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=u+gZsrAi; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88774-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88774-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 568FFB268C4 for ; Fri, 1 Mar 2024 16:56:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AF4770CD6; Fri, 1 Mar 2024 16:47:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="u+gZsrAi" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DE1E525B; Fri, 1 Mar 2024 16:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311667; cv=none; b=qZV2PLyepSo2l/IXcP3YU0D10vQ2H3uUxHqHZZOYcaVqLJTr+hglogR8LfKW7FdtoaEwsE3dBuXOTD4qJntYImXylZ61Q/vxbCMa9WaN58ekDLWJMTQQ3XhxdlZQ+LPieUjwJhp42v46mcb7nxz+6tY+lQnIe/OiRCi6zfrVTlM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311667; c=relaxed/simple; bh=jWkyeprtDcmm372p45VVEktoZD14WIqZ/duBacZeYHA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yjii2mMMq1O/x8a6/j89dmYkpTDoapapxlGH9YjAdFOGRi6eGiDmUerDJJMOQ/CDifkYtDh+4a1zm0VbyCGgTvTPgX44L7MLRDLVeWUzf02Hy84e/LVnWNxz9KIMaQuMjmWGHYem70uWUbljFrNq9P6ykfHVmzEyAVnW+VaZzOE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=u+gZsrAi; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 592ED284257; Fri, 1 Mar 2024 17:47:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1709311657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Te2cu5IWLMOf63F8UHnTyXgS+llf7Gs1S1hHLvmrD0=; b=u+gZsrAi825CQAUwZHOkvhxmPIMUYV1PLMZB8UWvl5aNmeUWXIIMwIhvOz90fBCisr5XT4 NI1Zzo9WZbH/rTzufCRISk5re7+c0Ob5zhFSKWoEshDz4hhBrDUPWgBIz+PWeCgQ02baEa wm21ioHf9R+HL65tCj9kNTqwTjSyqpo= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 39C844587C6; Fri, 1 Mar 2024 17:47:37 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, karelb@gimli.ms.mff.cuni.cz Subject: [RESEND PATCH v5 4/5] dt-bindings: input/touchscreen: imagis: add compatible for IST3032C Date: Fri, 1 Mar 2024 17:41:03 +0100 Message-ID: <20240301164659.13240-5-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> References: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792345996939570484 X-GMAIL-MSGID: 1792345996939570484 From: Karel Balej IST3032C is a touchscreen IC which seems mostly compatible with IST3038C except that it reports a different chip ID value. Acked-by: Rob Herring Signed-off-by: Karel Balej --- Notes: v5: - Add Rob's trailer. v4: - Reword commit description to mention how this IC differs from the already supported. .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml index b5372c4eae56..2af71cbcc97d 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: + - imagis,ist3032c - imagis,ist3038b - imagis,ist3038c From patchwork Fri Mar 1 16:41:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 208949 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp12198dyc; Fri, 1 Mar 2024 09:01:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVrvOLoKWqJGiT7Plr908Mii62AaMVQjUNzevTFOiIZvSlbSYRsvD9fC9/c5Piv0pR0+8k16vKkjUYhV093F4wvcu/ELA== X-Google-Smtp-Source: AGHT+IG+sd8iCzSsmaiHl6bqUNs8xfId+rWd6SbfltYkThAJFG7jSNgylLivcM4++U/POWVkKbAY X-Received: by 2002:a05:6a00:14c1:b0:6e4:8921:65b2 with SMTP id w1-20020a056a0014c100b006e4892165b2mr2487593pfu.13.1709312475248; Fri, 01 Mar 2024 09:01:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709312475; cv=pass; d=google.com; s=arc-20160816; b=tcJ1tOxyxgUDwPDRGhQ3SGGVcvZdayTWSXy/4FI0IgdA7HSUQ79irSiNlJYGU7Ymiz kLnyQj4tWAZhe7hdoh3o2L7wVTEFgh1yL3Zi8utxr2gPCvuiCuyqpmHfjBhBSrAexfyh Y6tr0X/DZVKhv31Id+DIbBBa2z/8q8QItZTTl5YIZ9+GbyW7KOqlsjkeErIzC8CMOu4E Y09tcbGUtYykVecf/7hyyRS9DW5+RM9LCDZxNuBR4Rs5aiCTBbSKYFMORGMMfEWoAAl3 HSYAOCNGYyRhhgncv3dgYyeM9UX4RvqT7lYbw9EU7G0QIT5GxyvxqvVGY5jM2ykt4CZK S82g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=O7DmL1iFyPuL+YAdM6p9eG7fp01uB00uvAhrDZTooCM=; fh=3dN3s9rK30FPLMWv6b8wsC55ZALaDhhrbsSyCcljd7Q=; b=HN60yq1y0P42dKnfh6h7NwOdTUGII4XP4RXF6IMKr5BZPntThGTjzEaHGLvyC7pq2e N2KO9P6jXs2Azhp/BozI7B/NYvSA9bUXF0eyBheim03cgl3IcANk9MT+PwXkzGFlghCI 6pyWxMitWdyBHvJWtX1s0FJ7Z91ijDhcx5Pgg2haJOAlv4F2Z4Hy9X8ynPSnj2vQ5lUD sch+/rGTGUYWggP4YSAIx1JwyBsRfJ+Es2GmBmvPsYe9UotA+Qe5T+QQWU/fQ0nH60cc kOEV30RMI8u02ELpJj13Lz9teLKuVqCQlZ3ODZv28/1KuXmHRCwf04IdTXT85U+0XA0T WKNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b="i4f7gS//"; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88775-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88775-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k129-20020a636f87000000b005d8b8c6f94csi3916772pgc.565.2024.03.01.09.01.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:01:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88775-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b="i4f7gS//"; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-88775-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88775-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CD9A1289B4A for ; Fri, 1 Mar 2024 16:56:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63210762D0; Fri, 1 Mar 2024 16:47:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="i4f7gS//" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C90111947E; Fri, 1 Mar 2024 16:47:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311669; cv=none; b=e0YK5ISZKFaV4fmjcx39suf7fPdyrVs4xt1W9cPXxUAi7TP9MjE7hX5OtVVKK0LxTcc54J+gsBv0KtFvXlf0ylvePHyn++844j/0TqK6Jvy0S38G1JRat3fWtbhLlq4305FyS70wdwBwUpzIQZ8n57C3gSacu8TbX4Ro1M7K75k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311669; c=relaxed/simple; bh=TwO38cA3UyCr2W+EpuHHLQjPXPcd10Pe64Cu4R4UPC0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pwSa8p/m9dkTnbqnYijT/Ak1bt2eeqAw46qZR0wZb+WsAWTTj1xgmY+dj1RaPutVmxPp9w0fnyUWXG0i/L0tFXg1VQJxZ00f9C/qfrGGQLWibJe9OyrrCy4gOx/SEisrGU3F7i3dMQKks0fzfW4TRnQxENCWqTB7tUPMJ842M2U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=i4f7gS//; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 8239C284258; Fri, 1 Mar 2024 17:47:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1709311658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O7DmL1iFyPuL+YAdM6p9eG7fp01uB00uvAhrDZTooCM=; b=i4f7gS//gRybv9G91n4rfHD3U3QiMVHe+6kQ6HKg543tZlwYFWSeirBz1b8NB7+jZNC3fu 0cgiuBMh8OKMRcDzFqXxgij0z4/gESuUIQX74rEZ3UGjt2StU43OCyqvDc06G+bNm8lhZX cOgXDxbXnoUy23vLudtQ1KKBxuNJIiE= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 4CF374587C6; Fri, 1 Mar 2024 17:47:38 +0100 (CET) From: Karel Balej To: Markuss Broks , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, karelb@gimli.ms.mff.cuni.cz Subject: [RESEND PATCH v5 5/5] input/touchscreen: imagis: add support for IST3032C Date: Fri, 1 Mar 2024 17:41:04 +0100 Message-ID: <20240301164659.13240-6-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> References: <20240301164659.13240-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792344007039380075 X-GMAIL-MSGID: 1792344038261846977 From: Karel Balej IST3032C is a touchscreen chip used for instance in the samsung,coreprimevelte smartphone, with which this was tested. Add the chip specific information to the driver. Reviewed-by: Markuss Broks Signed-off-by: Karel Balej --- Notes: v4: * Change the WHOAMI definition position to preserve alphanumerical order of the definitions. * Add Markuss' Reviewed-by trailer. drivers/input/touchscreen/imagis.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index 9af8a6332ae6..e1fafa561ee3 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -11,6 +11,8 @@ #include #include +#define IST3032C_WHOAMI 0x32c + #define IST3038B_REG_STATUS 0x20 #define IST3038B_REG_CHIPID 0x30 #define IST3038B_WHOAMI 0x30380b @@ -363,6 +365,13 @@ static int imagis_resume(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); +static const struct imagis_properties imagis_3032c_data = { + .interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE, + .touch_coord_cmd = IST3038C_REG_TOUCH_COORD, + .whoami_cmd = IST3038C_REG_CHIPID, + .whoami_val = IST3032C_WHOAMI, +}; + static const struct imagis_properties imagis_3038b_data = { .interrupt_msg_cmd = IST3038B_REG_STATUS, .touch_coord_cmd = IST3038B_REG_STATUS, @@ -380,6 +389,7 @@ static const struct imagis_properties imagis_3038c_data = { #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { + { .compatible = "imagis,ist3032c", .data = &imagis_3032c_data }, { .compatible = "imagis,ist3038b", .data = &imagis_3038b_data }, { .compatible = "imagis,ist3038c", .data = &imagis_3038c_data }, { },