linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Add SW_PEN_INSERTED define
@ 2016-06-28 17:00 Douglas Anderson
  2016-06-29 17:08 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Anderson @ 2016-06-28 17:00 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Douglas Anderson, hdegoede, robh, hans.verkuil,
	kamil, linux-kernel

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 <dianders@chromium.org>
---
 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)
 
-- 
2.8.0.rc3.226.g39d4020


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: Add SW_PEN_INSERTED define
  2016-06-28 17:00 [PATCH] Input: Add SW_PEN_INSERTED define Douglas Anderson
@ 2016-06-29 17:08 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2016-06-29 17:08 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: linux-input, hdegoede, robh, hans.verkuil, kamil, linux-kernel

On Tue, Jun 28, 2016 at 10:00:53AM -0700, Douglas Anderson wrote:
> 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 <dianders@chromium.org>

Applied, thank you.

> ---
>  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)
>  
> -- 
> 2.8.0.rc3.226.g39d4020
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-29 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-28 17:00 [PATCH] Input: Add SW_PEN_INSERTED define Douglas Anderson
2016-06-29 17:08 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).