[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZF2DJVZ0KgXmhoZi@google.com>
Date: Thu, 11 May 2023 17:07:01 -0700
From: 'Dmitry Torokhov' <dmitry.torokhov@...il.com>
To: "Jingle.Wu" <jingle.wu@....com.tw>
Cc: linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
phoenix@....com.tw, josh.chen@....com.tw, dave.wang@....com.tw
Subject: Re: [PATCH] Input: elan_i2c - Implement inhibit/uninhibit functions.
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
Powered by blists - more mailing lists