lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201030131552epcms1p2cfe412ede3d3b2c5286d2fff4260300c@epcms1p2>
Date:   Fri, 30 Oct 2020 22:15:52 +0900
From:   Jungrae Kim <jryu.kim@...sung.com>
To:     Jungrae Kim <jryu.kim@...sung.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     HyungJae Im <hj2.im@...sung.com>,
        "manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "rydberg@...math.org" <rydberg@...math.org>
Subject: [PATCH] Input: add SW_COVER_ATTACHED and SW_EXT_PEN_ATTACHED

>From 23aed4567e234b7e108c31abadb9f3a3ccccf7d2 Mon Sep 17 00:00:00 2001
From: Jungrae Kim <jryu.kim@...sung.com>
Date: Fri, 30 Oct 2020 21:23:12 +0900
Subject: [PATCH] Input: add SW_COVER_ATTACHED and SW_EXT_PEN_ATTACHED

SW_COVER_ATTACHED represents the connected state of a removable cover
of a device. Value 0 means cover was attached with device, value 1 means
removed it.
SW_EXT_PEN_ATTACHED represents the state of the pen.
Some device have internal pen slot. but other some device have external pen
slot. These two cases has different use case in userspace. So need to
separate a event. Value 0 means pen was detach on external pen slot on
device, value 1 means pen was attached external pen slot on device.

Signed-off-by: Jungrae Kim <jryu.kim@...sung.com>
---
 include/linux/mod_devicetable.h        | 2 +-
 include/uapi/linux/input-event-codes.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5b08a473cdba..897f5a3e7721 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -320,7 +320,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_LED_MAX                0x0f
 #define INPUT_DEVICE_ID_SND_MAX                0x07
 #define INPUT_DEVICE_ID_FF_MAX         0x7f
-#define INPUT_DEVICE_ID_SW_MAX         0x10
+#define INPUT_DEVICE_ID_SW_MAX         0x12
 #define INPUT_DEVICE_ID_PROP_MAX       0x1f

 #define INPUT_DEVICE_ID_MATCH_BUS      1
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index ee93428ced9a..a0506369de6d 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -893,7 +893,9 @@
 #define SW_MUTE_DEVICE         0x0e  /* set = device disabled */
 #define SW_PEN_INSERTED                0x0f  /* set = pen inserted */
 #define SW_MACHINE_COVER       0x10  /* set = cover closed */
-#define SW_MAX                 0x10
+#define SW_COVER_ATTACHED      0x11  /* set = cover attached */
+#define SW_EXT_PEN_ATTACHED    0x12  /* set = external pen attached */
+#define SW_MAX                 0x12
 #define SW_CNT                 (SW_MAX+1)

 /*
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