From: Hans de Goede <hdegoede@redhat.com>
To: Esben Haabendal <esben@geanix.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Input: goodix - Allow DT specification of missing reset pull-up
Date: Mon, 28 Apr 2025 10:33:14 +0200 [thread overview]
Message-ID: <e9bafdd2-d84a-49e3-a221-36088f3c753b@redhat.com> (raw)
In-Reply-To: <20250422-goodix-no-reset-pull-up-v1-2-3983bb65a1bf@geanix.com>
Hi,
On 22-Apr-25 17:15, Esben Haabendal wrote:
> 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 <esben@geanix.com>
Thank you for your patch.
> ---
> 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..3a55b0f8e5132a5e1fe77bd27de74e058a4afdaf 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 == IRQ_PIN_ACCESS_GPIO) {
> + if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_GPIO &&
> + ts->gpiod_rst_flags == GPIOD_IN) {
You can simplify the check to just:
if (ts->gpiod_rst_flags == GPIOD_IN) {
that will work for the IRQ_PIN_ACCESS_ACPI* access_methods too and
nicely lines up with the gpiod_direction_input() on the next line.
Please also update the comment above the check to reflect the new
situation.
With this fixed, this looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> error = gpiod_direction_input(ts->gpiod_rst);
> if (error)
> goto error;
> @@ -969,6 +970,13 @@ static int goodix_get_gpio_config(struct goodix_ts_data *ts)
> */
> ts->gpiod_rst_flags = GPIOD_IN;
>
> + /*
> + * 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 = GPIOD_ASIS;
> +
> ts->avdd28 = devm_regulator_get(dev, "AVDD28");
> if (IS_ERR(ts->avdd28))
> return dev_err_probe(dev, PTR_ERR(ts->avdd28), "Failed to get AVDD28 regulator\n");
>
prev parent reply other threads:[~2025-04-28 8:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 15:15 [PATCH 0/2] input: touch: goodix: Extend reset pull-up fix to DT platforms Esben Haabendal
2025-04-22 15:15 ` [PATCH 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Esben Haabendal
2025-04-28 7:45 ` Krzysztof Kozlowski
2025-04-28 7:58 ` Esben Haabendal
2025-04-28 19:30 ` Dmitry Torokhov
2025-04-29 14:11 ` Esben Haabendal
2025-04-29 6:11 ` Krzysztof Kozlowski
2025-04-29 9:18 ` Esben Haabendal
2025-04-22 15:15 ` [PATCH 2/2] Input: goodix - Allow DT specification of missing reset pull-up Esben Haabendal
2025-04-28 8:33 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9bafdd2-d84a-49e3-a221-36088f3c753b@redhat.com \
--to=hdegoede@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=esben@geanix.com \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox