ANDROID: Revert switch mainline driver update revert

In 5.16 the switch driver got updated, yet TH broke due to outdated
tests that were added for an out-of-tree version of the switch driver.
Revert the kernel code to go back to what is in mainline as that is the
correct thing to do here.

Fixes: 8c1e859656 ("Revert "Merge 0cc82d617a ("Merge branch 'for-5.16/nintendo' into for-linus") into android-mainline"")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5c2f401dbf71607cb1edab2dcea4cb92e686f4cb
This commit is contained in:
Greg Kroah-Hartman
2021-12-21 14:35:50 +01:00
parent fb30cbed2c
commit 952bcb0e68
4 changed files with 1704 additions and 176 deletions

View File

@@ -755,6 +755,9 @@ config HID_MULTITOUCH
config HID_NINTENDO
tristate "Nintendo Joy-Con and Pro Controller support"
depends on HID
depends on NEW_LEDS
depends on LEDS_CLASS
select POWER_SUPPLY
help
Adds support for the Nintendo Switch Joy-Cons and Pro Controller.
All controllers support bluetooth, and the Pro Controller also supports
@@ -763,6 +766,16 @@ config HID_NINTENDO
To compile this driver as a module, choose M here: the
module will be called hid-nintendo.
config NINTENDO_FF
bool "Nintendo Switch controller force feedback support"
depends on HID_NINTENDO
select INPUT_FF_MEMLESS
help
Say Y here if you have a Nintendo Switch controller and want to enable
force feedback support for it. This works for both joy-cons and the pro
controller. For the pro controller, both rumble motors can be controlled
individually.
config HID_NTI
tristate "NTI keyboard adapters"
help

View File

@@ -934,6 +934,7 @@
#define USB_DEVICE_ID_NINTENDO_JOYCONL 0x2006
#define USB_DEVICE_ID_NINTENDO_JOYCONR 0x2007
#define USB_DEVICE_ID_NINTENDO_PROCON 0x2009
#define USB_DEVICE_ID_NINTENDO_CHRGGRIP 0x200E
#define USB_VENDOR_ID_NOVATEK 0x0603
#define USB_DEVICE_ID_NOVATEK_PCT 0x0600

File diff suppressed because it is too large Load Diff

View File

@@ -758,6 +758,12 @@ static void joydev_cleanup(struct joydev *joydev)
#define USB_VENDOR_ID_THQ 0x20d6
#define USB_DEVICE_ID_THQ_PS3_UDRAW 0xcb17
#define USB_VENDOR_ID_NINTENDO 0x057e
#define USB_DEVICE_ID_NINTENDO_JOYCONL 0x2006
#define USB_DEVICE_ID_NINTENDO_JOYCONR 0x2007
#define USB_DEVICE_ID_NINTENDO_PROCON 0x2009
#define USB_DEVICE_ID_NINTENDO_CHRGGRIP 0x200E
#define ACCEL_DEV(vnd, prd) \
{ \
.flags = INPUT_DEVICE_ID_MATCH_VENDOR | \
@@ -789,6 +795,10 @@ static const struct input_device_id joydev_blacklist[] = {
ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
ACCEL_DEV(USB_VENDOR_ID_THQ, USB_DEVICE_ID_THQ_PS3_UDRAW),
ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_PROCON),
ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_CHRGGRIP),
ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_JOYCONL),
ACCEL_DEV(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_JOYCONR),
{ /* sentinel */ }
};