From nobody Fri Dec 19 02:58:39 2025 Received: from mail-106109.protonmail.ch (mail-106109.protonmail.ch [79.135.106.109]) (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 31A502749CD for ; Tue, 22 Apr 2025 15:22:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.109 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745335332; cv=none; b=cimeWnk4UIho62JuXhwDuIVet2RJkCnCHABPesZ+X5zTS6ljKBmyhe3Es+CiX2gIiVypooRCMrYFpK5hjUESL3Br4qWqF4DeywZ/jsTe/8z33KpT0CUNnsOz333tta2EpXGb8sjkIZP8BmdRiTz5alw5V8U4ZE4MK5c1XsHmojQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745335332; c=relaxed/simple; bh=ENVcO6fJ07Q9ue66u/qiSIcncXd28QyJZIW3G5Jd6VU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O6rnRJWiRG0LYICM7l9ISwKqrQLg1ps9mvfE2Yrt1tmFQFet2YPGA8flO48IX8Tp4XZ/fyxRC6PoRfXx9fHLFloqx0cWR4sGxePiRFcMkx1frsfrSyCUqpCcQncwvUqH2wPxTIJ80p+aWl5IeabT/qBvefdzEV95EYFzQ6vYGIY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=cYDHm37A; arc=none smtp.client-ip=79.135.106.109 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="cYDHm37A" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1745334914; x=1745594114; bh=bp+Gp0KHAB3JE9AJDw/mdtN3MLyCWZjeKfW4QBlVxh8=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=cYDHm37AXU7ay9QSebFJ0KhfHG0FZhAvvmCB3L11RHlqh9KEzmaYwAG582QbYrbSu G7z7wUecBnQp2h+WgEveSgvSUQ2OfJLNhMhewsMR5HslNClDzSu4tpL1cu3AfAARtG /qfjOJNB071fAIEL8K2e+HB/hfcx8liEioNLO8H5TyxxpvlsWJz5o6FaSh/dyJCh8K nrt/lZmBkBNzMVMnu6gckI7uiATFTJJafMh3hNnBOVrVe0jaxyW6Ox13+9UG6Y31C6 NRc6iFm8Uz6zuZXrr+rEZcjOuNYCda1txSHfqN8VWnAfXrqYWOsrOCukptnus5HRs7 J9F8qzryBOaQQ== From: Esben Haabendal Date: Tue, 22 Apr 2025 17:15:02 +0200 Subject: [PATCH 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250422-goodix-no-reset-pull-up-v1-1-3983bb65a1bf@geanix.com> References: <20250422-goodix-no-reset-pull-up-v1-0-3983bb65a1bf@geanix.com> In-Reply-To: <20250422-goodix-no-reset-pull-up-v1-0-3983bb65a1bf@geanix.com> To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans de Goede Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Esben Haabendal X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1745334911; l=1026; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=ENVcO6fJ07Q9ue66u/qiSIcncXd28QyJZIW3G5Jd6VU=; b=FMIQ+pa/+Zxa3ZyfSAm0zfLEYEQTf6zqo0YFM1UXQt6Yf1bddxDeYCndGv6286smfaUMHxynI XC2Ac4jlqqZAWocPikGzEoVR+cmq/yziopysGMEbz+x4eS9CVpEFcD7 X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= This should be added for boards where there is no pull-up on the reset pin, as the driver will otherwise switch the reset signal to high-impedance to save power, which obviously not safe without pull-up. Signed-off-by: Esben Haabendal --- Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yam= l b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..7e5c4b98f2cb1ef61798252ea5c= 573068a46d4aa 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml @@ -45,6 +45,10 @@ properties: reset-gpios: maxItems: 1 =20 + no-reset-pull-up: + type: boolean + description: There is no pull-up on reset pin + AVDD28-supply: description: Analog power supply regulator on AVDD28 pin =20 --=20 2.49.0 From nobody Fri Dec 19 02:58:39 2025 Received: from mail-106109.protonmail.ch (mail-106109.protonmail.ch [79.135.106.109]) (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 427EEEEBB for ; Tue, 22 Apr 2025 15:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.109 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745334936; cv=none; b=s4rT1Egbl9PvWjK0FwERSqSeC/NH5zLv+DHHAsNRNhyo3RtUGtdE4BNMrBhgjBbUMiuQrl0ZQ4yOwr0Lf6Kpt6+5FqGQTpfIKP6g6sKdNqH8QVj2SkqG8qQwkubmN5X51Re1ZJHYeMsxWOIVC7EI+lS7Nneh2reMEjbNiEuu2p0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745334936; c=relaxed/simple; bh=XrDdZMiQCYZWtkyVR+1sBXNNGQPlKxsaHf0T2Hnlrwg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BO5nU+2f6f+6IVp24YmjsPv17wIxOaeCbnJRgnGqfQarW0hcl2hC9eM1rYCVAV97si8G09iRlXXlwpFDP0C8NW8fTCVtlazwPgR00raXkyJ52FA4wx4GpLX4x6Zd2dVcJWHP9BL0IvLNNKySAiC85j+NT2aK7j691h4TKt3xU8E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=EYZ3kgqU; arc=none smtp.client-ip=79.135.106.109 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="EYZ3kgqU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1745334916; x=1745594116; bh=qinWNI4zrP64TYceXuUBsDjhYtu4GSfZQrgajmm4aQw=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=EYZ3kgqUpN8wRIfAfRGNEicZc/qp/G9fVH11TKXb9eaUL0YAvTdSRMG949zvZL0Ka 6ihSJi11JveIIUzPHL9Al3v+zwFBwkcrKgf/EC6lxm6pzyl2i8oqAD6/6pUsQmwv83 N/I36hFak0XM9AMpVI4DpKI3OjslQEmTTLj2cFTmqXgHqriiJBTaF5qDSvGRmYg2tf 9W0V4JskVgHFMi2oxyDEZ59gRinqnG7dHCZwg2KbWy+pylale8d1lZmUnsQ/gb5dpy peUgnAYgY0elncEAyoguqlstkf8YKTwMGBy9mIB3UXz6Flw0FvcHJozp8drD53zPK/ HkCnqnDNiwqzg== X-Pm-Submission-Id: 4Zhm4z0y89z4wx9h From: Esben Haabendal Date: Tue, 22 Apr 2025 17:15:03 +0200 Subject: [PATCH 2/2] Input: goodix - Allow DT specification of missing reset pull-up Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250422-goodix-no-reset-pull-up-v1-2-3983bb65a1bf@geanix.com> References: <20250422-goodix-no-reset-pull-up-v1-0-3983bb65a1bf@geanix.com> In-Reply-To: <20250422-goodix-no-reset-pull-up-v1-0-3983bb65a1bf@geanix.com> To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans de Goede Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Esben Haabendal X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1745334911; l=1750; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=XrDdZMiQCYZWtkyVR+1sBXNNGQPlKxsaHf0T2Hnlrwg=; b=jRW+MrsUzdfwfOoQGvfpiB9UjYWL0lEg42ggfjTprYEFFJoNGZKSePA0VQOholEEcth9FEuNx XgRFhA0zOE/ALCVNY//VNmN+XoPjN1LEqZuJ/OnYIzHQUTeXExz8XVQ X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= In commit a2fd46cd3dbb ("Input: goodix - try not to touch the reset-pin on = x86/ACPI devices") a fix for problems on various x86/ACPI devices where external pull-up is missing were added. The same type of problem can exist on device-tree platforms, and the fix can be activated by adding the no-reset-pull-up device-tree property. Signed-off-by: Esben Haabendal Reviewed-by: Hans de Goede --- drivers/input/touchscreen/goodix.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen= /goodix.c index a3e8a51c91449533b4d5185746df6b98676053dd..3a55b0f8e5132a5e1fe77bd27de= 74e058a4afdaf 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -775,7 +775,8 @@ int goodix_reset_no_int_sync(struct goodix_ts_data *ts) * power. Only do this in the non ACPI case since some ACPI boards * don't have a pull-up, so there the reset pin must stay active-high. */ - if (ts->irq_pin_access_method =3D=3D IRQ_PIN_ACCESS_GPIO) { + if (ts->irq_pin_access_method =3D=3D IRQ_PIN_ACCESS_GPIO && + ts->gpiod_rst_flags =3D=3D GPIOD_IN) { error =3D gpiod_direction_input(ts->gpiod_rst); if (error) goto error; @@ -969,6 +970,13 @@ static int goodix_get_gpio_config(struct goodix_ts_dat= a *ts) */ ts->gpiod_rst_flags =3D GPIOD_IN; =20 + /* + * Devices that does not have pull-up on reset signal should not be + * changed to input + */ + if (device_property_read_bool(dev, "no-reset-pull-up")) + ts->gpiod_rst_flags =3D GPIOD_ASIS; + ts->avdd28 =3D devm_regulator_get(dev, "AVDD28"); if (IS_ERR(ts->avdd28)) return dev_err_probe(dev, PTR_ERR(ts->avdd28), "Failed to get AVDD28 reg= ulator\n"); --=20 2.49.0