From patchwork Tue Oct 27 08:48:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Balint Czobor X-Patchwork-Id: 7494811 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED5B1BEEA4 for ; Tue, 27 Oct 2015 08:48:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1123F204B5 for ; Tue, 27 Oct 2015 08:48:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E952206C5 for ; Tue, 27 Oct 2015 08:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754495AbbJ0Isr (ORCPT ); Tue, 27 Oct 2015 04:48:47 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:38703 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754458AbbJ0Isq (ORCPT ); Tue, 27 Oct 2015 04:48:46 -0400 Received: by wicll6 with SMTP id ll6so149325372wic.1; Tue, 27 Oct 2015 01:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=u6esCDDCuzIS86D4dhFQN7olCncJyEKs7x9awVQ1eL8=; b=QxJkIvzgErTV+Eaz23ex/o5Z/b9h7NSYC3CzW+xKd6ktFfMxu5qzj9MpU6XYlCW/9M AvgWa8jpdTJkgQVKJT/gt91Vjicygm/acZIKxJqQGYJCbnK01ibZW82bj2iBgxFL8MY6 Xm+0itA2BGpTHUM3PqUKqI5NUjDbPPqtggm67IWBdohvWsGU+0sPvOBlwx6DbjJmGs/2 RoZQ+U42kJHVSYhlDAxPwTkQcLRjva7/rRza8Hf0f4WWGLHSQPyjha/5c5IkNDP7UkcM X6xpnoWqrH/u+ZfQZN+0LXMoixI3ED/LKasrjOOG5AuILmw86r2pY9OfTYfb30CT/GG3 lcRQ== X-Received: by 10.180.108.42 with SMTP id hh10mr9684191wib.47.1445935725338; Tue, 27 Oct 2015 01:48:45 -0700 (PDT) Received: from localhost.localdomain (51B70C10.dsl.pool.telekom.hu. [81.183.12.16]) by smtp.gmail.com with ESMTPSA id l5sm12175128wjf.11.2015.10.27.01.48.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2015 01:48:44 -0700 (PDT) From: =?UTF-8?q?B=C3=A1lint=20Czobor?= To: Dmitry Torokhov , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Colin Cross , =?UTF-8?q?B=C3=A1lint=20Czobor?= Subject: [PATCH 3/3] input: misc: keychord: move header to uapi Date: Tue, 27 Oct 2015 09:48:35 +0100 Message-Id: <1445935715-5861-1-git-send-email-czoborbalint@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Cross Move the entire contents of linux/keychord.h header to uapi, it only contains a userspace interface. Change-Id: If94f83328b19efb58c66391dce3bd8e927788d8d Signed-off-by: Colin Cross Signed-off-by: Bálint Czobor --- include/linux/keychord.h | 31 +----------------------- include/uapi/linux/keychord.h | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 30 deletions(-) create mode 100644 include/uapi/linux/keychord.h diff --git a/include/linux/keychord.h b/include/linux/keychord.h index 856a585..08cf540 100644 --- a/include/linux/keychord.h +++ b/include/linux/keychord.h @@ -18,35 +18,6 @@ #ifndef __LINUX_KEYCHORD_H_ #define __LINUX_KEYCHORD_H_ -#include - -#define KEYCHORD_VERSION 1 - -/* - * One or more input_keychord structs are written to /dev/keychord - * at once to specify the list of keychords to monitor. - * Reading /dev/keychord returns the id of a keychord when the - * keychord combination is pressed. A keychord is signalled when - * all of the keys in the keycode list are in the pressed state. - * The order in which the keys are pressed does not matter. - * The keychord will not be signalled if keys not in the keycode - * list are pressed. - * Keychords will not be signalled on key release events. - */ -struct input_keychord { - /* should be KEYCHORD_VERSION */ - __u16 version; - /* - * client specified ID, returned from read() - * when this keychord is pressed. - */ - __u16 id; - - /* number of keycodes in this keychord */ - __u16 count; - - /* variable length array of keycodes */ - __u16 keycodes[]; -}; +#include #endif /* __LINUX_KEYCHORD_H_ */ diff --git a/include/uapi/linux/keychord.h b/include/uapi/linux/keychord.h new file mode 100644 index 0000000..ea7cf4d --- /dev/null +++ b/include/uapi/linux/keychord.h @@ -0,0 +1,52 @@ +/* + * Key chord input driver + * + * Copyright (C) 2008 Google, Inc. + * Author: Mike Lockwood + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +*/ + +#ifndef _UAPI_LINUX_KEYCHORD_H_ +#define _UAPI_LINUX_KEYCHORD_H_ + +#include + +#define KEYCHORD_VERSION 1 + +/* + * One or more input_keychord structs are written to /dev/keychord + * at once to specify the list of keychords to monitor. + * Reading /dev/keychord returns the id of a keychord when the + * keychord combination is pressed. A keychord is signalled when + * all of the keys in the keycode list are in the pressed state. + * The order in which the keys are pressed does not matter. + * The keychord will not be signalled if keys not in the keycode + * list are pressed. + * Keychords will not be signalled on key release events. + */ +struct input_keychord { + /* should be KEYCHORD_VERSION */ + __u16 version; + /* + * client specified ID, returned from read() + * when this keychord is pressed. + */ + __u16 id; + + /* number of keycodes in this keychord */ + __u16 count; + + /* variable length array of keycodes */ + __u16 keycodes[]; +}; + +#endif /* _UAPI_LINUX_KEYCHORD_H_ */