This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: sync-with-kernel and fixup RC_PROTO_*
Author:  Sean Young <s...@mess.org>
Date:    Sun Sep 24 21:37:45 2017 +0100

The kernel now defines the same RC_PROTO_ fields are we were using.

Signed-off-by: Sean Young <s...@mess.org>

 contrib/freebsd/include/linux/input-event-codes.h |  2 +
 contrib/freebsd/include/linux/input.h             |  1 +
 contrib/freebsd/include/linux/ivtv.h              |  1 +
 contrib/freebsd/include/linux/uinput.h            |  1 +
 contrib/freebsd/include/linux/v4l2-common.h       |  1 +
 contrib/freebsd/include/linux/v4l2-controls.h     |  1 +
 contrib/freebsd/include/linux/videodev2.h         |  1 +
 contrib/xc3028-firmware/tuner-xc2028-types.h      |  5 +-
 include/linux/cec-funcs.h                         |  1 +
 include/linux/cec.h                               |  1 +
 include/linux/dvb/dmx.h                           |  1 +
 include/linux/dvb/frontend.h                      |  1 +
 include/linux/fb.h                                |  1 +
 include/linux/ivtv.h                              |  1 +
 include/linux/lirc.h                              | 83 +++++++++++++++++++++++
 include/linux/media-bus-format.h                  |  1 +
 include/linux/media.h                             |  1 +
 include/linux/v4l2-common.h                       |  1 +
 include/linux/v4l2-controls.h                     |  1 +
 include/linux/v4l2-mediabus.h                     |  1 +
 include/linux/v4l2-subdev.h                       |  1 +
 include/linux/videodev2.h                         |  1 +
 utils/ir-ctl/ir-ctl.c                             |  4 +-
 utils/ir-ctl/ir-encode.c                          |  6 +-
 utils/ir-ctl/ir-encode.h                          | 23 +------
 utils/keytable/parse.h                            |  1 +
 26 files changed, 115 insertions(+), 28 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c14e9ca120c1feb9d4353966128b0c78163ed3bc
diff --git a/contrib/freebsd/include/linux/input-event-codes.h 
b/contrib/freebsd/include/linux/input-event-codes.h
index e19aa894732c..aa04673cf4d1 100644
--- a/contrib/freebsd/include/linux/input-event-codes.h
+++ b/contrib/freebsd/include/linux/input-event-codes.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Input event codes
  *
@@ -406,6 +407,7 @@
 #define BTN_TOOL_MOUSE         0x146
 #define BTN_TOOL_LENS          0x147
 #define BTN_TOOL_QUINTTAP      0x148   /* Five fingers on trackpad */
+#define BTN_STYLUS3            0x149
 #define BTN_TOUCH              0x14a
 #define BTN_STYLUS             0x14b
 #define BTN_STYLUS2            0x14c
diff --git a/contrib/freebsd/include/linux/input.h 
b/contrib/freebsd/include/linux/input.h
index 881f3b777f2b..ff968e520642 100644
--- a/contrib/freebsd/include/linux/input.h
+++ b/contrib/freebsd/include/linux/input.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 1999-2002 Vojtech Pavlik
  *
diff --git a/contrib/freebsd/include/linux/ivtv.h 
b/contrib/freebsd/include/linux/ivtv.h
index 73fbc4272a75..a9d5c11ce510 100644
--- a/contrib/freebsd/include/linux/ivtv.h
+++ b/contrib/freebsd/include/linux/ivtv.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
     Public ivtv API header
     Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
diff --git a/contrib/freebsd/include/linux/uinput.h 
b/contrib/freebsd/include/linux/uinput.h
index 84968c9d6fe0..0ee0239c2316 100644
--- a/contrib/freebsd/include/linux/uinput.h
+++ b/contrib/freebsd/include/linux/uinput.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  User level driver support for input subsystem
  *
diff --git a/contrib/freebsd/include/linux/v4l2-common.h 
b/contrib/freebsd/include/linux/v4l2-common.h
index 9295fb6ebf6c..4f797e2af348 100644
--- a/contrib/freebsd/include/linux/v4l2-common.h
+++ b/contrib/freebsd/include/linux/v4l2-common.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  * include/linux/v4l2-common.h
  *
diff --git a/contrib/freebsd/include/linux/v4l2-controls.h 
b/contrib/freebsd/include/linux/v4l2-controls.h
index 31bfc68f86d6..a692623e0236 100644
--- a/contrib/freebsd/include/linux/v4l2-controls.h
+++ b/contrib/freebsd/include/linux/v4l2-controls.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  *  Video for Linux Two controls header file
  *
