linux (RPi): update Ouya patch

This commit is contained in:
MilhouseVH 2018-06-11 19:57:16 +01:00
parent 9c2e2382f0
commit d64b9ef01a

View File

@ -1,27 +1,20 @@
From fde8c33acb5aabfc6143bff06ffcd241258fcbc4 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Sun, 6 May 2018 22:03:11 -0700
Subject: [PATCH] HID: add ouya HID driver
commit 5a596921a4636e62843a59b7eab7b87b70a6d296
Author: Lukas Rusak <lorusak@gmail.com>
Date: Sun May 6 22:03:11 2018 -0700
This driver is a simple implementation to get the controller working and mapped properly.
This driver does not include functionality for the touchpad (yet). The original driver
was taken from from the ouya linux tree and has been simplified. It seems there may have
been other versions of the controller present that had a broken report descriptor. I have
removed that for now.
---
drivers/hid/Kconfig | 6 ++
drivers/hid/Makefile | 1 +
drivers/hid/hid-core.c | 3 +
drivers/hid/hid-ids.h | 3 +
drivers/hid/hid-ouya.c | 131 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 144 insertions(+)
create mode 100644 drivers/hid/hid-ouya.c
HID: add ouya HID driver
This driver is a simple implementation to get the controller working and mapped properly.
This driver does not include functionality for the touchpad (yet). The original driver
was taken from from the ouya linux tree and has been simplified. It seems there may have
been other versions of the controller present that had a broken report descriptor. I have
removed that for now.
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 374301fcbc86..7c7d7a5d5b98 100644
index 60252fd796f6..6be2c454e72e 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -633,6 +633,12 @@ config HID_ORTEK
@@ -659,6 +659,12 @@ config HID_ORTEK
- Ortek WKB-2000
- Skycable wireless presenter
@ -35,10 +28,10 @@ index 374301fcbc86..7c7d7a5d5b98 100644
tristate "Pantherlord/GreenAsia game controller"
depends on HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 235bd2a7b333..d3431f77b743 100644
index 17a8bd97da9d..4425890934e4 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -68,6 +68,7 @@ obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
obj-$(CONFIG_HID_NTI) += hid-nti.o
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
@ -46,25 +39,11 @@ index 235bd2a7b333..d3431f77b743 100644
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 330ca983828b..3a1d94bc1ea6 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2222,6 +2222,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
#endif
+#if IS_ENABLED(CONFIG_HID_OUYA)
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
+#endif
#if IS_ENABLED(CONFIG_HID_PANTHERLORD)
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index be2e005c3c51..21732ac85740 100644
index 0b5cc910f62e..0528efb825fa 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -833,6 +833,9 @@
@@ -859,6 +859,9 @@
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
#define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003
@ -211,6 +190,17 @@ index 000000000000..4344a47b40af
+MODULE_AUTHOR("Lukas Rusak <lorusak@gmail.com>");
+MODULE_AUTHOR("Gregorios Leach <optikflux@gmail.com>");
+MODULE_DESCRIPTION("Ouya Controller Driver");
--
2.17.0
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 587e2681a53f..b5adc13e0df1 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
#endif
+#if IS_ENABLED(CONFIG_HID_OUYA)
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
+#endif
#if IS_ENABLED(CONFIG_HID_PANTHERLORD)
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },