Skip to contentSkip to conversation

HID: udraw-ps3: Add support for the uDraw tablet for PS3

PATCH Applied Bastien Nocera 2 participants 4 messages Nov 15, 2016

Subsystems (3)
lore
Share & tools
lore

Bastien Nocera

author maintainer
#0 lore raw

PATCH v3 1/1 HID: udraw-ps3: Add support for the uDraw tablet for PS3

This adds support for the THQ uDraw tablet for the PS3, as 4 separate device nodes, so that user-space can easily consume events coming from the hardware.

Note that the touchpad two-finger support is fairly unreliable, and a right-click can only be achieved with a two-finger tap with the two fingers slightly apart (about 1cm should be enough).

---
 MAINTAINERS                 |   6 +
 drivers/hid/Kconfig         |   7 +
 drivers/hid/Makefile        |   1 +
 drivers/hid/hid-core.c      |   1 +
 drivers/hid/hid-ids.h       |   3 +
 drivers/hid/hid-udraw-ps3.c | 474 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 492 insertions(+)
 create mode 100644 drivers/hid/hid-udraw-ps3.c
MAINTAINERS +6 -0
index 1cd38a7..a209346 100644
@@ -12313,6 +12313,12 @@ S:	Maintained
 F:	Documentation/filesystems/udf.txt
 F:	fs/udf/
 
+UDRAW TABLET
+M:	Bastien Nocera <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/hid/hid-udraw.c
+
 UFS FILESYSTEM
 M:	Evgeniy Dushistov <[email protected]>
 S:	Maintained
drivers/hid/Kconfig +7 -0
index cd4599c..91025b3 100644
@@ -861,6 +861,13 @@ config THRUSTMASTER_FF
 	  a THRUSTMASTER Dual Trigger 3-in-1 or a THRUSTMASTER Ferrari GT
 	  Rumble Force or Force Feedback Wheel.
 
+config HID_UDRAW_PS3
+	tristate "THQ PS3 uDraw tablet"
+	depends on HID
+	---help---
+	  Say Y here if you want to use the THQ uDraw gaming tablet for
+	  the PS3.
+
 config HID_WACOM
 	tristate "Wacom Intuos/Graphire tablet support (USB)"
 	depends on HID
drivers/hid/Makefile +1 -0
index 86b2b57..b4ed502 100644
@@ -96,6 +96,7 @@ obj-$(CONFIG_HID_TIVO)		+= hid-tivo.o
 obj-$(CONFIG_HID_TOPSEED)	+= hid-topseed.o
 obj-$(CONFIG_HID_TWINHAN)	+= hid-twinhan.o
 obj-$(CONFIG_HID_UCLOGIC)	+= hid-uclogic.o
+obj-$(CONFIG_HID_UDRAW_PS3)	+= hid-udraw-ps3.o
 obj-$(CONFIG_HID_LED)		+= hid-led.o
 obj-$(CONFIG_HID_XINMO)		+= hid-xinmo.o
 obj-$(CONFIG_HID_ZEROPLUS)	+= hid-zpff.o
drivers/hid/hid-core.c +1 -0
index 2b89c70..3611ec7 100644
@@ -2086,6 +2086,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP1062) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_THQ, USB_DEVICE_ID_THQ_PS3_UDRAW) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_YIYNOVA_TABLET) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_81) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_45) },
drivers/hid/hid-ids.h +3 -0
index 6cfb5ca..42e9bf9 100644
@@ -958,6 +958,9 @@
 #define USB_VENDOR_ID_THINGM		0x27b8
 #define USB_DEVICE_ID_BLINK1		0x01ed
 
+#define USB_VENDOR_ID_THQ		0x20d6
+#define USB_DEVICE_ID_THQ_PS3_UDRAW	0xcb17
+
 #define USB_VENDOR_ID_THRUSTMASTER	0x044f
 
 #define USB_VENDOR_ID_TIVO		0x150a
drivers/hid/hid-udraw-ps3.c new file +474 -0

474 lines not on this page · raw message

Signature · 1 line
2.9.3
maintainer Applied
#1 lore raw
Quoted 7 lines · Bastien Nocera

This adds support for the THQ uDraw tablet for the PS3, as 4 separate device nodes, so that user-space can easily consume events coming from the hardware.

Note that the touchpad two-finger support is fairly unreliable, and a right-click can only be achieved with a two-finger tap with the two fingers slightly apart (about 1cm should be enough).

Applied to hid.git#for-4.10/udraw-ps3

Signature · 2 lines
Jiri Kosina
SUSE Labs
maintainer
#2 lore raw

PATCH 1/1 HID: udraw-ps3: accel_limits is local to the driver

From: Jiri Kosina <[email protected]>

And as such should be marked static to avoid global namespace pollution.

---

I've just applied this on top of hid.git#for-4.10/udraw-ps3

 drivers/hid/hid-udraw-ps3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-udraw-ps3.c +1 -1
index 1f68b0b..88ea390 100644
@@ -54,7 +54,7 @@ enum {
  * Accelerometer min/max values
  * in order, X, Y and Z
  */
-struct {
+static struct {
 	int min;
 	int max;
 } accel_limits[] = {
Signature · 2 lines
Jiri Kosina
SUSE Labs
author maintainer Reviewed-by on v1 1/1
#3 lore raw

Re: [PATCH] HID: udraw-ps3: accel_limits is local to the driver

Quoted 6 lines · Jiri Kosina

From: Jiri Kosina <[email protected]>

And as such should be marked static to avoid global namespace pollution.

Yes, thanks.

Quoted 31 lines

---

I've just applied this on top of hid.git#for-4.10/udraw-ps3

 drivers/hid/hid-udraw-ps3.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-udraw- renamed from drivers/hid/hid-udraw-ps3.c +0 -0

ps3.c
index 1f68b0b..88ea390 100644

drivers/hid/hid-udraw-ps3.c +1 -1
@@ -54,7 +54,7 @@ enum {
   * Accelerometer min/max values
   * in order, X, Y and Z
   */
-struct {
+static struct {
         int min;
         int max;
  } accel_limits[] = {

--
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux- input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html