diff --git a/contrib/freebsd/include/linux/videodev2.h 
b/contrib/freebsd/include/linux/videodev2.h
index 70272d67534e..70cf58d06bf7 100644
--- a/contrib/freebsd/include/linux/videodev2.h
+++ b/contrib/freebsd/include/linux/videodev2.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  *  Video for Linux Two header file
  *
diff --git a/contrib/xc3028-firmware/tuner-xc2028-types.h 
b/contrib/xc3028-firmware/tuner-xc2028-types.h
index 7e4798783db7..bb0437c36c03 100644
--- a/contrib/xc3028-firmware/tuner-xc2028-types.h
+++ b/contrib/xc3028-firmware/tuner-xc2028-types.h
@@ -1,10 +1,11 @@
-/* tuner-xc2028_types
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ * tuner-xc2028_types
  *
  * This file includes internal tipes to be used inside tuner-xc2028.
  * Shouldn't be included outside tuner-xc2028
  *
  * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mche...@infradead.org)
- * This code is placed under the terms of the GNU General Public License v2
  */
 
 /* xc3028 firmware types */
diff --git a/include/linux/cec-funcs.h b/include/linux/cec-funcs.h
index 270b251a3d9b..28e8a2a86e16 100644
--- a/include/linux/cec-funcs.h
+++ b/include/linux/cec-funcs.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  * cec - HDMI Consumer Electronics Control message functions
  *
diff --git a/include/linux/cec.h b/include/linux/cec.h
index b9f8df3a0477..b51fbe1941a7 100644
--- a/include/linux/cec.h
+++ b/include/linux/cec.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  * cec - HDMI Consumer Electronics Control public header
  *
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h
index c18714e0bfe8..7d27bf5c1d20 100644
--- a/include/linux/dvb/dmx.h
+++ b/include/linux/dvb/dmx.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * dmx.h
  *
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 636de093d3a8..e7953d8fee3c 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * frontend.h
  *
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 1b3b239b67b3..dc5f99545da4 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_FB_H
 #define _LINUX_FB_H
 
diff --git a/include/linux/ivtv.h b/include/linux/ivtv.h
index 120e82cac7d3..db4071396828 100644
--- a/include/linux/ivtv.h
+++ b/include/linux/ivtv.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
     Public ivtv API header
     Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
diff --git a/include/linux/lirc.h b/include/linux/lirc.h
index 991ab4570b8e..4fe580d36e41 100644
--- a/include/linux/lirc.h
+++ b/include/linux/lirc.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * lirc.h - linux infrared remote control header file
  * last modified 2010/07/13 by Jarod Wilson
@@ -46,12 +47,14 @@
 #define LIRC_MODE_RAW                  0x00000001
 #define LIRC_MODE_PULSE                0x00000002
 #define LIRC_MODE_MODE2                0x00000004
+#define LIRC_MODE_SCANCODE             0x00000008
 #define LIRC_MODE_LIRCCODE             0x00000010
 
 
 #define LIRC_CAN_SEND_RAW              LIRC_MODE2SEND(LIRC_MODE_RAW)
 #define LIRC_CAN_SEND_PULSE            LIRC_MODE2SEND(LIRC_MODE_PULSE)
 #define LIRC_CAN_SEND_MODE2            LIRC_MODE2SEND(LIRC_MODE_MODE2)
+#define LIRC_CAN_SEND_SCANCODE         LIRC_MODE2SEND(LIRC_MODE_SCANCODE)
 #define LIRC_CAN_SEND_LIRCCODE         LIRC_MODE2SEND(LIRC_MODE_LIRCCODE)
 
 #define LIRC_CAN_SEND_MASK             0x0000003f
@@ -63,6 +66,7 @@
 #define LIRC_CAN_REC_RAW               LIRC_MODE2REC(LIRC_MODE_RAW)
 #define LIRC_CAN_REC_PULSE             LIRC_MODE2REC(LIRC_MODE_PULSE)
 #define LIRC_CAN_REC_MODE2             LIRC_MODE2REC(LIRC_MODE_MODE2)
+#define LIRC_CAN_REC_SCANCODE          LIRC_MODE2REC(LIRC_MODE_SCANCODE)
 #define LIRC_CAN_REC_LIRCCODE          LIRC_MODE2REC(LIRC_MODE_LIRCCODE)
 
 #define LIRC_CAN_REC_MASK              LIRC_MODE2REC(LIRC_CAN_SEND_MASK)
@@ -130,4 +134,83 @@
 
 #define LIRC_SET_WIDEBAND_RECEIVER     _IOW('i', 0x00000023, __u32)
 
