* [PATCH v2 0/2] input: touch: goodix: Extend reset pull-up fix to DT platforms @ 2025-04-29 9:56 Esben Haabendal 2025-04-29 9:56 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Esben Haabendal 2025-04-29 9:56 ` [PATCH v2 2/2] Input: goodix - Allow DT specification of missing reset pull-up Esben Haabendal 0 siblings, 2 replies; 11+ messages in thread From: Esben Haabendal @ 2025-04-29 9:56 UTC (permalink / raw) To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede Cc: linux-input, devicetree, linux-kernel, Esben Haabendal This extends the fix for platforms without external pull-up on reset pin to device-tree platforms. Signed-off-by: Esben Haabendal <esben@geanix.com> --- Changes in v2: - Added vendor prefix to property (goodix,no-reset-pull-up) - Simplified check to only look at gpiod_rst_flags. - Link to v1: https://lore.kernel.org/r/20250422-goodix-no-reset-pull-up-v1-0-3983bb65a1bf@geanix.com --- Esben Haabendal (2): dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Input: goodix - Allow DT specification of missing reset pull-up .../devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ drivers/input/touchscreen/goodix.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) --- base-commit: 9c32cda43eb78f78c73aee4aa344b777714e259b change-id: 20250422-goodix-no-reset-pull-up-d2e4a9a3e07a Best regards, -- Esben Haabendal <esben@geanix.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 9:56 [PATCH v2 0/2] input: touch: goodix: Extend reset pull-up fix to DT platforms Esben Haabendal @ 2025-04-29 9:56 ` Esben Haabendal 2025-04-29 15:31 ` Conor Dooley 2025-04-29 9:56 ` [PATCH v2 2/2] Input: goodix - Allow DT specification of missing reset pull-up Esben Haabendal 1 sibling, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-04-29 9:56 UTC (permalink / raw) To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede Cc: linux-input, devicetree, linux-kernel, Esben Haabendal 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 <esben@geanix.com> --- Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 + goodix,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 -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 9:56 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Esben Haabendal @ 2025-04-29 15:31 ` Conor Dooley 2025-04-29 15:37 ` Esben Haabendal 2025-04-29 15:42 ` Hans de Goede 0 siblings, 2 replies; 11+ messages in thread From: Conor Dooley @ 2025-04-29 15:31 UTC (permalink / raw) To: Esben Haabendal Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede, linux-input, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1290 bytes --] On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: > 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 <esben@geanix.com> > --- > Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml > index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 > > + goodix,no-reset-pull-up: > + type: boolean > + description: There is no pull-up on reset pin I have to wonder, why are these system using the reset property if the reset is not usable? Shouldn't the property be omitted? > + > AVDD28-supply: > description: Analog power supply regulator on AVDD28 pin > > > -- > 2.49.0 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 15:31 ` Conor Dooley @ 2025-04-29 15:37 ` Esben Haabendal 2025-04-29 16:09 ` Dmitry Torokhov 2025-04-29 15:42 ` Hans de Goede 1 sibling, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-04-29 15:37 UTC (permalink / raw) To: Conor Dooley Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede, linux-input, devicetree, linux-kernel "Conor Dooley" <conor@kernel.org> writes: > On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: >> 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 <esben@geanix.com> >> --- >> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml >> index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 >> >> + goodix,no-reset-pull-up: >> + type: boolean >> + description: There is no pull-up on reset pin > > I have to wonder, why are these system using the reset property if the > reset is not usable? Shouldn't the property be omitted? The reset are fully functional. It just have to be controlled in push-pull mode. Because of the lack of external pull-up, configuring the reset gpio as input (to save power) puts the reset pin in an unknown state. /Esben ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 15:37 ` Esben Haabendal @ 2025-04-29 16:09 ` Dmitry Torokhov 2025-04-29 19:02 ` Esben Haabendal 0 siblings, 1 reply; 11+ messages in thread From: Dmitry Torokhov @ 2025-04-29 16:09 UTC (permalink / raw) To: Esben Haabendal Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede, linux-input, devicetree, linux-kernel On Tue, Apr 29, 2025 at 05:37:34PM +0200, Esben Haabendal wrote: > "Conor Dooley" <conor@kernel.org> writes: > > > On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: > >> 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 <esben@geanix.com> > >> --- > >> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml > >> index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 > >> > >> + goodix,no-reset-pull-up: > >> + type: boolean > >> + description: There is no pull-up on reset pin > > > > I have to wonder, why are these system using the reset property if the > > reset is not usable? Shouldn't the property be omitted? > > The reset are fully functional. It just have to be controlled in > push-pull mode. > > Because of the lack of external pull-up, configuring the reset gpio as > input (to save power) puts the reset pin in an unknown state. How much power do we save by doing this? I don't recall other drivers trying to switch reset GPIO into input mode after performing reset... Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 16:09 ` Dmitry Torokhov @ 2025-04-29 19:02 ` Esben Haabendal 2025-04-29 21:32 ` Dmitry Torokhov 0 siblings, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-04-29 19:02 UTC (permalink / raw) To: Dmitry Torokhov Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede, linux-input, devicetree, linux-kernel "Dmitry Torokhov" <dmitry.torokhov@gmail.com> writes: > On Tue, Apr 29, 2025 at 05:37:34PM +0200, Esben Haabendal wrote: >> "Conor Dooley" <conor@kernel.org> writes: >> >> > On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: >> >> 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 <esben@geanix.com> >> >> --- >> >> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ >> >> 1 file changed, 4 insertions(+) >> >> >> >> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml >> >> index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 >> >> >> >> + goodix,no-reset-pull-up: >> >> + type: boolean >> >> + description: There is no pull-up on reset pin >> > >> > I have to wonder, why are these system using the reset property if the >> > reset is not usable? Shouldn't the property be omitted? >> >> The reset are fully functional. It just have to be controlled in >> push-pull mode. >> >> Because of the lack of external pull-up, configuring the reset gpio as >> input (to save power) puts the reset pin in an unknown state. > > How much power do we save by doing this? I don't recall other drivers > trying to switch reset GPIO into input mode after performing reset... I don't know. I also don't recall seeing this in other drivers. But as not knowing how much power it is, I did not feel comofortable proposing to remove it. /Esben ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 19:02 ` Esben Haabendal @ 2025-04-29 21:32 ` Dmitry Torokhov 0 siblings, 0 replies; 11+ messages in thread From: Dmitry Torokhov @ 2025-04-29 21:32 UTC (permalink / raw) To: Esben Haabendal Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede, linux-input, devicetree, linux-kernel On Tue, Apr 29, 2025 at 09:02:14PM +0200, Esben Haabendal wrote: > "Dmitry Torokhov" <dmitry.torokhov@gmail.com> writes: > > > On Tue, Apr 29, 2025 at 05:37:34PM +0200, Esben Haabendal wrote: > >> "Conor Dooley" <conor@kernel.org> writes: > >> > >> > On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: > >> >> 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 <esben@geanix.com> > >> >> --- > >> >> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ > >> >> 1 file changed, 4 insertions(+) > >> >> > >> >> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml > >> >> index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 > >> >> > >> >> + goodix,no-reset-pull-up: > >> >> + type: boolean > >> >> + description: There is no pull-up on reset pin > >> > > >> > I have to wonder, why are these system using the reset property if the > >> > reset is not usable? Shouldn't the property be omitted? > >> > >> The reset are fully functional. It just have to be controlled in > >> push-pull mode. > >> > >> Because of the lack of external pull-up, configuring the reset gpio as > >> input (to save power) puts the reset pin in an unknown state. > > > > How much power do we save by doing this? I don't recall other drivers > > trying to switch reset GPIO into input mode after performing reset... > > I don't know. I also don't recall seeing this in other drivers. But as > not knowing how much power it is, I did not feel comofortable proposing > to remove it. Hmm, setting RESET line to "input" was supposed to be removed in 2015: https://lore.kernel.org/all/1473530257-7495-5-git-send-email-irina.tirdea@intel.com/ And I even said that I applied that patch, but I can't find it. And it's been 10 years so I have no idea... The wording about power savings seem to have come from Hans, maybe he knows/remembers more? But I really wonder if we are not better off keeping reset line in "inactive" output state, like every other driver does. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 15:31 ` Conor Dooley 2025-04-29 15:37 ` Esben Haabendal @ 2025-04-29 15:42 ` Hans de Goede 2025-04-30 15:35 ` Conor Dooley 1 sibling, 1 reply; 11+ messages in thread From: Hans de Goede @ 2025-04-29 15:42 UTC (permalink / raw) To: Conor Dooley, Esben Haabendal Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree, linux-kernel Hi, On 29-Apr-25 17:31, Conor Dooley wrote: > On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: >> 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 <esben@geanix.com> >> --- >> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml >> index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 >> >> + goodix,no-reset-pull-up: >> + type: boolean >> + description: There is no pull-up on reset pin > > I have to wonder, why are these system using the reset property if the > reset is not usable? Shouldn't the property be omitted? The reset is usable, but it lacks an external pull-up resistor, so the driver cannot switch the gpio output on the CPU going to the touchscreen controller to input to save power as it does by default. Regards, Hans > >> + >> AVDD28-supply: >> description: Analog power supply regulator on AVDD28 pin >> >> >> -- >> 2.49.0 >> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property 2025-04-29 15:42 ` Hans de Goede @ 2025-04-30 15:35 ` Conor Dooley 0 siblings, 0 replies; 11+ messages in thread From: Conor Dooley @ 2025-04-30 15:35 UTC (permalink / raw) To: Hans de Goede Cc: Esben Haabendal, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1666 bytes --] On Tue, Apr 29, 2025 at 05:42:46PM +0200, Hans de Goede wrote: > Hi, > > On 29-Apr-25 17:31, Conor Dooley wrote: > > On Tue, Apr 29, 2025 at 11:56:11AM +0200, Esben Haabendal wrote: > >> 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 <esben@geanix.com> > >> --- > >> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml > >> index eb4992f708b70fef93bd4b59b9565123f7c6ad5d..21ac13046b6e021eeb403d854aabc945801dd29f 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 > >> > >> + goodix,no-reset-pull-up: > >> + type: boolean > >> + description: There is no pull-up on reset pin > > > > I have to wonder, why are these system using the reset property if the > > reset is not usable? Shouldn't the property be omitted? > > The reset is usable, but it lacks an external pull-up resistor, so > the driver cannot switch the gpio output on the CPU going to > the touchscreen controller to input to save power as it does by default. Ah, okay. The patch seems okay then. Acked-by: Conor Dooley <conor.dooley@microchip.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 2/2] Input: goodix - Allow DT specification of missing reset pull-up 2025-04-29 9:56 [PATCH v2 0/2] input: touch: goodix: Extend reset pull-up fix to DT platforms Esben Haabendal 2025-04-29 9:56 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Esben Haabendal @ 2025-04-29 9:56 ` Esben Haabendal 2025-04-29 9:58 ` Hans de Goede 1 sibling, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-04-29 9:56 UTC (permalink / raw) To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hans de Goede Cc: linux-input, devicetree, linux-kernel, Esben Haabendal 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> Reviewed-by: Hans de Goede <hdegoede@redhat.com> --- drivers/input/touchscreen/goodix.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index a3e8a51c91449533b4d5185746df6b98676053dd..ce4622bbcc89434a4d89c49bb97f084fb61aa448 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -772,10 +772,12 @@ int goodix_reset_no_int_sync(struct goodix_ts_data *ts) /* * Put the reset pin back in to input / high-impedance mode to save - * 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. + * power. + * Avoid doing this on boards that are known to not have external + * pull-up, and all ACPI boards since some ACPI boards don't have a + * pull-up. These boards need the reset pin to stay active-high. */ - if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_GPIO) { + if (ts->gpiod_rst_flags == GPIOD_IN) { error = gpiod_direction_input(ts->gpiod_rst); if (error) goto error; @@ -969,6 +971,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, "goodix,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"); -- 2.49.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/2] Input: goodix - Allow DT specification of missing reset pull-up 2025-04-29 9:56 ` [PATCH v2 2/2] Input: goodix - Allow DT specification of missing reset pull-up Esben Haabendal @ 2025-04-29 9:58 ` Hans de Goede 0 siblings, 0 replies; 11+ messages in thread From: Hans de Goede @ 2025-04-29 9:58 UTC (permalink / raw) To: Esben Haabendal, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: linux-input, devicetree, linux-kernel Hi, On 29-Apr-25 11:56 AM, 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> > Reviewed-by: Hans de Goede <hdegoede@redhat.com> Thanks the new version looks good to me. Regards, Hans > --- > drivers/input/touchscreen/goodix.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c > index a3e8a51c91449533b4d5185746df6b98676053dd..ce4622bbcc89434a4d89c49bb97f084fb61aa448 100644 > --- a/drivers/input/touchscreen/goodix.c > +++ b/drivers/input/touchscreen/goodix.c > @@ -772,10 +772,12 @@ int goodix_reset_no_int_sync(struct goodix_ts_data *ts) > > /* > * Put the reset pin back in to input / high-impedance mode to save > - * 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. > + * power. > + * Avoid doing this on boards that are known to not have external > + * pull-up, and all ACPI boards since some ACPI boards don't have a > + * pull-up. These boards need the reset pin to stay active-high. > */ > - if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_GPIO) { > + if (ts->gpiod_rst_flags == GPIOD_IN) { > error = gpiod_direction_input(ts->gpiod_rst); > if (error) > goto error; > @@ -969,6 +971,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, "goodix,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"); > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-04-30 15:35 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-29 9:56 [PATCH v2 0/2] input: touch: goodix: Extend reset pull-up fix to DT platforms Esben Haabendal 2025-04-29 9:56 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: goodix: Add no-reset-pull-up property Esben Haabendal 2025-04-29 15:31 ` Conor Dooley 2025-04-29 15:37 ` Esben Haabendal 2025-04-29 16:09 ` Dmitry Torokhov 2025-04-29 19:02 ` Esben Haabendal 2025-04-29 21:32 ` Dmitry Torokhov 2025-04-29 15:42 ` Hans de Goede 2025-04-30 15:35 ` Conor Dooley 2025-04-29 9:56 ` [PATCH v2 2/2] Input: goodix - Allow DT specification of missing reset pull-up Esben Haabendal 2025-04-29 9:58 ` Hans de Goede
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).