From patchwork Fri Feb 9 16:34:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 198999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp984654dyd; Fri, 9 Feb 2024 08:53:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjrOMD8Txnb/ikFTXEz3TcHoLk+d3anwHgwA+y7LvbYQ5/7jNmqMRU7PvyfCp3YxBArj0s X-Received: by 2002:a17:906:2dc6:b0:a38:42f4:dfb6 with SMTP id h6-20020a1709062dc600b00a3842f4dfb6mr1641802eji.63.1707497616448; Fri, 09 Feb 2024 08:53:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707497616; cv=pass; d=google.com; s=arc-20160816; b=rOY0uQSIgMKPEuCD0uA0pU2hyI/8yB1gBWEKpksEN9Qua9nUGzxvWSbqP57qNCmr+0 M7KFTS31CQIELj6q64tL0JCug5XywOGTYxZuTbJFh0nDAwCx45BS07RhL+EnqWhkTHiH ydnCqrpe/IBDKtIGBnGKCXWVT0szL+S4YjwIxfa9msn/3KoCZpHM9NfCeXIyeHT+HxAl KFXrQ/o2nuMtnGBxtBFHTZEcmjRPKlC6xXTWl0AlUsLvmnb+HiNUYaFCE79F4rhckoEh 50/jOekcDsBhHZqvW5Ni2uupo//C6F3UOFL1cuKs1I071QomrhWgwnun+04kvwTgs7az ek/w== 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=4HCW9YBPmcsH6XFypSoaa73HChH/KfPfLJleih85h4c=; fh=iO+yBHTbbrNinTANHZEjtlRvKbVKGTDsHhaLW+trFUo=; b=Jxv27Xxq3H4muNmSMW5et7tQE9zve1a1dvlhVolruBOsBXkaIwSC7j3nORhkDQt8Bf f+d0dDujS7IlXmMY5vNaBnywm96vY/inYadJy18FvXffm3GNbcEAcWAwAkWkAlmyeKnf Hm29rwDFhiFNwg7tcs3tFxDq+9RKZ2el8vO4eZjxTEDykozJeO9s7v4UD31rlGvDJlWE uyY2E2H0xvjnQjO+nR39/l22mit1BB/yI4TeFyplsn05f4bjdOJqlv8W9e32n0U6q1vW VwLtgAUaAhKJLNivLM+cRU9a5pGcwRe+HAxetaZ8HAaa5QOKKugeTVkhGRJ79tR4xwPe 31SA==; 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=mXVJVC3D; 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-59666-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59666-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=2; AJvYcCWLBI7tr0WrGgDMcVXmJEAPix7YtcJBHkNm0PH1G2oOJwtmuMzqzzn/dhu+AOz+xN0Lzt+DoL3EzN9pBRuxvfRicsAaeQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id he18-20020a1709073d9200b00a3be92a1a49si896639ejc.780.2024.02.09.08.53.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:53:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59666-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=mXVJVC3D; 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-59666-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59666-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0D85A1F20597 for ; Fri, 9 Feb 2024 16:53:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE0A812AACC; Fri, 9 Feb 2024 16:49:06 +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="mXVJVC3D" 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 E30E21292D4; Fri, 9 Feb 2024 16:49:00 +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=1707497343; cv=none; b=JyuS1hYPeC8Pq69fLmfCvXV6vbcSQW9zij1UZalpNUgkxf+flSA4fsU4n9dqq5lO2r4H7ZiDoGv/rLa1vbDhR5aK0nVckScUgx/YP+fZm8LowP2pxf3FGmi+ZuuRCU84gwZa0pIphF2TEKp3tuu2oflpiEj2ymawtMhzKQJdQME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707497343; c=relaxed/simple; bh=lbgvZZ+jq9gybgJnb0ibUvNKN58JqyZYhdnzv9MmZtg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kzRM2Vff+HfxZjaHzsFrtaaZ+oRT8bsdMo+fq31pPCCgtib7CzG75Ye+c9qGsM8mAQ/SQzfv8X2nwugQrEJEVP6gBc4JWsGKUINJNgEDRK+NC8bDruxs4ucWCZoY6ebOGMLIe/uxKMyyeyTXA3TIdGAGhi12J+ZqI1JtA0I0so8= 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=mXVJVC3D; 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 2D74A283DEE; Fri, 9 Feb 2024 17:42:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1707496959; 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=4HCW9YBPmcsH6XFypSoaa73HChH/KfPfLJleih85h4c=; b=mXVJVC3D3MZJMFOaXCQimtNCr6oDV5TFvwksY4NeSbvY01OGsTFYYAA3N8yPRQiJ8EWjZc dTayvsyd3fSaYsNQL3SZX61oworC0dcHLiZAkokD6aa8uxQm9ofssHsDU8wPtP2iu7Syqz A0ky6jmayRxw2+FUbGZMPFO8iUZksa0= 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 0846E4590CD; Fri, 9 Feb 2024 17:42:39 +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 Subject: [PATCH v5 1/5] input/touchscreen: imagis: Correct the maximum touch area value Date: Fri, 9 Feb 2024 17:34:18 +0100 Message-ID: <20240209164217.9008-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209164217.9008-1-karelb@gimli.ms.mff.cuni.cz> References: <20240209164217.9008-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: 1790441020973711993 X-GMAIL-MSGID: 1790441020973711993 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 Feb 9 16:34:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 199029 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp998538dyd; Fri, 9 Feb 2024 09:12:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUnEnv8pw7+UgDrdawAfAClLAMj5Fwm83mKqID7z/0abXc8NvXjsqNUpq3ON5Gre81hANrNWWE3zehEpH3M4oOFeGPWHA== X-Google-Smtp-Source: AGHT+IGLTUOPodcXldfOGlez22ck9cuXMRTxVMKb0glWEaRS7HI0i7qv72ey5F0x9gwj5Ykvvmn+ X-Received: by 2002:a05:6e02:1a69:b0:363:ca48:ab48 with SMTP id w9-20020a056e021a6900b00363ca48ab48mr3684489ilv.19.1707498760164; Fri, 09 Feb 2024 09:12:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707498760; cv=pass; d=google.com; s=arc-20160816; b=tof3Muu24wIc/zsq7IQZk/mz/M5pzjZrbQeS6g5caRH4m74MqeiZ4CeyGO5DDFDYfB EQdl2SOAtFewC1FvfqHUs7GAUrSnclzTCs456aybMcNRg6NaQQlTy7B09pdR+kwbazgj O6smXJE/rxJ8Nh8xg4QNA6YtQvCVtIGsyh72foIW2Ymxy+eK+xwo6EP1nT66832Ufe4r KgBuzaEzjvPMm6qdxnfy9AeldKC/2E0QyqIOkXxueCqXK9jsNHx3T3NqLMxOE1BwUifY nYDYpI4N/Lg/rBMTCGJtyAq5VTvA+rFabRsOfei+c8JE+177Bpa9Rc2W5odf+ONmb1FY +98A== 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=/dID/rk5TxJzyZNl6L5pM/cORYDEDnsW7lNaq9RdHVg=; fh=WWe9Kh4al1hULSmax0D4aQZQB2cYhdAqTlFEyeDoBpc=; b=sabWLVMEM0PGKyrRd+61hVlhBwWf0jtMfknQPRMHDKJwjtbbGpNUA3R7uP7U2XAjpy JmZcqED6XuE9PH826K2194oQafM8AKCIGNO9VmT3JmCmMLxgWnNpIM0B8XOimb05bxIT dWx/fQ4BoWW9QyHH0GkBAUg1rZ9JwNJUlORMdslP/vNbe7wvNvU/WvKQCI5rk1uTYWQV hjRXaxfuvUiUlR36IG4M8sPdq5XTwcYul6BjEOKTeNn30ql+xLR/wsstLwd9uwjIfwEU gYB/us1Q6wtxMVFa81uVitIrPkGJZSMrn3zhyCFLIczxEbZ/6Tpi8HlUQLmGs+ZjGVyu eBuQ==; 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=EaqgnBpC; 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-59668-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59668-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=2; AJvYcCXqLa6W2mJwHCMWo+FPHAt8VNUMuqXaBxUunoiJR5kAHRzbK8/21Cq+o+mIq4PKHXK7VpSumYgBIb2YM0kTNvezvbQuGQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cl8-20020a056a02098800b005ced6c45233si2062126pgb.712.2024.02.09.09.12.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 09:12:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59668-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=EaqgnBpC; 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-59668-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59668-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 3761BB215B3 for ; Fri, 9 Feb 2024 16:53:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20EF712AAEC; Fri, 9 Feb 2024 16:49:07 +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="EaqgnBpC" 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 E30851292D3; Fri, 9 Feb 2024 16:49:00 +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=1707497344; cv=none; b=a8NsM786HwBpfmfUujODnkpKb9FDFukkc/ApRlKjySVV7pwR+fZtb4unlIHtW4CmKLVZTL/U36ybU/2vvf5pXJP9qgzPfw8x1+lC52VIVb6/ObWZMDAsRWgXRg1qFbui0Q7JJXqPiQhZbIfn/aiQoskutTCg8HjifmShARnVyOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707497344; c=relaxed/simple; bh=v1KSwid17+YZwnEM/2QMXL0rKb4tz5sf2ADmZFvSaR0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P0xL5DohDwqIbaRjvyNOJQc4B0JFr7BXZwkZvniREQSwQIsFxqPDhMa3cSf/k1jP6ksFFOFB5XynrymipSbl4gOV9juD9MYMJXy8BQRP+1Gx3OsFVJfP4GR6wXlMlCNYyFaQ6wVf7mZsasqP7v/xnTijCZmCdoZfnwC7gzcLElk= 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=EaqgnBpC; 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 3AF09283DF0; Fri, 9 Feb 2024 17:42:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1707496960; 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=/dID/rk5TxJzyZNl6L5pM/cORYDEDnsW7lNaq9RdHVg=; b=EaqgnBpCI8NHPSF50WGRpw9QKD70/s3PPPDSCaAQ8zLSDGsUxpzlCWEqI+mlY4PmoVJ8O5 GGqc8SiYGriG87KjQrV/6TEWPiGYU6Qjqcs5PdayrBXGvetFdvxssGZcaK/Y8ik52TG5A1 xtW0qzo1nNQnlZ0K7EWVa/7sMmOrtCQ= 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 1982F4590CD; Fri, 9 Feb 2024 17:42:40 +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 Subject: [PATCH v5 2/5] dt-bindings: input/touchscreen: Add compatible for IST3038B Date: Fri, 9 Feb 2024 17:34:19 +0100 Message-ID: <20240209164217.9008-3-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209164217.9008-1-karelb@gimli.ms.mff.cuni.cz> References: <20240209164217.9008-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: 1790442219451448577 X-GMAIL-MSGID: 1790442219451448577 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 Feb 9 16:34:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 199013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp989423dyd; Fri, 9 Feb 2024 09:01:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKMo7RVUGFsVtkdroBkPH6bpgnWB387G7lLbgXi23f7zOeGIq+xUAiaejZLMwDq6MKPtlP X-Received: by 2002:a05:6808:3989:b0:3bf:dfa9:bcca with SMTP id gq9-20020a056808398900b003bfdfa9bccamr2996669oib.1.1707498101179; Fri, 09 Feb 2024 09:01:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707498101; cv=pass; d=google.com; s=arc-20160816; b=YLqxTOkOP6FucBVtdVLoHCmVboIBQrDeWG8vJOR+MNV/yUBCS53EDgX9GPxfGyaX+j b6ootgcFI8t0dRfxHOKm0qgfCGRJHbizZNtuqAOhujuIErYpkca4gOiwEA0gGqDZUPa3 nhtDgXneOO6v1MYLSLZSHVm6EMvEhmYueTefB1OwsqY2kAHQMOFGfsfRe/mwSOFiqKwB wkPo2VnxnEoQT1+P+maQPT+bNuNNHrK+8teFg5jPxLZq06q0RHDrAxc/t0OjKTAc84Gc RpxW9XC5v41YGSJ9ewWnxJ4n74EGmMEcMP3oJI5OM+OMTATBkngzlvSQWUY1qp1kwbOk +EQQ== 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=r8Fl1BS1ZRv2Q4mLx2dPAnLNVhhtO3Udm/uijuW0OKE=; fh=NN9Y7mkruHrA0W7jkT1ySEiQ9KT/IbKnkb/83JRdyUo=; b=x1Te8B6yjMs8WZeaMh6Mp0xpOYa33cAfJ92DHeTEGmcDfgtlOUE8fE7wVSTiHzZ//w hnSC3yz1AOYJro/1aOkqK0K2DhZyrQbmOuqqlkfM48uLTdNEcbAwX2bYCAc4Jr9h5LMv o6Qp3/fj4XmVz7IEIANj1Vz+U8MD3KCU0usJoDzKi2miSeSn++bUBc4cWm3smOREdSY9 jhXoCmUS11AibKoCpq2oTnvxaIuakjalR9iwHtZh0nUe4wTPQbAURZLXvF159Ac+tbAU yKtpZQGMx1PDLr37H3zqQfkwyC9uzhfq4RSllBEP03Qbh5GHFP71BtW+8GHRDUIeoQL1 5wLQ==; 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=QpRo1vXn; 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-59669-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59669-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=2; AJvYcCVfq9hKdehk1u9O5qFbYJJ99o7mZW4+Tt/VgH2KYc2bIqPYQiNC2h/+j2Uh3s4KQxu9b7Cbg5seXhk41qtAkjS8wKuZPw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bf35-20020a056808192300b003bfe1f548f2si715819oib.59.2024.02.09.09.01.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 09:01:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59669-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=QpRo1vXn; 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-59669-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59669-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 B24BB281EE3 for ; Fri, 9 Feb 2024 16:53:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B7CE12A164; Fri, 9 Feb 2024 16:49:08 +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="QpRo1vXn" 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 6A0877F485; Fri, 9 Feb 2024 16:49:01 +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=1707497344; cv=none; b=SFHetB6wsPBv9hgVShCeiX/S9pVwzfQsVkrWDaBPHATb+zjyHjWbCccmvwT3cg3yxM/YMr0GnsJ581WHfJzgqx8fRe9fSIPzN7uC5+ys6QDruuIFaH1vJwphkYe6C9IH89xFWnrtXTeEnqqNiHyYjJGasmwiIQWoRYPW3q4IuR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707497344; c=relaxed/simple; bh=yvnRCMqZFZdIsvGy7aZk2DqJQpjiCQS9e9ZHAr+AJjY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N4+sCvAMhqwmQrF2ixtBsyvuu8Qa8M5ayeSgTx8XgkN8+ttRg3hh6/ihPMm+vAkrnbU8F6sdN4O7X1B8iKV9EBDO/+ZjH4bOVwy6huFBHpMNL6H/hKVhFswnId8/k/RhjEyOCiXFPs4r4nlioO4CTQi9up79L6U25tF0hBaYslA= 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=QpRo1vXn; 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 72A07283DF2; Fri, 9 Feb 2024 17:42:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1707496961; 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=r8Fl1BS1ZRv2Q4mLx2dPAnLNVhhtO3Udm/uijuW0OKE=; b=QpRo1vXnVHDH3RfXPF18y1uQR/jP5/pnQaUpS63lIkaLlkAcKdTzlx48IwIR1EuKCGlmWj elPjqx8lpV3EZcdipC+q62j/xbetZ93j0Jt8Q4OSoT/udabJb1tj+ZmxNlUEtHzgzSQkB8 iCzrY/opyKSrWNzZ9txxizS0qbpcRtY= 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 37B794590CD; Fri, 9 Feb 2024 17:42:41 +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 Subject: [PATCH v5 3/5] input/touchscreen: imagis: Add support for Imagis IST3038B Date: Fri, 9 Feb 2024 17:34:20 +0100 Message-ID: <20240209164217.9008-4-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209164217.9008-1-karelb@gimli.ms.mff.cuni.cz> References: <20240209164217.9008-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: 1790441528841569429 X-GMAIL-MSGID: 1790441528841569429 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 Feb 9 16:34:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 199010 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp987126dyd; Fri, 9 Feb 2024 08:58:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhdzXC4R5PWaTklZL6569x54wt29MuiheMGR2WGvtQcblcb3XR7o0RrbjYCv7v+2fmlwzG X-Received: by 2002:a17:90a:f598:b0:296:bf36:fc22 with SMTP id ct24-20020a17090af59800b00296bf36fc22mr2168117pjb.22.1707497921111; Fri, 09 Feb 2024 08:58:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707497921; cv=pass; d=google.com; s=arc-20160816; b=XE6JHR7ZI/VgCH0oBfyMbTP5btdBjZEpe/4ZDy+m5U4Bf6u16Sis7U8gph7mcCpY63 RLoGcZ6Qq4SnSdKo6TXqH1dIlNVsR8PBOMa31rIEvS2knL2r4/cIp3l4T1tZ0XxgLA76 /dNEnAsy2f/ipnkj46fO/LBHJQ7erSW66YY2lMXKOY110QCxfPNRcanV3GHcmEgoq0l7 DpsH3DVbg/8k2qFlu8rW2d357Z4GhTqkCaxOLdNoIhMGZJ9UBcAQu0jLPNncN/r6iRE1 YJ5nB9eup2rrlZXkay0LajPaoRhQ1xpYyPEQRRR/6DtyRPR0UGwvpFPTrDBjCyGCUDQO K7nA== 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=9+X8NQUi2jiCyiGcDvFXoE4L/61FfsMj7jWccnE5jeM=; fh=G5BmnWr1X7DzhnrT0S2xO8ip+5x8msEkultCQbBVEZ8=; b=nKI4u0+3x76CiWCdWzO4bAhK0O8ixVGmfrNosfi7eANYVRqJiBDae7ITduOmSfjiAt 2lPIT0hiQyQxeRTxJTbUjX7C3JKjvrNE29KgWw3pGwfwLXQytKDpn7TW6llBEshwVgC3 8IxV65A9phHt9Sl+roxDT0e2aTOxkFfEXcj7hq5rBcz4vK0U+wuEQxmGEEN2r9dmmulr mfjJP/vAwwCRx0xJNEAjGIj7NskBYuRRddq05f/h1bm5OWHLbYLsT9vRIw6KO9Bti6y6 VAaL/qcmNfGgcnKTC9+MF3+GXqGMWF8cE9IESXEp6Xh2F4l511WKay3WfWV8F4RAS+gZ ZkNQ==; 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=WXGoVKBr; 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-59667-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59667-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=2; AJvYcCUqcBBSpWqdcKsxX7NiGcIz/GevC/crMZE5FkHiRhMAC0+hQFZbpf2kdnZnbraPYziyFCfHaVOj8KssEFVJPOFAFY5F6A== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l5-20020a17090a850500b0029609463310si1862325pjn.65.2024.02.09.08.58.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:58:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59667-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=WXGoVKBr; 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-59667-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59667-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 6005428E872 for ; Fri, 9 Feb 2024 16:53:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20EAD12AAEB; Fri, 9 Feb 2024 16:49:07 +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="WXGoVKBr" 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 E312D1292D5; Fri, 9 Feb 2024 16:49:00 +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=1707497344; cv=none; b=p9MVV6teCZWPjhdx3qSBN1wziZYQensEyVPOJMte1/j7QbT4TINUMVhb3/WnH0LsXx2OeKsESju8Gak+V0hDSQfiE1Dj4KHP/FD+R5a1FhRMAu6qFUgwycqi+ugI8f7muv/9+ZPzPDEbdqWkcTlUKyPDFmHXuZvyyCpnTvciE+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707497344; c=relaxed/simple; bh=HEaAf1XGgy9fl8nIJh5MfpAqgcXCyXG9JZBAOI6E+tg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VCFhNqkDeB9ZNRmWMT7oWywZ5nuuCR8F0styPLE4+nKQbx3pX996y2I1zjyd1qrGrAjDFLHryUpYssimj0JxYY7FJ6E2QJ6Qe4xFI1dAOX2K4ub9zswXUTsbjMK1DokwYPX4X5xI5hxzJW5tBvkBZcYuRkhylZ0/C9l3FsngY54= 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=WXGoVKBr; 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 80920283DEC; Fri, 9 Feb 2024 17:42:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1707496962; 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=9+X8NQUi2jiCyiGcDvFXoE4L/61FfsMj7jWccnE5jeM=; b=WXGoVKBrEbISJonBA15RC99h9Az85ZlwXxxtaMeoqa+PjLqDQ9n71bv1mXfjuOV5FxlMOr ocyfbxbVjOuMJuPedkKGNP+IThtxGZ5LaxMJs4E5e9yiGBYV1NHLs0glGICpV38CGOUhU+ 17MFTVi3vZRMqtr6/Ly0S9ng3MOCILI= 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 5D5214590CD; Fri, 9 Feb 2024 17:42:42 +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 Subject: [PATCH v5 4/5] dt-bindings: input/touchscreen: imagis: add compatible for IST3032C Date: Fri, 9 Feb 2024 17:34:21 +0100 Message-ID: <20240209164217.9008-5-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209164217.9008-1-karelb@gimli.ms.mff.cuni.cz> References: <20240209164217.9008-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: 1790441340055076712 X-GMAIL-MSGID: 1790441340055076712 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 Feb 9 16:34:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 199002 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp985377dyd; Fri, 9 Feb 2024 08:55:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGikyszzwP30jq7iTIAJjkyA67oEQ6e9lPQ+oI8AsDN8boo+U7NxFLw4OhdN54UMN8Bf8oV X-Received: by 2002:a05:6a21:1394:b0:19e:9a75:7834 with SMTP id oa20-20020a056a21139400b0019e9a757834mr1922910pzb.33.1707497706360; Fri, 09 Feb 2024 08:55:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707497706; cv=pass; d=google.com; s=arc-20160816; b=uxawHEGvGGfMMRNFG9tBgnrmfTTz4wvihuln9oCupAAtYebF/d9Cz8NJ9Ul8X6HbSX mssN8G+7mKOTaX2Nm1lKN38Q1SsbnOMm78Q0YaCAsg/TB48u7Jzd8NObSSBDdTbFohwS L0UcKSKBdj+RAE1hyXuh2a1xCd7tqKttzPv2fdLKsL8zjuvUXjY/x8/PV6fP0AjK5zVF 4k1tJBJLUJs1P1+9Evu0vcNl7pxgkqTb2gOz1gb+IFicobLXVsCp0Zzkb2fIZ6pdVzqA hD8PZDVxIxQ//TrXonhE3nC4D+gUahYtzebKEIw+sdh7Dva3W3ldwt74x/fu6KzQbnJ8 FEiQ== 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=6nlJhh70C00O21KEiXe3q4atmWqeoTlQakU5+W4UbXg=; fh=yTl8xEYvFxwf3njinCNUh1vyXsoUm1SL9TPdAlRXg1s=; b=ip6BPec1OaOTXQKfDKAgK5NU/rf4MZtQJ1dAR/bQ3E213y9RjcCTAIURwbqhq5S+ic oyiic0qcR073MW3GsVs5BUU+HSOwsmCQyKsJplXR8ESeVLCNLNDo8gXFTtJ4oEqHr6dB FXPSsAFMyvH7DfTHGiqMaeqP0mz7hdP/fvOv8mE7o5LZ+lrDwZNFoqOBWft9MW7zHDAY Z8IVlIlfiZuvjqxGqCiAAkIuseoW1QchP/nMhMrYhHwL1QcrQExyCMgI+IBKJ2blgkK+ detx64zrLfJxZ4zhZGoHWicCeIrHDXqQ0w3c7/I5AHmgS/ZOOUW8eQMwpW6TZ7HRSi8E /f6w==; 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=A+JBkxeB; 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-59657-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59657-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=2; AJvYcCWf12Fnl9HyXVXsXvw5c2tlB0+Kr2klfw/19+eQUymR2/YWJ31Cqp0kikx7nyHZmgSo+j1f35LNhU5BrpARxnOTEmphcg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e20-20020a637454000000b005dc4a006ed9si1971764pgn.742.2024.02.09.08.55.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:55:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59657-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=A+JBkxeB; 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-59657-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59657-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 790C828864F for ; Fri, 9 Feb 2024 16:49:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 515BA80BFD; Fri, 9 Feb 2024 16:42:54 +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="A+JBkxeB" 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 57A487EF00; Fri, 9 Feb 2024 16:42:48 +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=1707496971; cv=none; b=XagDcvWoGNJhE/CkNbbNG/XDAgsyrWR/GEqaogajiO0KCfWURDdAHQoiTvzRfRRRAHLae/ZW+Xby1o8Fcevgz8yeacN0SouGA1orXsfHaC1f3JQRGYDzaw3501r/dPNPY6urdufr0L+J9Mg+cEfLAZBkeRFrSlTvKq1dBwOWlHE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496971; c=relaxed/simple; bh=rotx75+PNUiB1nrwnnm5GeKEE0xMiosHZsyowbNUlYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q8eBQf8I2TdIkiA1xWDCxR4N+jnJY+5iu3xwvm3OGflyEE25MY7mGRTvVBp26WZDq4QK+59wgPkWFR8EK2SnulmMPjZxi2hdDxzfQfWfGuKnvUtAvqy7TQllrXH/EhOUyja0vbSH8zbp9zZLr3TDh+3A4y/Nan85qrSBn9koWEU= 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=A+JBkxeB; 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 98A9C283DF4; Fri, 9 Feb 2024 17:42:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1707496963; 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=6nlJhh70C00O21KEiXe3q4atmWqeoTlQakU5+W4UbXg=; b=A+JBkxeBgUwttgk2w+b31sYBP88JB7GIFEQWPymV52MaPThr6jKUwR0/LSmKk8b7CUfqqv KJA+MeVQceEoiYOPKf49e4MSoWIFLIMskxadXT5i52KT6vOsH5qvBvISvRSRyaoc69nqPV T1Jg7X6IZkmn82rCjXJYgO0aCOCFBlE= 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 76F694590CD; Fri, 9 Feb 2024 17:42:43 +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 Subject: [PATCH v5 5/5] input/touchscreen: imagis: add support for IST3032C Date: Fri, 9 Feb 2024 17:34:22 +0100 Message-ID: <20240209164217.9008-6-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209164217.9008-1-karelb@gimli.ms.mff.cuni.cz> References: <20240209164217.9008-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: 1790441042396002553 X-GMAIL-MSGID: 1790441114991987119 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 }, { },