+/*
+ * struct lirc_scancode - decoded scancode with protocol for use with
+ *     LIRC_MODE_SCANCODE
+ *
+ * @timestamp: Timestamp in nanoseconds using CLOCK_MONOTONIC when IR
+ *     was decoded.
+ * @flags: should be 0 for transmit. When receiving scancodes,
+ *     LIRC_SCANCODE_FLAG_TOGGLE or LIRC_SCANCODE_FLAG_REPEAT can be set
+ *     depending on the protocol
+ * @rc_proto: see enum rc_proto
+ * @keycode: the translated keycode. Set to 0 for transmit.
+ * @scancode: the scancode received or to be sent
+ */
+struct lirc_scancode {
+       __u64   timestamp;
+       __u16   flags;
+       __u16   rc_proto;
+       __u32   keycode;
+       __u64   scancode;
+};
+
+/* Set if the toggle bit of rc-5 or rc-6 is enabled */
+#define LIRC_SCANCODE_FLAG_TOGGLE      1
+/* Set if this is a nec or sanyo repeat */
+#define LIRC_SCANCODE_FLAG_REPEAT      2
+
+/**
+ * enum rc_proto - the Remote Controller protocol
+ *
+ * @RC_PROTO_UNKNOWN: Protocol not known
+ * @RC_PROTO_OTHER: Protocol known but proprietary
+ * @RC_PROTO_RC5: Philips RC5 protocol
+ * @RC_PROTO_RC5X_20: Philips RC5x 20 bit protocol
+ * @RC_PROTO_RC5_SZ: StreamZap variant of RC5
+ * @RC_PROTO_JVC: JVC protocol
+ * @RC_PROTO_SONY12: Sony 12 bit protocol
+ * @RC_PROTO_SONY15: Sony 15 bit protocol
+ * @RC_PROTO_SONY20: Sony 20 bit protocol
+ * @RC_PROTO_NEC: NEC protocol
+ * @RC_PROTO_NECX: Extended NEC protocol
+ * @RC_PROTO_NEC32: NEC 32 bit protocol
+ * @RC_PROTO_SANYO: Sanyo protocol
+ * @RC_PROTO_MCIR2_KBD: RC6-ish MCE keyboard
+ * @RC_PROTO_MCIR2_MSE: RC6-ish MCE mouse
+ * @RC_PROTO_RC6_0: Philips RC6-0-16 protocol
+ * @RC_PROTO_RC6_6A_20: Philips RC6-6A-20 protocol
+ * @RC_PROTO_RC6_6A_24: Philips RC6-6A-24 protocol
+ * @RC_PROTO_RC6_6A_32: Philips RC6-6A-32 protocol
+ * @RC_PROTO_RC6_MCE: MCE (Philips RC6-6A-32 subtype) protocol
+ * @RC_PROTO_SHARP: Sharp protocol
+ * @RC_PROTO_XMP: XMP protocol
+ * @RC_PROTO_CEC: CEC protocol
+ */
+enum rc_proto {
+       RC_PROTO_UNKNOWN        = 0,
+       RC_PROTO_OTHER          = 1,
+       RC_PROTO_RC5            = 2,
+       RC_PROTO_RC5X_20        = 3,
+       RC_PROTO_RC5_SZ         = 4,
+       RC_PROTO_JVC            = 5,
+       RC_PROTO_SONY12         = 6,
+       RC_PROTO_SONY15         = 7,
+       RC_PROTO_SONY20         = 8,
+       RC_PROTO_NEC            = 9,
+       RC_PROTO_NECX           = 10,
+       RC_PROTO_NEC32          = 11,
+       RC_PROTO_SANYO          = 12,
+       RC_PROTO_MCIR2_KBD      = 13,
+       RC_PROTO_MCIR2_MSE      = 14,
+       RC_PROTO_RC6_0          = 15,
+       RC_PROTO_RC6_6A_20      = 16,
+       RC_PROTO_RC6_6A_24      = 17,
+       RC_PROTO_RC6_6A_32      = 18,
+       RC_PROTO_RC6_MCE        = 19,
+       RC_PROTO_SHARP          = 20,
+       RC_PROTO_XMP            = 21,
+       RC_PROTO_CEC            = 22,
+};
+
 #endif
diff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h
index ef6fb307d2ce..9e3511742fdc 100644
--- a/include/linux/media-bus-format.h
+++ b/include/linux/media-bus-format.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Media Bus API header
  *
diff --git a/include/linux/media.h b/include/linux/media.h
index 91f6539dc97c..5a5cc16e6819 100644
--- a/include/linux/media.h
+++ b/include/linux/media.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Multimedia device API
  *
