From patchwork Fri Nov 3 19:03:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Br=C3=BCns?= X-Patchwork-Id: 10041099 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 E806F6032D for ; Fri, 3 Nov 2017 19:13:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF50029707 for ; Fri, 3 Nov 2017 19:13:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3D8D29782; Fri, 3 Nov 2017 19:13:22 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5668829707 for ; Fri, 3 Nov 2017 19:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465AbdKCTNV (ORCPT ); Fri, 3 Nov 2017 15:13:21 -0400 Received: from mail-out-1.itc.rwth-aachen.de ([134.130.5.46]:50342 "EHLO mail-out-1.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752316AbdKCTNV (ORCPT ); Fri, 3 Nov 2017 15:13:21 -0400 X-Greylist: delayed 578 seconds by postgrey-1.27 at vger.kernel.org; Fri, 03 Nov 2017 15:13:20 EDT X-IronPort-AV: E=Sophos;i="5.44,339,1505772000"; d="scan'208";a="21914950" Received: from rwthex-w2-a.rwth-ad.de ([134.130.26.158]) by mail-in-1.itc.rwth-aachen.de with ESMTP; 03 Nov 2017 20:03:40 +0100 Received: from pebbles.fritz.box (78.49.2.66) by rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Fri, 3 Nov 2017 20:03:38 +0100 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: CC: =?UTF-8?q?Stefan=20Br=C3=BCns?= , "Dmitry Torokhov" , , Subject: [PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW Date: Fri, 3 Nov 2017 20:03:26 +0100 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171103190329.15194-1-stefan.bruens@rwth-aachen.de> References: <20171103190329.15194-1-stefan.bruens@rwth-aachen.de> MIME-Version: 1.0 X-Originating-IP: [78.49.2.66] X-ClientProxiedBy: rwthex-s3-b.rwth-ad.de (2002:8682:1aa1::8682:1aa1) To rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) Message-ID: <8c454b54-98a7-492d-b861-83d125306f86@rwthex-w2-a.rwth-ad.de> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sync events are sent by sparse_keymap_report_entry for normal KEY_* events, and are generated by several drivers after generating SW_* events, so sparse_keymap_report_entry should do the same. Without the sync, events are accumulated in the kernel. Currently, no driver uses sparse-keymap for SW_* events, but it is required for the intel-vbtn platform driver to generate SW_TABLET_MODE events. Signed-off-by: Stefan BrĂ¼ns --- drivers/input/sparse-keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index bb0349fa64bc..fd03e55768c9 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c @@ -255,6 +255,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k case KE_VSW: input_report_switch(dev, ke->sw.code, value); + input_sync(dev); break; } }