From: 'Dmitry Torokhov' <dmitry.torokhov@gmail.com>
To: "Jingle.Wu" <jingle.wu@emc.com.tw>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
phoenix@emc.com.tw, josh.chen@emc.com.tw, dave.wang@emc.com.tw
Subject: Re: [PATCH] Input: elan_i2c - Implement inhibit/uninhibit functions.
Date: Thu, 11 May 2023 17:07:01 -0700 [thread overview]
Message-ID: <ZF2DJVZ0KgXmhoZi@google.com> (raw)
In-Reply-To: <000b01d97978$32775ca0$976615e0$@emc.com.tw>
Hi Jingle,
On Fri, Apr 28, 2023 at 10:21:53AM +0800, Jingle.Wu wrote:
> Hi Dmitry:
> During the initial process and when the users open/close device,
> having the elan uninhibit/inhibit commands (low power mode) was not what
> Elan expects to happen. Due to that touchpad would do the calibration in
> uninhibit moment , we don't want the calibration to be affected by fingers
> on the touchpad.
> However, the LID inhibit/uninhibit functions in the Linux kernel
> driver calls open/close(), so we need to separate the inhibit/uninhibit
> behavior from open/close() function
>
> https://elixir.bootlin.com/linux/latest/source/drivers/input/input.c#L1783
>
> https://elixir.bootlin.com/linux/latest/source/drivers/input/input.c#L1813
You quite intentionally can not separate inhibit/uninhibit from open and
close. As with open/close nothing stops inhibit/uninhibit to be called
rapidly multiple times in a row. You probably rely on particular
operation of ChromeOS devices during normal user interaction.
As far as I remember, you need to perform recalibration on certain
devices when LID gets open. I recommend you implement something similar
to https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3578852
where we monitor LID events and recalibrate when needed, instead of
trying to make assumptions on when inhibit and uninhibit functions are
called.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2023-05-12 0:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 1:14 [PATCH] Input: elan_i2c - Implement inhibit/uninhibit functions jingle.wu
2023-03-28 8:54 ` phoenix
2023-04-07 16:57 ` Dmitry Torokhov
2023-04-10 1:26 ` Jingle.Wu
2023-04-26 22:57 ` 'Dmitry Torokhov'
2023-04-28 2:21 ` Jingle.Wu
2023-05-12 0:07 ` 'Dmitry Torokhov' [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-03 1:34 jingle.wu
2023-05-31 9:03 jingle.wu
2023-06-29 22:57 ` Dmitry Torokhov
2023-07-05 6:09 ` Jingle.Wu
2023-07-31 5:47 ` 'Dmitry Torokhov'
2023-07-07 5:56 ` Jingle.Wu
2023-04-10 10:51 jingle.wu
2023-03-17 7:16 jingle.wu
2023-03-19 2:17 ` kernel test robot
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=ZF2DJVZ0KgXmhoZi@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=dave.wang@emc.com.tw \
--cc=jingle.wu@emc.com.tw \
--cc=josh.chen@emc.com.tw \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phoenix@emc.com.tw \
/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