diff --git a/include/linux/v4l2-common.h b/include/linux/v4l2-common.h
index 5b3f685a2d50..4f7b892377cd 100644
--- a/include/linux/v4l2-common.h
+++ b/include/linux/v4l2-common.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  * include/linux/v4l2-common.h
  *
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
index 31bfc68f86d6..a692623e0236 100644
--- a/include/linux/v4l2-controls.h
+++ b/include/linux/v4l2-controls.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  *  Video for Linux Two controls header file
  *
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
index dbacc51d7d5b..cb5694f1a320 100644
--- a/include/linux/v4l2-mediabus.h
+++ b/include/linux/v4l2-mediabus.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Media Bus API header
  *
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index dbce2b554e02..c95a53e6743c 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * V4L2 subdev userspace API
  *
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 7e1f035dab68..489433edd3d1 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR 
BSD-3-Clause) */
 /*
  *  Video for Linux Two header file
  *
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 8aaee628e234..9457e5ce55ae 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -27,10 +27,10 @@
 
 #include <config.h>
 
-#include "ir-encode.h"
-
 #include <linux/lirc.h>
 
+#include "ir-encode.h"
+
 #ifdef ENABLE_NLS
 # define _(string) gettext(string)
 # include "gettext.h"
diff --git a/utils/ir-ctl/ir-encode.c b/utils/ir-ctl/ir-encode.c
index 38637791d13a..8a12562868a7 100644
--- a/utils/ir-ctl/ir-encode.c
+++ b/utils/ir-ctl/ir-encode.c
@@ -21,6 +21,8 @@
 #include <stdint.h>
 #include <ctype.h>
 
+#include <linux/lirc.h>
+
 #include "ir-encode.h"
 
 #define NS_TO_US(x) (((x)+500)/1000)
@@ -349,7 +351,7 @@ static const struct {
        unsigned max_edges;
        unsigned carrier;
        int (*encode)(enum rc_proto proto, unsigned scancode, unsigned *buf);
-} encoders[RC_PROTO_COUNT] = {
+} encoders[] = {
        [RC_PROTO_RC5] = { "rc5", 0x1f7f, 24, 36000, rc5_encode },
        [RC_PROTO_RC5X_20] = { "rc5x_20", 0x1f7f3f, 40, 36000, rc5_encode },
        [RC_PROTO_RC5_SZ] = { "rc5_sz", 0x2fff, 26, 36000, rc5_encode },
@@ -393,7 +395,7 @@ bool protocol_match(const char *name, enum rc_proto *proto)
 {
        enum rc_proto p;
 
-       for (p=0; p<RC_PROTO_COUNT; p++) {
+       for (p=0; p<ARRAY_SIZE(encoders); p++) {
                if (str_like(encoders[p].name, name)) {
                        *proto = p;
                        return true;
diff --git a/utils/ir-ctl/ir-encode.h b/utils/ir-ctl/ir-encode.h
index 31d81aa9c8b4..6e9c623e3548 100644
--- a/utils/ir-ctl/ir-encode.h
+++ b/utils/ir-ctl/ir-encode.h
@@ -2,28 +2,7 @@
 #ifndef __IR_ENCODE_H__
 #define __IR_ENCODE_H__
 
-enum rc_proto {
-       RC_PROTO_RC5,
-       RC_PROTO_RC5X_20,
-       RC_PROTO_RC5_SZ,
-       RC_PROTO_JVC,
-       RC_PROTO_SONY12,
-       RC_PROTO_SONY15,
-       RC_PROTO_SONY20,
-       RC_PROTO_NEC,
-       RC_PROTO_NECX,
-       RC_PROTO_NEC32,
-       RC_PROTO_SANYO,
-       RC_PROTO_MCE_KBD,
-       RC_PROTO_RC6_0,
-       RC_PROTO_RC6_6A_20,
-       RC_PROTO_RC6_6A_24,
-       RC_PROTO_RC6_6A_32,
-       RC_PROTO_RC6_MCE,
-       RC_PROTO_SHARP,
-       RC_PROTO_XMP,
-       RC_PROTO_COUNT
-};
+#define ARRAY_SIZE(x)     (sizeof(x)/sizeof((x)[0]))
 
 bool protocol_match(const char *name, enum rc_proto *proto);
 unsigned protocol_carrier(enum rc_proto proto);
diff --git a/utils/keytable/parse.h b/utils/keytable/parse.h
index 39574fa9d150..4b6a0a827fca 100644
--- a/utils/keytable/parse.h
+++ b/utils/keytable/parse.h
@@ -332,6 +332,7 @@ struct parse_event key_events[] = {
        {"BTN_TOOL_MOUSE", 0x146},
        {"BTN_TOOL_LENS", 0x147},
        {"BTN_TOOL_QUINTTAP", 0x148},
+       {"BTN_STYLUS3", 0x149},
        {"BTN_TOUCH", 0x14a},
        {"BTN_STYLUS", 0x14b},
        {"BTN_STYLUS2", 0x14c},

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to