Skip to content

Revert "overlays: Update display GPIO declarations" for Goodix #4507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2021
Merged

Conversation

xdsopl
Copy link

@xdsopl xdsopl commented Aug 4, 2021

This reverts commit b7d685c for Goodix

Reverting the change for the Goodix overlay, introduced by that commit, makes the Goodix touch work here again.

The Goodix driver supports the decision to use GPIO_ACTIVE_HIGH for both the irq and reset pins:

From include/linux/gpio/consumer.h:

struct acpi_gpio_params {
        unsigned int crs_entry_index;
        unsigned int line_index;
        bool active_low;
};

From drivers/input/touchscreen/goodix.c:

static const struct acpi_gpio_params first_gpio = { 0, 0, false };
static const struct acpi_gpio_params second_gpio = { 1, 0, false };

This reverts commit b7d685c for Goodix

Signed-off-by: Ahmet Inan <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Aug 4, 2021

Your reasoning doesn't look correct - the ACPI code is X86-specific - but I can believe that this patch is needed. The driver is using gpiod descriptors but still driving them in the old way. The sequence is:

	error = gpiod_direction_output(ts->gpiod_rst, 0);
...
	error = gpiod_direction_output(ts->gpiod_rst, 1);
...
	error = gpiod_direction_input(ts->gpiod_rst);

i.e. drive it low, drive it high, then release it, which looks like faking an active-low, open-drain GPIO with an active-high GPIO.

@pelwell pelwell merged commit 109751e into raspberrypi:rpi-5.10.y Aug 4, 2021
@pelwell
Copy link
Contributor

pelwell commented Aug 4, 2021

Thanks!

@xdsopl
Copy link
Author

xdsopl commented Aug 4, 2021

Thank you for clarifying!

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Aug 11, 2021
See: raspberrypi/linux#4518

kernel: Revert overlays: Update display GPIO declarations for Goodix
See: raspberrypi/linux#4507

kernel: Add midi-uart{2345}-overlay.dts
See: raspberrypi/linux#4514

firmware: firmware: Disable VLL loading from file system
See: #1605
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Aug 11, 2021
See: raspberrypi/linux#4518

kernel: Revert overlays: Update display GPIO declarations for Goodix
See: raspberrypi/linux#4507

kernel: Add midi-uart{2345}-overlay.dts
See: raspberrypi/linux#4514

firmware: firmware: Disable VLL loading from file system
See: raspberrypi/firmware#1605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants