From patchwork Sat Dec 2 12:48:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 172842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1753994vqy; Sat, 2 Dec 2023 05:16:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IH39waX3VWVRlKp1A6cIVw2g6Y/Z0i6dmRq5ihlRHyKzS3Ks4Vj/UpQywdwHConpiT3LFWc X-Received: by 2002:a05:6a21:3a83:b0:18f:9c4:d344 with SMTP id zv3-20020a056a213a8300b0018f09c4d344mr1211447pzb.52.1701522983266; Sat, 02 Dec 2023 05:16:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701522983; cv=none; d=google.com; s=arc-20160816; b=awTH2bpY2HYEnd+iH/Q8BU/zKpOsG6tWgpIiuVwUL89zkxI92aA5Rk8rLZjihtP+ds iqO7rmoAdkRwxHKOgK85psx65/jafKPE8K0nu47gmPakRONqErx4Gkkor0Llpkt+30qB GPhYza2LmxUM28DSIe3QISXUcYvK2+2MX9Orp5IK4nWFLt5TAT5UKcin01NlOEM7noGR tu0RlZnFyO9xZOgGyINwVKc8rhFRyIC++92ryVkU2CjBjSU0tr7cPAgYblf37+DJi5Im XxerH+O6eVRfUCW5MU+7HwxGv0vTOedJ5Hqx9W1vwfCFLqL24q+49y2VD+ghwZkJhqSQ AC1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4HCW9YBPmcsH6XFypSoaa73HChH/KfPfLJleih85h4c=; fh=JqA0Xee0/CWumczA5TuyC+7WXtsf+tJMEa8SbRnVgwI=; b=PJa43+PZzWY6LXsP4sCjBSTtkuQUSHFbeVkligwTvkMWt8Yjpcr/u/pCRugAd8bbwp Ok6uDVsO9rZrrcjNKNBNFMQsfZLSo6Rd3cWOLFxCq9BRH9uyqrcR0cSkga2ch8fYlC2k toHHjLvG3TFLx7PmZOzgmQpU3ypBcpvxRh5JcHvO+orOzrAQW/IUCC6ZDJ/PeQeDZ0BB oTVPuvRV6FJ/20D82WHVxi0R1pdrX8DVp34oH9w+sizYw03G1lHJCduHzAeKB2Nihy/T /2tUI3I+kQV5+E/pjZAt7fT+iv5iS1F9vb85lv884zfHnRnTotpSuDrmNdMoqER/qCGK CcFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=GSJeOAXW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a13-20020a65604d000000b005c216b7d4easi5236878pgp.473.2023.12.02.05.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 05:16:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=GSJeOAXW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4DF518051AA6; Sat, 2 Dec 2023 05:10:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232813AbjLBNJk (ORCPT + 99 others); Sat, 2 Dec 2023 08:09:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232745AbjLBNJf (ORCPT ); Sat, 2 Dec 2023 08:09:35 -0500 X-Greylist: delayed 558 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 02 Dec 2023 05:09:39 PST Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C2F8184; Sat, 2 Dec 2023 05:09:39 -0800 (PST) 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 E3B3428BDE7; Sat, 2 Dec 2023 14:00:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1701522030; 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=GSJeOAXWxD/L8xB7OdZ0lM35R9oJLf4lHo6jFwneN3oEYIY+54+b5RZsP0PqtJx0cXWgZj 1aWH4Rt5PQwjjjLZ+gzBdWUgHanvc81ysx6hR73esQmNI2CQu4xzgNEMIS6B2wlvH9zTlO hMHK8ddPI6Ybu9U2JJIznf152V6FVHw= 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 (P-256) 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 C32BB4443E5; Sat, 2 Dec 2023 14:00:30 +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, Karel Balej Subject: [PATCH v3 1/5] input/touchscreen: imagis: Correct the maximum touch area value Date: Sat, 2 Dec 2023 13:48:32 +0100 Message-ID: <20231202125948.10345-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> References: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 02 Dec 2023 05:10:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784176163450082948 X-GMAIL-MSGID: 1784176163450082948 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 Sat Dec 2 12:48:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 172844 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1754906vqy; Sat, 2 Dec 2023 05:18:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9aEvSoP6dgRw6W9fkiRM/+vOMlLiWcg1cWqYxZrFJfiJGHYHRl51slW/EpOwDgOgJDTZ0 X-Received: by 2002:a05:6a20:12c6:b0:18c:726:920a with SMTP id v6-20020a056a2012c600b0018c0726920amr1469690pzg.26.1701523101197; Sat, 02 Dec 2023 05:18:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701523101; cv=none; d=google.com; s=arc-20160816; b=w2nh/TsamolGAGee8q5uuQP5i7Q57JUTYLG2aUn9DBxUJiblvGFMzex0dI0z+ms422 3BHYJgecPc8wP15O/Mvjza4MgisDc2tbiI3oFGgcCCjUPPA+1MA8S+jZpYW0ASFrsrFm 5ebpZRcsav1vkBHJ4kt9heLb5jz/o+mvTORHeho2ksLfrEC+9nPWEr9lbqswpMstjWJi 1XPSq1X3tzBSmGfOUVpY/6nZfDMpGXZAOmi1cVvknqOLsNfomhD4LfbgJKGFiCSGkCGW T/vhpT2qH2WQbxJmurtr2ciZEAAtf1eezkDppyRHR1AUnH/axJQ18uJQTEPg40poFyoj 9RAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AU4qbb6SFdiunbgMHDeonXdJnOEkLjt+I8oSX+xThLI=; fh=JqA0Xee0/CWumczA5TuyC+7WXtsf+tJMEa8SbRnVgwI=; b=GPL5Aa7BTuuqGasML+m+iaib2IYIzTwhOzK/yUyx4hAKPjEt0x+ZWGTRJ5ihpRMoGS Iixmm2p+/mAqkpVxXAypgg2ldKLspJaRH0zLsNiEdJoKyIBq37n5U4qefs7jraTswrt9 BUdGCjh04AiUPKcih0/fCurYUMPyVkhu308Sby5reSH3ZrHQbcGB800SXbXzTEQCTEj4 Qxp1WLm4pfUn6i2FFHrtjBz+ZIsIIsq8xzlesS39gei2aqJxRLgxV0FUF65v4KvzLmt9 FxxWLeq2eGPs7Hs4bkVhY6DyUZ9v7aSUGGMdb9VWyHf4wefwTZeSntoVZSFh0Bvi5As+ 2xWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=yWsKCIZS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k29-20020a63561d000000b005c6251da182si4925567pgb.226.2023.12.02.05.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 05:18:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=yWsKCIZS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D825680937B3; Sat, 2 Dec 2023 05:10:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232844AbjLBNJm (ORCPT + 99 others); Sat, 2 Dec 2023 08:09:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjLBNJf (ORCPT ); Sat, 2 Dec 2023 08:09:35 -0500 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4F3D188; Sat, 2 Dec 2023 05:09:39 -0800 (PST) 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 D418C28BDE9; Sat, 2 Dec 2023 14:00:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1701522034; 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=AU4qbb6SFdiunbgMHDeonXdJnOEkLjt+I8oSX+xThLI=; b=yWsKCIZSnA25XjwyVVm+kLs7v1G4h7lnQYarPdD5V7EagiEdfxHqzrW6MNj7cKJLpjuLgZ 8zSmJ6D294ILuKzKjvRgNG2osEZyD6Ys4JJ/8jyYJe1240rjXq2g6RXopBw1MIlbNg3paA z81rDkNeqivWtxl3BDzrIGDa+nYwE7M= 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 (P-256) 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 B07E544C9FF; Sat, 2 Dec 2023 14:00: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, Karel Balej Subject: [PATCH v3 2/5] dt-bindings: input/touchscreen: Add compatible for IST3038B Date: Sat, 2 Dec 2023 13:48:33 +0100 Message-ID: <20231202125948.10345-3-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> References: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 02 Dec 2023 05:10:14 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784176287319119380 X-GMAIL-MSGID: 1784176287319119380 From: Markuss Broks Imagis IST3038B is a variant (firmware?) of Imagis IST3038 IC, add the compatible for it to the IST3038C bindings. Signed-off-by: Markuss Broks Signed-off-by: Karel Balej Acked-by: Conor Dooley --- .../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 Sat Dec 2 12:48:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 172843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1754696vqy; Sat, 2 Dec 2023 05:17:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqcQRfjsbkSGB5ChrRnmiU3QDWqYlrlGA8+EX8CsQdkgvjxM7H96SI3WkQJeNgjQovdNp2 X-Received: by 2002:a17:90b:3b8f:b0:285:a17f:9da0 with SMTP id pc15-20020a17090b3b8f00b00285a17f9da0mr271287pjb.18.1701523072791; Sat, 02 Dec 2023 05:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701523072; cv=none; d=google.com; s=arc-20160816; b=nUas9p3UmY2mHE5C+niA5scQwvhgwApMCHD5OYt7G1pamjpqENQIPUutdYLaXszcfT B+aB0X31zheE4nh0twoPbaKnLfNj6dEh663tHRLwT9jh2S4S0N3/SVvpz/AD8sJi1gup Slsd2UvYLiYuvFJ0+WHXtNWnVowEW0yD8bhzsMn1I/QKz58EkRXFJS8/Yrkifkszqklw vRoSy5ylbGrncAi4KdKNqhkMGO6r5NsBrNq45FVexsL5CXipvG7sHgENdGaueW9GxMsM aqfpvk6BUWZ+8Luy9cQ0Rp/VsXOW72Qr5/cLBdl9Nxg/CNP2i0xwynARu9KBJ/t78CVP gxAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FI2ta7jn+qB7+yTr05l6kHo60dhjoRkfy4IOcQxfPyc=; fh=JqA0Xee0/CWumczA5TuyC+7WXtsf+tJMEa8SbRnVgwI=; b=pmRAfNRNLAgJzdF2CxuegzWYPLKqkaBBG83T0/WSGZb8f+xgPr0ME+v7AMrF0/OjdB cW5JSs9HHl/GWjQw+xWm4t76M3/bwzNV8/QKuIDaCHOTmxcGSesWO8mjPzh7YjksRwfK FYCXQfievn1MVzYxcXaJslCzSmDTHPeBA97IOieL5k4KenAHD2gJfdNiF3URosNzaHKc wP4pHy00pb9+7Dgys2XmaKUoRQmPiUT0tgoevV5lyqBD1tDPThIZ9dkMHK6gqMFVpcan 9WCpZBu0B5lGjzYKvZr5VF0UR33lawem8aA1VkNkUkmsTiw49Cl/7sIdsWfOsirOg2d/ VLKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=VpMthgQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id x19-20020a17090a531300b0027ffa51a805si174069pjh.38.2023.12.02.05.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 05:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=VpMthgQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 621058034655; Sat, 2 Dec 2023 05:10:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232911AbjLBNJp (ORCPT + 99 others); Sat, 2 Dec 2023 08:09:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232758AbjLBNJf (ORCPT ); Sat, 2 Dec 2023 08:09:35 -0500 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5161194; Sat, 2 Dec 2023 05:09:39 -0800 (PST) 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 2DE1428BDEB; Sat, 2 Dec 2023 14:00:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1701522038; 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=FI2ta7jn+qB7+yTr05l6kHo60dhjoRkfy4IOcQxfPyc=; b=VpMthgQj41SEE9/KBX2BwYUZGzWQvTRXfCN+kQWc2W2DcWdAJeB+kTwCyt26Icfy37183g 3J363KO6NMtxLsd5l2nDDJRHinrAD24+eznA+cZ69m9at38Kj/CR8/BEHGSeBV1evNs7Ks KGFhMzTpktx+PKPf+c11CxaaUYoVTXU= 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 (P-256) 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 0D98D4443E5; Sat, 2 Dec 2023 14:00: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, Karel Balej Subject: [PATCH v3 3/5] input/touchscreen: imagis: Add support for Imagis IST3038B Date: Sat, 2 Dec 2023 13:48:34 +0100 Message-ID: <20231202125948.10345-4-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> References: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sat, 02 Dec 2023 05:10:14 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784176257330402781 X-GMAIL-MSGID: 1784176257330402781 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 --- 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..84a02672ac47 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -13,7 +13,7 @@ #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 +31,21 @@ #define IST3038C_FINGER_COUNT_SHIFT 12 #define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0) +#define IST3038B_REG_STATUS 0x20 +#define IST3038B_REG_CHIPID 0x30 +#define IST3038B_WHOAMI 0x30380b + +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 Sat Dec 2 12:48:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 172840 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1750511vqy; Sat, 2 Dec 2023 05:09:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbrxaqYf1htzCJXZFLFJcUfktnhzijWaizCHwPcn54L+bCh9CEbtGq0teULUXs+kUqJBKf X-Received: by 2002:a05:6a21:980e:b0:18f:97c:5b97 with SMTP id ue14-20020a056a21980e00b0018f097c5b97mr179104pzb.101.1701522589877; Sat, 02 Dec 2023 05:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701522589; cv=none; d=google.com; s=arc-20160816; b=GfA/yxi/uPNhEhgbiGhySQ+zSgg7d/sz61LIxQ6/6/no8JivuUW/+nOdgh6dEi9GL5 CfS/RmH9H7q1BpsShPe2E8qYzxFiJTg6AQuazWp5I8AKcLpSpzGUgDExKOZrRHkZEjS8 d7vNJDTmnOH4DVCzITi8EJmxxkkUV4leaiuQC1YAX25dxAupaedI7WPRuiBGze6/Xw0F 0xHJRwgasWnNWGS2+0+yVfZluvd6YhX0xWcMYPhARNgztNBXq0MbHyUDSFQxTkVxWAso oPYXFue0zc2fpAm759h7ZYVyP9ZVaZERoaGazSX9V2c82XR2AkxbCXTuJGARFx1Q2Lpd SQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vmzqryh+LazjOJegW30q7NFiWAxaEkaUgk2/+cJ9SI0=; fh=JqA0Xee0/CWumczA5TuyC+7WXtsf+tJMEa8SbRnVgwI=; b=UnQuebECW81obfFri5xeDiDqAkj8ByTERKqe+AqGuWLYbzzAgOJ/2qd6wAtOiBRRzT kai5QNAmLcpkQwK7YIYnPCDOwrgmDqq9r8Qy0FTF2fjvOjTWRG66lLHse28M7p75bDd1 M8jpnbUGsMasHJGrblxjw6gQ8lGztZKRpgX+W4qriLcgDoPAcZl1XGuJwL07Nze8s6UK 9/Y/7bQRuR+DFQwu6dJURVqCspnq+ym5gu+IRHnG7LGWK5GzOXF0oZORsleRZG/Xnjuk kCBDwUDCJJs4qcXEy4OB80ZKtoxUHH7sEd8YsfdmlddE8DUAcjL0AusiDmDVWoYZPcos c7pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=qpfGNwmn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z15-20020a170903018f00b001cff3de9343si5024471plg.553.2023.12.02.05.09.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 05:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=qpfGNwmn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7C8B0806813E; Sat, 2 Dec 2023 05:09:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232774AbjLBNJg (ORCPT + 99 others); Sat, 2 Dec 2023 08:09:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbjLBNJf (ORCPT ); Sat, 2 Dec 2023 08:09:35 -0500 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C504518C; Sat, 2 Dec 2023 05:09:39 -0800 (PST) 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 2EC6B28BDED; Sat, 2 Dec 2023 14:00:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1701522042; 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=vmzqryh+LazjOJegW30q7NFiWAxaEkaUgk2/+cJ9SI0=; b=qpfGNwmnDr3SsYMIOsqBZv3x1GvBu0xrqYFE4bzF5YDILMDjCv48Mrp1lAdAJmwBnM0kbD VddLkf7MbxpPzjX/onBD1wTnvRfmfeIeqEfvjR2QTnfo+MySCr0aszxR9yPaCnIshpY6mu VU+xqGxdmpvzOIafN7IUJ8uMPnCLHAU= 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 (P-256) 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 0DA964443E5; Sat, 2 Dec 2023 14:00: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, Karel Balej Subject: [PATCH v3 4/5] dt-bindings: input/touchscreen: imagis: add compatible for IST3032C Date: Sat, 2 Dec 2023 13:48:35 +0100 Message-ID: <20231202125948.10345-5-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> References: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 02 Dec 2023 05:09:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784175751189482796 X-GMAIL-MSGID: 1784175751189482796 From: Karel Balej Document possible usage of the Imagis driver with the IST3032C touchscreen. Signed-off-by: Karel Balej --- .../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 Sat Dec 2 12:48:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 172841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1750537vqy; Sat, 2 Dec 2023 05:09:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqQm6wXpDrh5zP+CfVHLn1eexc9h6KHnOETcZpqvy0scZ1e6LdHZkU6nnoEmXXemf5A2fq X-Received: by 2002:a17:90a:f689:b0:286:6cc1:77ff with SMTP id cl9-20020a17090af68900b002866cc177ffmr893217pjb.66.1701522593904; Sat, 02 Dec 2023 05:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701522593; cv=none; d=google.com; s=arc-20160816; b=TiqeO2cxl2p+DHMliAdLBJs7osO+xkhjwZBLuBouoHr8x2A2wk+pBD9XxknDuQnvOC dGqOK71kYVjFyUZY/dP5Vnn6YSiiax+5mj+VsyNfGUJRVPyXQ8DHTZJHsYoE+KTTxYv5 ZTHmPS9U+7o8hGDS0hAMjhMnWBo17EmywOHAqIBbRoOeVCtDRhB8axL1gB1XhKOb3kCo n4lX8kG9X/wIUwtUx9RqVAqq8hxRrAYBi9Yet39nkjHpB1vidvMbACqFWjwwRNMeKYGB YuWpGA7MwdVo0Ibj3qgf9E2CnBhUU06sTXoj5LG2GwCKJNezAOk2yf3DRtcqlvdMEK// S1yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dlwa5psbH4GuBlFOgG5dQBJEh+/E3KdGiPUq4tEBZPw=; fh=JqA0Xee0/CWumczA5TuyC+7WXtsf+tJMEa8SbRnVgwI=; b=0ieILIHqmQ/cnVTd+E4TXrll5P40ReDKmxdicZMExpL9179wRxEx0/mNAuvOLH8kMI zdr5D1Np479InQFtsDaUSF2UPKg53fEYo8ei4kuo3DJ0x6Zz2zwKloXhsqqSrcniVxOt RxTvSd2q1RUG+S+1umQr7KGazLeeZ0TP4dTJiIrt7qgZZymcKRhoaQXbi22S7KBCEcsS PKyhAt6XSGWZxFeEB6bYwv4g6YUsRcyVMPQMRNhRdhjiDeo57SKKOtKvV7WzyGbYvCzz aS/mKwqDgsgcGBLcO59p2D66sVdtNrCt6tYlOWaxh5FZlez0vbo6u3PjFbXumB+S0hli x1yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=I8HEMqrC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id f16-20020a170902ce9000b001d082f25836si60348plg.333.2023.12.02.05.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 05:09:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=I8HEMqrC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5C24080702CC; Sat, 2 Dec 2023 05:09:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbjLBNJi (ORCPT + 99 others); Sat, 2 Dec 2023 08:09:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbjLBNJf (ORCPT ); Sat, 2 Dec 2023 08:09:35 -0500 X-Greylist: delayed 558 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 02 Dec 2023 05:09:39 PST Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C26311D; Sat, 2 Dec 2023 05:09:39 -0800 (PST) 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 01E0128BDEE; Sat, 2 Dec 2023 14:00:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1701522045; 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=dlwa5psbH4GuBlFOgG5dQBJEh+/E3KdGiPUq4tEBZPw=; b=I8HEMqrCNV63kBxXZ+OeFCG+1g7cW9Pf5/KgMCjocGqRX+DFupxcT+R7CZyrxfqVDOCUFz XmBbUa/UozgbVwJOMhx8kMwY0nH0gC+Nb7U7dYEXYlY4j7ENIWOHRyLQ3SghteYQicNVAR D/8JSwirogd25XzlX0T0Gq3ZQpe0ork= 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 (P-256) 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 D53FA4443E5; Sat, 2 Dec 2023 14:00:44 +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, Karel Balej Subject: [PATCH v3 5/5] input/touchscreen: imagis: add support for IST3032C Date: Sat, 2 Dec 2023 13:48:36 +0100 Message-ID: <20231202125948.10345-6-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> References: <20231202125948.10345-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 02 Dec 2023 05:09:51 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784175755612012245 X-GMAIL-MSGID: 1784175755612012245 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. Signed-off-by: Karel Balej Reviewed-by: Markuss Broks --- 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 84a02672ac47..41f28e6e9cb1 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -35,6 +35,8 @@ #define IST3038B_REG_CHIPID 0x30 #define IST3038B_WHOAMI 0x30380b +#define IST3032C_WHOAMI 0x32c + struct imagis_properties { unsigned int interrupt_msg_cmd; unsigned int touch_coord_cmd; @@ -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 }, { },