mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jingle.Wu" <jingle.wu@emc.com.tw>
To: "'Dmitry Torokhov'" <dmitry.torokhov@gmail.com>
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: Fri, 28 Apr 2023 10:21:53 +0800	[thread overview]
Message-ID: <000b01d97978$32775ca0$976615e0$@emc.com.tw> (raw)
In-Reply-To: <ZEmsc0HyZuXlJARq@google.com>

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

THANKS
JINGLE

-----Original Message-----
From: 'Dmitry Torokhov' [mailto:dmitry.torokhov@gmail.com] 
Sent: Thursday, April 27, 2023 6:58 AM
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.

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


  reply	other threads:[~2023-04-28  2:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20  1:14 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 [this message]
2023-05-12  0:07         ` 'Dmitry Torokhov'
  -- 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='000b01d97978$32775ca0$976615e0$@emc.com.tw' \
    --to=jingle.wu@emc.com.tw \
    --cc=dave.wang@emc.com.tw \
    --cc=dmitry.torokhov@gmail.com \
    --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

all inboxes | Powered by JetHome®