Re: [PATCH V4 2/5] input: keyboard: imx_sc: Add i.MX system controller key support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux