linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Anson Huang <anson.huang@nxp.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"will@kernel.org" <will@kernel.org>,
	Aisheng Dong <aisheng.dong@nxp.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	Andy Duan <fugang.duan@nxp.com>, Peng Fan <peng.fan@nxp.com>,
	Leonard Crestez <leonard.crestez@nxp.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	"olof@lixom.net" <olof@lixom.net>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"jagan@amarulasolutions.com" <jagan@amarulasolutions.com>,
	"dinguyen@kernel.org" <dinguyen@kernel.org>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"marcin.juszkiewicz@linaro.org" <marcin.juszkiewicz@linaro.org>,
	"andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"yuehaibing@huawei.com" <yuehaibing@huawei.com>,
	"cw00.choi@samsung.com" <cw00.choi@samsung.com>,
	"enric.balletbo@collabora.com" <enric.balletbo@collabora.com>,
	"m.felsch@pengutronix.de" <m.felsch@pengutronix.de>,
	Jacky Bai <ping.bai@nxp.com>,
	"ronald@innovation.ch" <ronald@innovation.ch>,
	"stefan@agner.ch" <stefan@agner.ch>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH V4 2/5] input: keyboard: imx_sc: Add i.MX system controller key support
Date: Sun, 22 Sep 2019 18:14:33 +0200	[thread overview]
Message-ID: <20190922161432.GE1999@bug> (raw)
In-Reply-To: <DB3PR0402MB3916859326C76BC9BC1F781CF58F0@DB3PR0402MB3916.eurprd04.prod.outlook.com>

Hi!

> > > +	ret = imx_scu_call_rpc(priv->key_ipc_handle, &msg, true);
> > > +	if (ret) {
> > > +		dev_err(&input->dev, "read imx sc key failed, ret %d\n", ret);
> > > +		return;
> > > +	}
> > > +
> > > +	state = (bool)msg.state;
> > > +
> > > +	if (!state && !priv->keystate)
> > > +		state = true;
> > 
> > This needs an explanation please.
> 
> This is to handle the quick press of button, e.g., when button is pressed and released very quickly,
> when the delay work is scheduled, the button state read from SCU FW is actually a release state (0),
> the press state is (1), so the quick press/release will be ignored.
> 
> However, after double check and test, I think this should be handled by debounce time, if the button is pressed/release
> very quickly, the event should be ignored, I will remove it and reduce the debounce time to 30mS, previous 100mS
> is too long, using 30mS as debounce time, I did NOT see similar issue no matter how quick I press/release the button.

Are you sure this is expected behaviour?

AFAIK microswitches can bounce when the button is pressed and released, but will not generate
glitches when the button was not pressed, so even short presses are real and should be
propagated...

Best regards,
										Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2019-09-22 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  2:52 [PATCH V4 1/5] dt-bindings: fsl: scu: add scu key binding Anson Huang
2019-09-16  2:52 ` [PATCH V4 2/5] input: keyboard: imx_sc: Add i.MX system controller key support Anson Huang
2019-09-16 23:53   ` Dmitry Torokhov
2019-09-17  2:42     ` Anson Huang
2019-09-22 16:14       ` Pavel Machek [this message]
2019-09-23  2:43         ` Anson Huang
2019-09-16  2:52 ` [PATCH V4 3/5] arm64: dts: imx8qxp: Add scu key node Anson Huang
2019-09-16  2:52 ` [PATCH V4 4/5] arm64: dts: imx8qxp-mek: Enable scu key Anson Huang
2019-09-16  2:52 ` [PATCH V4 5/5] arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module Anson Huang

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=20190922161432.GE1999@bug \
    --to=pavel@ucw.cz \
    --cc=aisheng.dong@nxp.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=anson.huang@nxp.com \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=enric.balletbo@collabora.com \
    --cc=festevam@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=jagan@amarulasolutions.com \
    --cc=kernel@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=mripard@kernel.org \
    --cc=olof@lixom.net \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=ronald@innovation.ch \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    --cc=ulf.hansson@linaro.org \
    --cc=will@kernel.org \
    --cc=yuehaibing@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).