Skip to contentSkip to conversation

Add wctablet device

PATCH New Gerd Hoffmann 1 participant 1 message Feb 6, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Add wctablet device

From: Anatoli Huseu1 <[email protected]>

Add QEMU Wacom Penpartner serial tablet emulation. GSoC 2016 project.

Various cleanups.
Add line speed tracking.
Implement ST and SP commands.
Adapted to chardev QOMification.

---
 Makefile.objs            |   1 +
 backends/Makefile.objs   |   2 +-
 backends/trace-events    |  10 ++
 backends/wctablet.c      | 369 +++++++++++++++++++++++++++++++++++++++++++++++
 chardev/char.c           |   1 +
 docs/qdev-device-use.txt |   2 +-
 qapi-schema.json         |   3 +-
 7 files changed, 385 insertions(+), 3 deletions(-)
 create mode 100644 backends/trace-events
 create mode 100644 backends/wctablet.c
Makefile.objs +1 -0
index 431fc59..e4bfc16 100644
@@ -125,6 +125,7 @@ trace-events-subdirs += crypto
 trace-events-subdirs += io
 trace-events-subdirs += migration
 trace-events-subdirs += block
+trace-events-subdirs += backends
 trace-events-subdirs += hw/block
 trace-events-subdirs += hw/block/dataplane
 trace-events-subdirs += hw/char
backends/Makefile.objs +1 -1
index 1846998..0e0f156 100644
@@ -1,7 +1,7 @@
 common-obj-y += rng.o rng-egd.o
 common-obj-$(CONFIG_POSIX) += rng-random.o
 
-common-obj-y += msmouse.o testdev.o
+common-obj-y += msmouse.o wctablet.o testdev.o
 common-obj-$(CONFIG_BRLAPI) += baum.o
 baum.o-cflags := $(SDL_CFLAGS)
 
backends/trace-events new file +10 -0
new file mode 100644
index 0000000..8c3289a
@@ -0,0 +1,10 @@
+# See docs/tracing.txt for syntax documentation.
+
+# backends/wctablet.c
+wct_init(void) ""
+wct_cmd_re(void) ""
+wct_cmd_st(void) ""
+wct_cmd_sp(void) ""
+wct_cmd_ts(int input) "0x%02x"
+wct_cmd_other(const char *cmd) "%s"
+wct_speed(int speed) "%d"
backends/wctablet.c new file +369 -0

369 lines not on this page · raw message

chardev/char.c +1 -0
index abd525f..54cd5f4 100644
@@ -652,6 +652,7 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
     if (strcmp(filename, "null")    == 0 ||
         strcmp(filename, "pty")     == 0 ||
         strcmp(filename, "msmouse") == 0 ||
+        strcmp(filename, "wctablet") == 0 ||
         strcmp(filename, "braille") == 0 ||
         strcmp(filename, "testdev") == 0 ||
         strcmp(filename, "stdio")   == 0) {
docs/qdev-device-use.txt +1 -1
index 136d271..b059405 100644
@@ -200,7 +200,7 @@ LEGACY-CHARDEV translates to -chardev HOST-OPTS... as follows:
 
 * null becomes -chardev null
 
-* pty, msmouse, braille, stdio likewise
+* pty, msmouse, wctablet, braille, stdio likewise
 
 * vc:WIDTHxHEIGHT becomes -chardev vc,width=WIDTH,height=HEIGHT
 
qapi-schema.json +2 -1
index cbdffdd..c1f2549 100644
@@ -4865,7 +4865,7 @@
 #
 # Configuration info for the new chardev backend.
 #
-# Since: 1.4 (testdev since 2.2)
+# Since: 1.4 (testdev since 2.2, wctablet since 2.9)
 ##
 { 'union': 'ChardevBackend', 'data': { 'file'   : 'ChardevFile',
                                        'serial' : 'ChardevHostdev',
@@ -4877,6 +4877,7 @@
                                        'null'   : 'ChardevCommon',
                                        'mux'    : 'ChardevMux',
                                        'msmouse': 'ChardevCommon',
+                                       'wctablet' : 'ChardevCommon',
                                        'braille': 'ChardevCommon',
                                        'testdev': 'ChardevCommon',
                                        'stdio'  : 'ChardevStdio',
Signature · 1 line
1.8.3.1