Re: [PATCH] Input: elan_i2c - Implement inhibit/uninhibit functions.

From: 'Dmitry Torokhov'
Date: Wed Apr 26 2023 - 18:58:11 EST


Hi Jingle,

On Mon, Apr 10, 2023 at 09:26:04AM +0800, Jingle.Wu wrote:
> HI Dmitry:
>
> > +static void elan_close(struct input_dev *input_dev) {
> > + if ((input_dev->users) && (!input_dev->inhibited))
> > + elan_inhibit(input_dev);
>
> This check is for "only inhibit request", and elan_open() its check is for
> "only uninhibit request".
> Because input_dev-> open() close() will be executed 2-3 times when initial.

I do not see why this would be an issue if what you are doing is putting
the device into a low power mode.

If this issue is about need to re-calibrate after opening the lid on
certain devices, then I think we need to do the same that we did for the
I2C-HID connected devices on Redrix and hook this functionality to a LID
handler.

Thanks.

--
Dmitry