From nobody Fri Dec 19 17:53:02 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