From patchwork Tue Jun 28 17:00:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9203655 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 644C46074E for ; Tue, 28 Jun 2016 17:01:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52647285DF for ; Tue, 28 Jun 2016 17:01:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 469BF2860F; Tue, 28 Jun 2016 17:01:34 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 C8460285DF for ; Tue, 28 Jun 2016 17:01:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbcF1RBc (ORCPT ); Tue, 28 Jun 2016 13:01:32 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34093 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbcF1RBc (ORCPT ); Tue, 28 Jun 2016 13:01:32 -0400 Received: by mail-pf0-f177.google.com with SMTP id h14so8544462pfe.1 for ; Tue, 28 Jun 2016 10:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=rdjgZ6csQhZvcK5ZxKDHqpjn3K6JoSgScHDC+Q36VGI=; b=Mn3M6LqzL+f2dxPHbWkXCHJ+uFWEWRImiIIDM80mK0xbrtA0mLHBeFk30Ern7c3o4p Q4Lm1MVhWiGPzC405A6qADltFe9LqCD8/BlAYCngt4GJzmbLP3Jv6fKiH15cYMObs4gD 5Mp3h2iMB1kptTC3Ar8nPmf+cBS9fs3Laq/S0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rdjgZ6csQhZvcK5ZxKDHqpjn3K6JoSgScHDC+Q36VGI=; b=PGqVQYP37ej9O9LyvaPj02qMKs0zMvtJ4Tpn96NZO7+Eodyu7gf1Oh7lmD8WSKVdRv myPFxDlewMNCo+WPj864Vx/Pdzd8u+IK9AALtgoGJOLDjwAJPhnrnMpaWfmRNJNdcm4A w8khdmqYYFRotgGH4eAEPmEsDDfF1U11FcWV7+l3Y7RRsD2/lLVHSR3q2UNWTQxepvcr 9GybgT0oRbetE6AnkRUjfllBSotGE203t5NaXhmRTkoGJgjMOfr12CmDww9yuGLkSw0W W+lhJOuhW3UB8RY469zffr7eTlz/k03374jj5K1AI0QoDciWfc5cpcM816YxUtRdqlvO A5Jw== X-Gm-Message-State: ALyK8tJA3P2JjwwLt74f9LJB3CewG+3nb9nlVTc/RDEglm5IuacVN1hLuzIubrBbAy98WBij X-Received: by 10.98.31.140 with SMTP id l12mr3513007pfj.51.1467133291455; Tue, 28 Jun 2016 10:01:31 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id d65sm1107506pfa.45.2016.06.28.10.01.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 10:01:30 -0700 (PDT) From: Douglas Anderson To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Douglas Anderson , hdegoede@redhat.com, robh@kernel.org, hans.verkuil@cisco.com, kamil@wypas.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: Add SW_PEN_INSERTED define Date: Tue, 28 Jun 2016 10:00:53 -0700 Message-Id: <1467133253-8075-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 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 Some devices with a pen may have a switch that can be used to detect when the pen is inserted or removed to a slot on the device. Let's add a define to the input event codes so that everyone can be on the same page for what event we should generate when the pen is inserted or removed. In general the pen switch could be used by the software on the device to kick off any number of actions when the pen is inserted or removed. Signed-off-by: Douglas Anderson --- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 737fa32faad4..d6d071fc3c56 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -780,6 +780,7 @@ #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ #define SW_LINEIN_INSERT 0x0d /* set = inserted */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ +#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_MAX 0x0f #define SW_CNT (SW_MAX+1)