From patchwork Sun Apr 8 21:19:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 10328585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08FFE6053C for ; Sun, 8 Apr 2018 21:20:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC796289A7 for ; Sun, 8 Apr 2018 21:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8FD528A27; Sun, 8 Apr 2018 21:20:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6016428A20 for ; Sun, 8 Apr 2018 21:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6VDJi5CXCPt7J0/H9xWnwuDblAL+uw1wVWhA1s6S8T0=; b=BY23G4Cjw6gW3wS9p2YPhYLxmY jD8ymFssVNnp9NR/mKlVNb/Rw0hGiPbMmdkJfSyNolFwlcOGAhorvM6LiLNCRl+hQr92cQwDwsX3G P0Kh2AAUNywAJsyATvRuiBKpEnYzhR3cbenr2PQiHkG6p9rs93Wfgs/LrMdPJxFRaCBxZ/1f1zQf3 A8ImwuvzyBvLGgaTBjjxeQdITCyVlN3iVqTnGTd4cz8C7G8iF9NT8gziT51I63q6C7nDzgZ0H73Yy V+YqBvAHy4iBdHzLB4tUlVjcAXIvgw2yQg7g+NM0RNuuVFR8j1RIW/D/33TeqYuAtoQSPcFfadUkc XuqbJYSg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5Hjd-0003sp-VM; Sun, 08 Apr 2018 21:20:25 +0000 Received: from gofer.mess.org ([88.97.38.141]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5HjU-0002fK-AQ for linux-amlogic@lists.infradead.org; Sun, 08 Apr 2018 21:20:18 +0000 Received: by gofer.mess.org (Postfix, from userid 1000) id 3158760D9F; Sun, 8 Apr 2018 22:19:44 +0100 (BST) From: Sean Young To: linux-media@vger.kernel.org, Matthias Reichl Subject: [PATCH v2 6/7] media: rc: mce_kbd decoder: fix stuck keys Date: Sun, 8 Apr 2018 22:19:41 +0100 Message-Id: <6e04a64c9be3f571f4927f0ffada67be5071db88.1523221902.git.sean@mess.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180408_142016_583127_562012B4 X-CRM114-Status: UNSURE ( 8.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonas Karlman , Kevin Hilman , Neil Armstrong , stable@vger.kernel.org, Carlo Caione , linux-amlogic@lists.infradead.org, Alex Deryskyba , Heiner Kallweit MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The MCE Remote sends a 0 scancode when keys are released. If this is not received or decoded, then keys can get "stuck"; the keyup event is not sent since the input_sync() is missing from the timeout handler. Cc: stable@vger.kernel.org Signed-off-by: Sean Young --- drivers/media/rc/ir-mce_kbd-decoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c index dcdba83290d2..a6adf54461e9 100644 --- a/drivers/media/rc/ir-mce_kbd-decoder.c +++ b/drivers/media/rc/ir-mce_kbd-decoder.c @@ -130,6 +130,8 @@ static void mce_kbd_rx_timeout(struct timer_list *t) for (i = 0; i < MCIR2_MASK_KEYS_START; i++) input_report_key(raw->mce_kbd.idev, kbd_keycodes[i], 0); + + input_sync(raw->mce_kbd.idev); } static enum mce_kbd_mode mce_kbd_mode(struct mce_kbd_dec *data)