Skip to contentSkip to conversation

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

PATCH Superseded Bastien Nocera 2 participants 6 messages Nov 4, 2016 – Nov 15, 2016 HID

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 HID: udraw: 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.c | 474 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 492 insertions(+)
 create mode 100644 drivers/hid/hid-udraw.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..88c831e 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
+	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..d0d9b34 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)		+= hid-udraw.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.c new file +474 -0

474 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 10 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).

Hi Bastien,

overall the driver looks ok to me, thanks. Probably the only concern I'd have -- traditionally, we've always been naming drivers by the vendor, as it turned out that over time they get extended by adding support for multiple devices with the same vendor, and usually there is quite some overlap in shared code.

Hence I'd propose to call this driver hid-thq (if that's really the vendor's proper name, doesn't seem to be present in latest usb.ids release).

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 15 lines · Jiri Kosina
Quoted 10 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).

Hi Bastien,

Quoted 8 lines

overall the driver looks ok to me, thanks. Probably the only concern I'd
have -- traditionally, we've always been naming drivers by the vendor, as
it turned out that over time they get extended by adding support for multiple devices with the same vendor, and usually there is quite some
overlap in shared code.

In that particular case, I'd rather it got renamed to "hid-udraw-ps3" in this case. The XBox 360 and Wii versions use completely different protocols:
http://brandonw.net/udraw/

The XBox 360 version is more likely to be integrated in with other XBox pads, and the Wii version along with other Wii Bluetooth remotes.

Quoted 3 lines

Hence I'd propose to call this driver hid-thq (if that's really the vendor's proper name, doesn't seem to be present in latest usb.ids release).

THQ went under in 2012, as a result of making too many of those drawing tablets:
https://en.wikipedia.org/wiki/THQ

I'm fine with it either way. Just let me know which one you prefer.

Cheers

#3 lore raw
Quoted 2 lines · Bastien Nocera
Quoted 1 line · Jiri Kosina

<snip>

Quoted 27 lines
Quoted 12 lines

Hi Bastien,

overall the driver looks ok to me, thanks. Probably the only concern
I'd
have -- traditionally, we've always been naming drivers by the vendor, as
it turned out that over time they get extended by adding support for
multiple devices with the same vendor, and usually there is quite some
overlap in shared code.

In that particular case, I'd rather it got renamed to "hid-udraw-ps3" in this case. The XBox 360 and Wii versions use completely different protocols:
http://brandonw.net/udraw/

The XBox 360 version is more likely to be integrated in with other XBox
pads, and the Wii version along with other Wii Bluetooth remotes.

Quoted 4 lines

Hence I'd propose to call this driver hid-thq (if that's really the
vendor's proper name, doesn't seem to be present in latest usb.ids release).

Quoted 6 lines

THQ went under in 2012, as a result of making too many of those drawing
tablets:
https://en.wikipedia.org/wiki/THQ

I'm fine with it either way. Just let me know which one you prefer.

So, any preference? The sooner you make that choice, the sooner I can send an updated patch and push this into my distribution's kernel. I have a machine waiting on the hardware driver for control :)

Cheers

maintainer
#4 lore raw
In reply to Bastien Nocera
Quoted 7 lines · Bastien Nocera

In that particular case, I'd rather it got renamed to "hid-udraw-ps3" in this case. The XBox 360 and Wii versions use completely different protocols:
http://brandonw.net/udraw/

The XBox 360 version is more likely to be integrated in with other XBox pads, and the Wii version along with other Wii Bluetooth remotes.

Makes the most sense to me. Could you please refresh the patch so that it names the driver 'hid-udraw-ps3'? I'll then queue it for 4.10.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#5 lore raw
Quoted 10 lines · Jiri Kosina
Quoted 1 line · Bastien Nocera

In that particular case, I'd rather it got renamed to "hid-udraw-

ps3"

Quoted 1 line

in this case. The XBox 360 and Wii versions use completely

different

Quoted 4 lines

protocols:
http://brandonw.net/udraw/

The XBox 360 version is more likely to be integrated in with other

Quoted 6 lines

XBox

Quoted 1 line

pads, and the Wii version along with other Wii Bluetooth remotes.

Makes the most sense to me. Could you please refresh the patch so that it
names the driver 'hid-udraw-ps3'? I'll then queue it for 4.10.

Sent as v3, thanks.