From patchwork Tue Oct 3 13:34:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 147889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2090571vqb; Tue, 3 Oct 2023 06:36:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0wMDRNbqzUda+9bk/y02SYb0A8EbkDmCU96QQGhoTkjU5WYAjtRDUWA5sy34fbwJ5azDS X-Received: by 2002:a05:6808:f07:b0:3ae:132a:e7ae with SMTP id m7-20020a0568080f0700b003ae132ae7aemr17729360oiw.27.1696340190802; Tue, 03 Oct 2023 06:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696340190; cv=none; d=google.com; s=arc-20160816; b=sXsWyVJA8tMG4DrCm/s3ahqG9esn+G4KC39sEUgVRi9Icpc1CvNHwB2GX7ZwPrSWP7 pUL6wqtLZz7CxF9DHE0hmZKVYX4CYKruqFyocYNFfiyQpcaFSEe4uu7j+i3On+zQ8uXd B+A+leJuAJnrxcMTBneA3v7cV0V4qntl4Nne4qZGhKe1YUsMbpcVD+nM2rJ8aiaPEO10 PfdjI2I/SyQiT9b0+NavtsHs2wUyCh2G4YYgddFkRXH2yDVJ4ghsXaWTTqGFmcNsy8r/ z/BYF9LbKrdXJUBhpLFpXxgpTnbYBOghRvcDIJdCOaIm1hjwvkSSB3FOJz3xPev7jakk sPxg== 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=sSWXFK5fznh9k1wuhf10rBvApinHNhYCMSoTw3z7xE8=; fh=mNs/Vqipuht+rh/gFdXbaGnNnLCmd8X88uvE0OBXPUs=; b=uyrl87xms3IK5rbPuYos3Pzt+smgPayy05pmfp3wb5NyMWE42dxwaZvGcwK5dnYoE1 PBAbYmdUJSn7Y1UDDMDHDzCBe+bt//UKxmMhnUH9JuRgMzKGeNcbiqsyNAmSosAZQvQK JaIOd+ic4FMbpDFf5BAbxEb53K3P7jPs1c9v+SAU1muLySAKINzGtXyHZ/TWFJeqaM5T oV5fkZCljE0QtBQcPSvaxxLR14AnCEWEoneTu/NxIxnIhh/UO6J65Rh5ettix3YFTpSr MiZ7aPKHXLP6i1YhK/0a1uGWVZqBmWMP4MG51W5NxAE4D4gntRNzmB2uIpMcYsKzAwuY 0NXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=NtlRk73e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f20-20020a637554000000b005859e0286a0si1438691pgn.241.2023.10.03.06.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:36:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=NtlRk73e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 4E96980E7131; Tue, 3 Oct 2023 06:36:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232010AbjJCNgQ (ORCPT + 17 others); Tue, 3 Oct 2023 09:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231852AbjJCNgO (ORCPT ); Tue, 3 Oct 2023 09:36:14 -0400 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32EB2A6; Tue, 3 Oct 2023 06:36:09 -0700 (PDT) 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 BABFE284EB5; Tue, 3 Oct 2023 15:36:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1696340168; 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=sSWXFK5fznh9k1wuhf10rBvApinHNhYCMSoTw3z7xE8=; b=NtlRk73eviFn4Dabz7c0+xb9RPqQSxQzR0V09dD0gYB/Eg2l2AruAFr/kWJS5xdU1Tla+Q dFDWfyktBnKpl9FuiBSaJIBI8tAhgAJLZQpUUDDvsjeU0hYy7IQ33lEu3GWHw2ui8qXWk0 I4n/SJet8r4JVv5nE8TUE5Us2MWAQWQ= Received: from localhost (koleje-wifi-0029.koleje.cuni.cz [78.128.191.29]) (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 69792441AC5; Tue, 3 Oct 2023 15:36:08 +0200 (CEST) From: karelb@gimli.ms.mff.cuni.cz 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, ~postmarketos/upstreaming@lists.sr.ht Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , Karel Balej , Karel Balej Subject: [PATCH v2 1/5] input/touchscreen: imagis: Correct the maximum touch area value Date: Tue, 3 Oct 2023 15:34:15 +0200 Message-ID: <20231003133440.4696-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> References: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:36:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778741612318907964 X-GMAIL-MSGID: 1778741612318907964 From: Karel Balej 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 Tue Oct 3 13:34:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 147890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2090647vqb; Tue, 3 Oct 2023 06:36:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnE26WIHePWwfY2j/aE3JQy1fgSXqfBGKpgCwN+KGHyW9Nqit/ijWzx2+Qkj3IaIJKzAOq X-Received: by 2002:a05:6808:3d4:b0:3a3:6cb2:d5bf with SMTP id o20-20020a05680803d400b003a36cb2d5bfmr14272737oie.4.1696340197393; Tue, 03 Oct 2023 06:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696340197; cv=none; d=google.com; s=arc-20160816; b=EALUB3J09qyhvF3nV/jpYZ9a3YRIgD+54WnyVVFfWjzqoHS3oSOFqeyKnJBr7x9pWc ii6lzWVKnsBkZCE9tMol0A8lgVnW0D5M83j1+aZRMFCCr19lnFEciJYv3tf+tGQkfUBE SHoIRREcx5Yrqm7CSdRMV0c2DDzZ5FrZNNS2Ph31yg8KqHPVnbr+QlX7DXD1EonOmcFa 7AtKwSmtqDpJmSktBEOtwN7ffTkKVEFFAa+IRqBzqarTCgHKC3YwUE2V5vF61wc1yvW0 9Svtk5OnRyitNnv6Bgc8eZLiSuQXiiKY2iZ02xnhSJcUzFfn1uRPh2353loqB1wFJUA0 8wmg== 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=0xejrogLlnsyj1VlkBVT1SkIE4nImaJi/ldVVHRyYf4=; fh=mNs/Vqipuht+rh/gFdXbaGnNnLCmd8X88uvE0OBXPUs=; b=RzuP5bDaWsFezQ3Et91rjlfmie9IplxaTDRxvotkTrHt7mWFwo6iNKewabW4fOAJ2a f+Z5NAiFt3Hoatyj56NHABiW/j40mdvueKeS/CyyPFG6TOsQF6bV1KMRoU44SQH6uzs7 mPu4L5tgim9rIefn44bFKsGQ2PB1R0veDZ8SvgD1Y8MrCA+iSSZSXr+3Qv6gJ0S3AcPm FWqisgNPIOgYtBt0Uh1TpV0t8lVDyNfzuLCvLk9/fxKpijW4d9WBq8kF5zdcecKpFR+f xKiC/tJD+vUJiXTPa7PAMd13Gl4+W+EH9GNBAZ2Z1y8rvDmn30703lKU7MvjdxcRcnuq HfqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=SAOwdmRI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z10-20020a17090a7b8a00b00252d84b7af0si1365687pjc.181.2023.10.03.06.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:36:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=SAOwdmRI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id BF75E80E06A6; Tue, 3 Oct 2023 06:36:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232230AbjJCNgY (ORCPT + 17 others); Tue, 3 Oct 2023 09:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232226AbjJCNgV (ORCPT ); Tue, 3 Oct 2023 09:36:21 -0400 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFB3C9; Tue, 3 Oct 2023 06:36:17 -0700 (PDT) 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 1B8C9284ECB; Tue, 3 Oct 2023 15:36:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1696340176; 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=0xejrogLlnsyj1VlkBVT1SkIE4nImaJi/ldVVHRyYf4=; b=SAOwdmRIl90OARnAnro4CgqmhIoRe6zITVVLoUzrBwok6IFEaeZCiAE7AgM0VXbxFP0KbE 6c0XuyNa+OkA+/j+heqznLfjhhbm1a1jabaSKOuHWTM11t17fJUf1R98Vh16gIrFiqZdhP bdK8johAudnoF84QQRZRSNz0bsYnomQ= Received: from localhost (koleje-wifi-0029.koleje.cuni.cz [78.128.191.29]) (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 8FA75441AC5; Tue, 3 Oct 2023 15:36:15 +0200 (CEST) From: karelb@gimli.ms.mff.cuni.cz 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, ~postmarketos/upstreaming@lists.sr.ht Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , Karel Balej , Karel Balej Subject: [PATCH v2 2/5] dt-bindings: input/touchscreen: Add compatible for IST3038B Date: Tue, 3 Oct 2023 15:34:16 +0200 Message-ID: <20231003133440.4696-3-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> References: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:36:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778741618597263038 X-GMAIL-MSGID: 1778741618597263038 From: Karel Balej 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 --- .../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 Tue Oct 3 13:34:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 147891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2090730vqb; Tue, 3 Oct 2023 06:36:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcZ+ZV6KUy2g/6DIQLhq+VEzW9wdplwW8/ubovsJYGJOgRotF1mH6lowSSRMZdR7tTN0Z+ X-Received: by 2002:a17:902:7008:b0:1bd:bbc3:c87b with SMTP id y8-20020a170902700800b001bdbbc3c87bmr11978494plk.41.1696340205700; Tue, 03 Oct 2023 06:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696340205; cv=none; d=google.com; s=arc-20160816; b=tugbH1hR5zu32q80ulcasLQ20ki+OYEuFQj2s7vDvajkvw7sY3MW39AT1zWUi2Ui3L 4ySz7Kgt/rb05w/tTH+M0F4M7CbfT34k5cYgYGJNysEbX6lZowBE9jnZmeD5q6tkD4XT yiXcWeMDW6XBxz/Tra/fKbYQiwpx/6MVYynSqqyRbflvsofxZ44x7TnY1I0DoeDjRyzG bwgAoTLKWTtGjWkcCcSGVqWlAD4LSKjYMUiFRU0gZbSqSOdhawC12R6dZ0BFZ/A+yimi 1DhmD6sH5dIecm9jJyJbjAAGc9a8WVoNAtcfCqPOEzxOSWakQ2g/ZNh2lWZbAtF5hCa1 MtIw== 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=QLPcV5PZFX4JyYX2e9WNb3g+2i/3w5rTIHJCjhFDffc=; fh=mNs/Vqipuht+rh/gFdXbaGnNnLCmd8X88uvE0OBXPUs=; b=0gwwzYzjRG0Ct1tbo0FyWmS9x8Hn8IK5cS9dhZ7it2jsaZVlQA2bp7T8Qt8PcljfH+ frEUYP3Qo9R8Yv5Ug7sQU4Aipik6yf62sXmVTKw2/RlApbPec7zbnkgaV/aXmgZrgdoe WQtNiJRJy5lqBJQ8Fm4ro8c4ZayhjbpW0Z+eRCkTInzQDezKMf/e88gV9OYn7spDzYXo edgzUbQuqhCq0qN7QoHs4XAgIFtqE8TV89lo3eB5EtjAoei9lKZpiCto1svHGZE6VuO1 s43NZQZyXGB8/E4arD0fbW1oGiWk1SOjdI9/pavonqCNfjIyqGVpvtSElQXBXubT6P7O AeIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=k3I4biYv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q13-20020a170902a3cd00b001c60de17b50si1347340plb.182.2023.10.03.06.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=k3I4biYv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id D53C380E06A6; Tue, 3 Oct 2023 06:36:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232140AbjJCNgj (ORCPT + 17 others); Tue, 3 Oct 2023 09:36:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237689AbjJCNgf (ORCPT ); Tue, 3 Oct 2023 09:36:35 -0400 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A358A9; Tue, 3 Oct 2023 06:36:32 -0700 (PDT) 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 CEFD1284EB5; Tue, 3 Oct 2023 15:36:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1696340190; 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=QLPcV5PZFX4JyYX2e9WNb3g+2i/3w5rTIHJCjhFDffc=; b=k3I4biYv9ZfZrzsghDMWT+XZgLf57IkvOe4GpgDs1aZL4ywqg9AdnarQWee7XU4i2yOhBu 4LeeARg3cK8Bm+oEdBotn0UYSTfVursRQ6DFgaBxkXkdGhuuSbnL8KDLvncJs0MOP4yfMl 2t9eXLJq8J0emJoVtIqioTE7SNL1uGs= Received: from localhost (koleje-wifi-0029.koleje.cuni.cz [78.128.191.29]) (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 4DF21441AC5; Tue, 3 Oct 2023 15:36:30 +0200 (CEST) From: karelb@gimli.ms.mff.cuni.cz 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, ~postmarketos/upstreaming@lists.sr.ht Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , Karel Balej , Karel Balej Subject: [PATCH v2 3/5] input/touchscreen: imagis: Add support for Imagis IST3038B Date: Tue, 3 Oct 2023 15:34:17 +0200 Message-ID: <20231003133440.4696-4-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> References: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:36:44 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778741627823056133 X-GMAIL-MSGID: 1778741627823056133 From: Karel Balej 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 Tue Oct 3 13:34:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 147892 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2090862vqb; Tue, 3 Oct 2023 06:36:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFp/YXQp/pjZmEf36J3Gz/r8P3Hpp2MDeZVgtMFDhrf/aftM/B8dOnDr3nyXNNynSTlRndE X-Received: by 2002:a05:6870:b695:b0:1dd:651a:73a3 with SMTP id cy21-20020a056870b69500b001dd651a73a3mr16239592oab.53.1696340218139; Tue, 03 Oct 2023 06:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696340218; cv=none; d=google.com; s=arc-20160816; b=wSx9uRo8JEXkj62UciC+FOLNIsHViqYDZ+Va+dIE2K/ZZdHkAzNHdCtYwYIOpXDenE mQVLi7VQ1O+6IOBJy3ugwdeyqUdi/YSVcbUhuK2Ff3zOu2CoqLXNBihmKnsCBFSZXn4N GcyLYbfMKPlPogKO1MUdu9JGgcXmw3UAKBvd7Qavqf8FR6GJycBEAvDtk+2oe8m28wQ0 dHUNECY/PfUOl+Virm7WNe+l9dShxlFVEFGVe7TPJ0xNda55F+0pCf9w2+V04bjiQPC5 ffgXztV+UWQ3M95k3uFG7HaEXHsw6SiStgntxwmNokAbwBLLL9robNhT8T8K3pPdL/rc FqXQ== 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=broKVa+juBbW34y8eQgur3LUcnJmsuFbRBQr02rIzvk=; fh=mNs/Vqipuht+rh/gFdXbaGnNnLCmd8X88uvE0OBXPUs=; b=jI+hJflkM7Cb1b7oKtAZ1fUvEbMpfghLnzmcCzzOXUibtqwPQlA+WIQBeXmaEQoQQD 17/UtY5MwBK3UrzturcSodDdF6H3AvQkFKcTkGutp5ut3j+MVEBC8wO+M9bcrznODq8J GR19lns5io4uGa5B2MYs/PPCF3dz4Mpou4YFYaVxxVhUqzWKA5R6mG9HMtXa9wxhJnIF l7VkLt1XC6xrgX5MKJh81tYLO5bBN57mt6dCU/h+BE81AFIjx5KGD80DqEhN3WZW58I2 l8K3V1RvfHC3GiKTDQPF2fXVZP4FAXli6Q1sy6rfAWBW1/efHRwI6DDpKG9qiGlZpH0j lU+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=jFqts3Vs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id k66-20020a636f45000000b0056c2f508898si1403152pgc.725.2023.10.03.06.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:36:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=jFqts3Vs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 4C7E98191445; Tue, 3 Oct 2023 06:36:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231852AbjJCNgt (ORCPT + 17 others); Tue, 3 Oct 2023 09:36:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232390AbjJCNgr (ORCPT ); Tue, 3 Oct 2023 09:36:47 -0400 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767D2E5; Tue, 3 Oct 2023 06:36:43 -0700 (PDT) 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 1C441284EB5; Tue, 3 Oct 2023 15:36:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1696340202; 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=broKVa+juBbW34y8eQgur3LUcnJmsuFbRBQr02rIzvk=; b=jFqts3VssuXMwipR90dbrh+n1MVPucm6nYIP4Sl4799i4sHCdldDBuzhb7+jeaoJYQ6hLU EEF/QdBS6LIS98K5phjCzxDvI31S9zWZtSFOjiv/rmrofbiFuvCKz2ZOsgW5a+/dhLVXfh KZUXGr33RZLj0qlIG8sWOPcVUt3UBBQ= Received: from localhost (koleje-wifi-0029.koleje.cuni.cz [78.128.191.29]) (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 A5DCD441AC5; Tue, 3 Oct 2023 15:36:41 +0200 (CEST) From: karelb@gimli.ms.mff.cuni.cz 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, ~postmarketos/upstreaming@lists.sr.ht Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , Karel Balej , Karel Balej Subject: [PATCH v2 4/5] dt-bindings: input/touchscreen: imagis: add compatible for IST3032C Date: Tue, 3 Oct 2023 15:34:18 +0200 Message-ID: <20231003133440.4696-5-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> References: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:36:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778741640630175192 X-GMAIL-MSGID: 1778741640630175192 From: Karel Balej 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 Tue Oct 3 13:34:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 147893 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2090940vqb; Tue, 3 Oct 2023 06:37:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHM+l7qe6FYtiOtQkEqrEXevfVXnzoGZUNIBzTSvYOwaeBTExr1dgjzekGHUFRvh8kuKQdn X-Received: by 2002:a17:903:120e:b0:1c3:92de:1b23 with SMTP id l14-20020a170903120e00b001c392de1b23mr17416914plh.59.1696340224067; Tue, 03 Oct 2023 06:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696340224; cv=none; d=google.com; s=arc-20160816; b=gsN8iaCY4UQnbSvrSdJiFvMXPKd8Kt7UtbOkxTQ2DVE4xb99PEnKzb2AfTqMrKTlXO ng/b1BGhANMIP7/cT+VQbv4/x21BE3rOt68q3f5pfKoRFUW9F4vjzsaPfFCibr5DxzWV 7g+LKoUIxKv03e9q+psVqwNroqgiavyHr/0/5N+6iqs9TGXjfIgTIuPN/of7SibI8IqJ Lsbf3oYNoVDKkEoVk+s6jtVxDD3MfOEwQgpo0GenEJMfJOE8bJYT1vN6INBv/m/r01Io T78pH0Mysq0sHf8g4Sw6rIFqEFJkYvBhBkmhxwoKlwVHCP+MEuRrR2Qvdm0BMOlZNvMM HwJw== 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=thWfmTP97NwgtX66q57euOOe3X/YCYqAS2eCf0ja7RU=; fh=mNs/Vqipuht+rh/gFdXbaGnNnLCmd8X88uvE0OBXPUs=; b=M0xgV8Jn81mjFlxgyngHxcTSXv1+qX6wPUpEn7N0CHo0hc6Va/sxXM167QQxarO6/G 15sxVnPvTMcA6SbHVZjTnAm+hyXpFA/MfHUv6GXZrUK6IKSLKbyc4kQZgIZ6N1FxNWUr dj1F2+dLaYKcS1VktmTI6Vb4PvFcBDoYVwCDYOAzheZCoDbwg45gg5jTnqRp6QmMrkXl j0p18l/AYb3Jql6+ipPgsZknBDw0NKAsu2/fF/LJWmR4iilAmzCR0AnzlQRULhJW/td+ +UdHMtoLgsWhxYLY8fEc2RfkS+jzHQQvCrqcAKN9MF3nIgdA/vaTr2ONTjSHrDl006U4 s1EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=vIBVuWI1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j12-20020a170903024c00b001c7615a8de5si1540582plh.20.2023.10.03.06.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:37:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=vIBVuWI1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 52B158191448; Tue, 3 Oct 2023 06:37:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232390AbjJCNg6 (ORCPT + 17 others); Tue, 3 Oct 2023 09:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232137AbjJCNg4 (ORCPT ); Tue, 3 Oct 2023 09:36:56 -0400 Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0821BEA; Tue, 3 Oct 2023 06:36:48 -0700 (PDT) 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 0EDDC284EB5; Tue, 3 Oct 2023 15:36:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1696340207; 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=thWfmTP97NwgtX66q57euOOe3X/YCYqAS2eCf0ja7RU=; b=vIBVuWI1quTQ9rMlFiQaa6noo//RXYf7+9ZT6LHLF7MdH/P6zq592OAkyWsibvRii3rDrL VCvCTyTpitq7TcgVyS0lqqSTOEIbMBF3BU6kNoK1CsgNNVPMCHc+fh5jKcIH9vlpDWGpyk D7J2ea1Fhaue5PJMxZ/+SFl3VSZX4dM= Received: from localhost (koleje-wifi-0029.koleje.cuni.cz [78.128.191.29]) (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 B879F441AC5; Tue, 3 Oct 2023 15:36:46 +0200 (CEST) From: karelb@gimli.ms.mff.cuni.cz 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, ~postmarketos/upstreaming@lists.sr.ht Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , Karel Balej , Karel Balej Subject: [PATCH v2 5/5] input/touchscreen: imagis: add support for IST3032C Date: Tue, 3 Oct 2023 15:34:19 +0200 Message-ID: <20231003133440.4696-6-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> References: <20231003133440.4696-1-karelb@gimli.ms.mff.cuni.cz> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:37:03 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778741611576963314 X-GMAIL-MSGID: 1778741646943002764 From: Karel Balej 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 --- 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 }, { },