Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2055291rdh; Tue, 26 Sep 2023 10:55:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxhLTmWXdLieEHF6UmagwC++SVaDzSABVnaoQOas6k9wYKSrvTcnLmhvi//oCTshrO/uP/ X-Received: by 2002:a25:ade3:0:b0:d7b:9ac8:f439 with SMTP id d35-20020a25ade3000000b00d7b9ac8f439mr9416842ybe.40.1695750929066; Tue, 26 Sep 2023 10:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695750929; cv=none; d=google.com; s=arc-20160816; b=yottg8KtYxNPSmoMw7nN+8+aenNpKRxoXMSVGOjuzeYjr0m6n/cuawylsSyHrJlYY2 vIVzzpwoHqrNxMoudr7aQ2FGivjHOMW5lap8DtKJRS1j0by4orc8dwJIpODjkDGNz4Qt nEZzkymqTHid8oszSvjdSS0uRL4MOy45phYbmzgOgs/3X6+jLv77nnOi3t9eiKd+AQYF bw0tmUuy0dCfF0hD4AXcYojJSbyqEP2g2DwPjJzOxOmVc/V7yHYLtPmhqv780VUfi81X 6/reYvvlSVxpxHNLqhmqMMXkl46/5PgSlYHp7YGvM5Dc+loLUnVQedaBMZf5TO4fVKml eOdQ== 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; bh=Uens6zugklvAs56X7zk+Pg1uGB5d7E+7Jxt2tjkZWMI=; fh=OGCFgURKq7tmBP8a8/5fQAca2RWw5J8BmDiLAGVQNhE=; b=q9TPDjCylZ7PWai9Gu1PII30sdzbe8BR96xs6tyuFDwSutnCBHdAkZxXCapNb6E5kc n/JiJmVo7B0/gSEoghQYMkroreaFQxJ+gpu4s9GfA7n7/AOq/XmA3cSBjP9uyrmRZ1jV kS0pspmPwbujZ0VtXpl4bCwmbYd9trdKDcpGZHCyAAABb4dWRiCf4+mVyKyyo+jaJlEp N1czE87FvHQPbU30BxiyZxILWcGBt4QE8DUKVcUyvjXl0AFdzn0TzF2qH05TrPPtiI9k 4TwTUnc8OePFNZmFgKnnv233jL6lMYXq3h8K0u3kKyfCCBTSINTqjEPUSIuNqhP6VV7z 3wbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t23-20020a656097000000b0053074c54c3fsi2317466pgu.868.2023.09.26.10.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 10:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3717283294D7; Tue, 26 Sep 2023 10:52:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235208AbjIZRwQ (ORCPT + 99 others); Tue, 26 Sep 2023 13:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235093AbjIZRwO (ORCPT ); Tue, 26 Sep 2023 13:52:14 -0400 Received: from smtp1.ms.mff.cuni.cz (smtp1.ms.mff.cuni.cz [IPv6:2001:718:1e03:801::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68AB610A; Tue, 26 Sep 2023 10:52:06 -0700 (PDT) Received: from localhost (internet5.mraknet.com [185.200.108.250]) (authenticated) by smtp1.ms.mff.cuni.cz (8.16.1/8.16.1) with ESMTPS id 38QHZxsT083224 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 26 Sep 2023 19:36:00 +0200 (CEST) (envelope-from balejk@matfyz.cz) From: Karel Balej To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Markuss Broks , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Duje=20Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht Cc: Karel Balej Subject: [PATCH 2/2] input: Imagis: add support for the IST3032C touchscreen Date: Tue, 26 Sep 2023 19:35:24 +0200 Message-ID: <20230926173531.18715-3-balejk@matfyz.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230926173531.18715-1-balejk@matfyz.cz> References: <20230926173531.18715-1-balejk@matfyz.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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]); Tue, 26 Sep 2023 10:52:38 -0700 (PDT) The downstream driver sets the regulator voltage to 3.1 V. Without this, the touchscreen generates random touches even after it is no longer being touched. It is unknown whether the same problem appears with other chips of the IST30**C series. Co-developed-by: Duje Mihanović Signed-off-by: Duje Mihanović Signed-off-by: Karel Balej --- .../bindings/input/touchscreen/imagis,ist30xxc.yaml | 1 + drivers/input/touchscreen/imagis.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist30xxc.yaml b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist30xxc.yaml index 09bf3a6acc5e..d6f75bbfaec3 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/imagis,ist30xxc.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/imagis,ist30xxc.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: + - imagis,ist3032c - imagis,ist3038c reg: diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index 4456f1b4d527..df9a8fbf2c5f 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -30,6 +30,7 @@ #define IST30XXC_FINGER_COUNT_SHIFT 12 #define IST30XXC_FINGER_STATUS_MASK GENMASK(9, 0) +#define IST3032C_WHOAMI 0x32c #define IST3038C_WHOAMI 0x38c struct imagis_ts { @@ -295,6 +296,16 @@ static int imagis_probe(struct i2c_client *i2c) return -EINVAL; } + if (chip_id == IST3032C_WHOAMI) { + /* + * if the regulator voltage is not set like this, the touchscreen + * generates random touches without user interaction + */ + error = regulator_set_voltage(ts->supplies[0].consumer, 3100000, 3100000); + if (error) + dev_warn(dev, "failed to set regulator voltage\n"); + } + error = devm_request_threaded_irq(dev, i2c->irq, NULL, imagis_interrupt, IRQF_ONESHOT | IRQF_NO_AUTOEN, @@ -348,6 +359,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { + { .compatible = "imagis,ist3032c", .data = (void *)IST3032C_WHOAMI, }, { .compatible = "imagis,ist3038c", .data = (void *)IST3038C_WHOAMI, }, { }, }; @@ -355,6 +367,7 @@ MODULE_DEVICE_TABLE(of, imagis_of_match); #endif static const struct i2c_device_id imagis_ts_i2c_id[] = { + { "ist3032c", IST3032C_WHOAMI, }, { "ist3038c", IST3038C_WHOAMI, }, { }, }; -- 2.42.0