From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Bastien Nocera <hadess@hadess.net>,
linux-input@vger.kernel.org,
Maya Matuszczyk <maccraft123mc@gmail.com>
Subject: Re: [PATCH] Input: goodix - call acpi_device_fix_up_power() in some cases
Date: Fri, 8 Jul 2022 21:55:43 -0700 [thread overview]
Message-ID: <YskKT+swv3HgjZ4v@google.com> (raw)
In-Reply-To: <20220618210233.208027-1-hdegoede@redhat.com>
On Sat, Jun 18, 2022 at 11:02:33PM +0200, Hans de Goede wrote:
> On ACPI boards, when we cannot get the GPIOs to do a reset ourselves
> if necessary, call acpi_device_fix_up_power() to force the ACPI _PS0
> method to run.
>
> On some devices without proper GPIO descriptions this will reset
> the touchscreen for us and this may be necessary for us to be able
> to communicate to the touchscreen at all.
>
> Specifically on an Aya Neo Next this change will cause the _PS0()
> ACPI function to call INIT() which does:
>
> Method (INIT, 0, Serialized)
> {
> TP_I = 0x00A50000
> TP_R = 0x00A50000
> Sleep (0x0A)
> TP_I = 0x00E50000
> Sleep (One)
> TP_R = 0x00E50000
> Sleep (0x06)
> TP_I = 0x00A50000
> Sleep (0x3C)
> TP_I = 0x00041800
> }
>
> On older kernels the ACPI core assumed a power-on was necessary by itself
> and would run _PS0 before our probe function runs, which can be seen from
> the GPIO pin ctrl registers in /sys/kernel/debug/gpio which match
> the above hex values with older kernels.
>
> With newer kernels before this change the GPIO pin ctrl registers do not
> match, indicating INIT() has not run and probing the touchscreen fails.
>
> This change makes Linux run _PS0() again fixing the touchscreen not working
> on the Aya Neo Next.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=209061
> Reported-and-tested-by: Maya Matuszczyk <maccraft123mc@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2022-07-09 4:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 21:02 [PATCH] Input: goodix - call acpi_device_fix_up_power() in some cases Hans de Goede
2022-07-09 4:55 ` Dmitry Torokhov [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=YskKT+swv3HgjZ4v@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=maccraft123mc@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.