diff options
Diffstat (limited to 'SOURCES/steam-deck.patch')
-rw-r--r-- | SOURCES/steam-deck.patch | 204 |
1 files changed, 63 insertions, 141 deletions
diff --git a/SOURCES/steam-deck.patch b/SOURCES/steam-deck.patch index 696f642..395cdd3 100644 --- a/SOURCES/steam-deck.patch +++ b/SOURCES/steam-deck.patch @@ -181,6 +181,7 @@ index 000000000000..0e504b3c2796 +MODULE_AUTHOR("Andrey Smirnov <andrew.smirnov@gmail.com>"); +MODULE_DESCRIPTION("Steam Deck EC MFD core driver"); +MODULE_LICENSE("GPL"); + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov <andrew.smirnov@gmail.com> Date: Sat, 19 Feb 2022 16:09:45 -0800 @@ -462,6 +463,7 @@ index 000000000000..fab9e9460bd4 +MODULE_AUTHOR("Andrey Smirnov <andrew.smirnov@gmail.com>"); +MODULE_DESCRIPTION("Steam Deck EC sensors driver"); +MODULE_LICENSE("GPL"); + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov <andrew.smirnov@gmail.com> Date: Sun, 27 Feb 2022 12:58:05 -0800 @@ -587,6 +589,7 @@ index 000000000000..686500b8de73 +MODULE_AUTHOR("Andrey Smirnov <andrew.smirnov@gmail.com>"); +MODULE_DESCRIPTION("Steam Deck LEDs driver"); +MODULE_LICENSE("GPL"); + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov <andrew.smirnov@gmail.com> Date: Sun, 27 Feb 2022 14:46:08 -0800 @@ -813,6 +816,7 @@ index 000000000000..74f190adc8ea +MODULE_AUTHOR("Andrey Smirnov <andrew.smirnov@gmail.com>"); +MODULE_DESCRIPTION("Steam Deck extcon driver"); +MODULE_LICENSE("GPL"); + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov <andrew.smirnov@gmail.com> Date: Sat, 15 Jul 2023 12:58:54 -0700 @@ -919,7 +923,59 @@ index fab9e9460bd4..9d0a5471b181 100644 if (IS_ERR(hwmon)) { dev_err(dev, "Failed to register HWMON device"); return PTR_ERR(hwmon); -From b899859fe49cccda9e8739d29d883dbd6dd057f3 Mon Sep 17 00:00:00 2001 + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Andrey Smirnov <andrew.smirnov@gmail.com> +Date: Sun, 24 Sep 2023 15:02:33 -0700 +Subject: [PATCH] mfd: steamdeck: Expose controller board power in sysfs + +As of version 118 Deck's BIOS implements "SCBP" method that allows +gating power of the controller board (VBUS). Add a basic WO method to +our root MFD device to allow toggling that. + +Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> +(cherry picked from commit f97f32718acc10cbb51fef925842392e80904d74) +Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> +Signed-off-by: Jan200101 <sentrycraft123@gmail.com> +--- + drivers/mfd/steamdeck.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/drivers/mfd/steamdeck.c b/drivers/mfd/steamdeck.c +index 0e504b3c2796..a60fa7db9141 100644 +--- a/drivers/mfd/steamdeck.c ++++ b/drivers/mfd/steamdeck.c +@@ -41,9 +41,29 @@ struct steamdeck { + STEAMDECK_ATTR_RO(firmware_version, "PDFW"); + STEAMDECK_ATTR_RO(board_id, "BOID"); + ++static ssize_t controller_board_power_store(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ struct steamdeck *sd = dev_get_drvdata(dev); ++ bool enabled; ++ ssize_t ret = kstrtobool(buf, &enabled); ++ ++ if (ret) ++ return ret; ++ ++ if (ACPI_FAILURE(acpi_execute_simple_method(sd->adev->handle, ++ "SCBP", enabled))) ++ return -EIO; ++ ++ return count; ++} ++static DEVICE_ATTR_WO(controller_board_power); ++ + static struct attribute *steamdeck_attrs[] = { + &dev_attr_firmware_version.attr, + &dev_attr_board_id.attr, ++ &dev_attr_controller_board_power.attr, + NULL + }; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Thu, 30 Jun 2022 18:42:10 -0700 Subject: [PATCH 01/10] USB: gadget: f_hid: Add Get-Feature report @@ -1219,7 +1275,7 @@ index 835473910a498..9754822b2a409 100644 2.41.0 -From 20ebaf7b44ff03078cf53e43306d6c5a3d0613e6 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Thu, 30 Jun 2022 18:43:10 -0700 Subject: [PATCH 02/10] USB: gadget: f_hid: Add Set-Feature report @@ -1485,7 +1541,7 @@ index c6068b4863543..54814c2c68d60 100644 2.41.0 -From 146e98d6f595e3a4e6c09a00ee9ec2d48a6703cb Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Tue, 29 Nov 2022 18:32:58 -0800 Subject: [PATCH 03/10] HID: hid-steam: Update list of identifiers from SDL @@ -1752,7 +1808,7 @@ index b110818fc9458..39a9bf3b7f77d 100644 2.41.0 -From 4b1dd1ebfd2d3f123212e1296d304909e5b3a406 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Wed, 16 Nov 2022 19:54:26 -0800 Subject: [PATCH 04/10] HID: hid-steam: Add gamepad-only mode switched to by @@ -1906,7 +1962,7 @@ index 39a9bf3b7f77d..0620046b142ef 100644 2.41.0 -From 187582492c359d56865759f120214cfe6fa4ed50 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Mon, 8 May 2023 20:24:56 -0700 Subject: [PATCH 05/10] HID: hid-steam: Clean up locking @@ -2313,7 +2369,7 @@ index 0620046b142ef..845ca71b8bd3a 100644 2.41.0 -From d4490c88bed06b4c18af4a6029d67374df5218e1 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Wed, 10 May 2023 17:27:12 -0700 Subject: [PATCH 06/10] HID: hid-steam: Make client_opened a counter @@ -2382,7 +2438,7 @@ index 845ca71b8bd3a..0c2fe51b29bc1 100644 2.41.0 -From 58a8667b251984ecc85a503c5dec3fc8f98028ff Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Vicki Pfau <vi@endrift.com> Date: Thu, 18 May 2023 18:00:35 -0700 Subject: [PATCH 07/10] HID: hid-steam: Better handling of serial number length @@ -2439,137 +2495,3 @@ index 0c2fe51b29bc1..92e3e1052fa42 100644 return ret; -- 2.41.0 - - -From 7460867bd78651a6187ac44c73d1be653c09973b Mon Sep 17 00:00:00 2001 -From: Vicki Pfau <vi@endrift.com> -Date: Fri, 24 Mar 2023 10:42:27 -0700 -Subject: [PATCH 08/10] Input: xpad - fix support for some third-party - controllers - -Some third-party controllers, such as the HORPIAD FPS for Nintendo Switch and -Gamesir-G3w, require a specific packet that the first-party XInput driver sends -before it will start sending reports. It's not currently known what this packet -does, but since the first-party driver always sends it's unlikely that this -could cause issues with existing controllers. - -Co-authored-by: Andrey Smirnov <andrew.smirnov@gmail.com> -Signed-off-by: Vicki Pfau <vi@endrift.com> -Link: https://lore.kernel.org/r/20230324040446.3487725-3-vi@endrift.com -Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> ---- - drivers/input/joystick/xpad.c | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c -index cdb193317c3b6..fc680b45f936e 100644 ---- a/drivers/input/joystick/xpad.c -+++ b/drivers/input/joystick/xpad.c -@@ -264,6 +264,7 @@ static const struct xpad_device { - { 0x0f0d, 0x0067, "HORIPAD ONE", 0, XTYPE_XBOXONE }, - { 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, - { 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, -+ { 0x0f0d, 0x00dc, "HORIPAD FPS for Nintendo Switch", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, - { 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX }, - { 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX }, - { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX }, -@@ -1720,6 +1721,27 @@ static int xpad_start_input(struct usb_xpad *xpad) - return error; - } - } -+ if (xpad->xtype == XTYPE_XBOX360) { -+ /* -+ * Some third-party controllers Xbox 360-style controllers -+ * require this message to finish initialization. -+ */ -+ u8 dummy[20]; -+ -+ error = usb_control_msg_recv(xpad->udev, 0, -+ /* bRequest */ 0x01, -+ /* bmRequestType */ -+ USB_TYPE_VENDOR | USB_DIR_IN | -+ USB_RECIP_INTERFACE, -+ /* wValue */ 0x100, -+ /* wIndex */ 0x00, -+ dummy, sizeof(dummy), -+ 25, GFP_KERNEL); -+ if (error) -+ dev_warn(&xpad->dev->dev, -+ "unable to receive magic message: %d\n", -+ error); -+ } - - return 0; - } --- -2.41.0 - - -From 469ab7efd0383f60e83c086347526273ed1d1a33 Mon Sep 17 00:00:00 2001 -From: Timothee Besset <ttimo@valvesoftware.com> -Date: Mon, 22 May 2023 20:25:57 -0500 -Subject: [PATCH 09/10] Input: xpad - Add GameSir VID for Xbox One controllers - -Co-authored-by: Sam Lantinga <saml@valvesoftware.com> -Signed-off-by: Sam Lantinga <slouken@libsdl.org> -Signed-off-by: Vicki Pfau <vi@endrift.com> ---- - drivers/input/joystick/xpad.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c -index fc680b45f936e..bb2f69faa2a81 100644 ---- a/drivers/input/joystick/xpad.c -+++ b/drivers/input/joystick/xpad.c -@@ -500,6 +500,7 @@ static const struct usb_device_id xpad_table[] = { - XPAD_XBOX360_VENDOR(0x2f24), /* GameSir controllers */ - XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */ - XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ -+ XPAD_XBOXONE_VENDOR(0x3537), /* GameSir Controllers */ - { } - }; - --- -2.41.0 - - -From 4fd74c574f8554056facabd4e36e5e397f2e6b98 Mon Sep 17 00:00:00 2001 -From: Jonathan Frederick <doublej472@gmail.com> -Date: Fri, 7 Jul 2023 15:11:33 -0700 -Subject: [PATCH 10/10] Input: xpad - add GameSir T4 Kaleid Controller support - -Add VID and PID to the xpad_device table to allow driver -to use the GameSir T4 Kaleid Controller, which is -XTYPE_XBOX360 compatible in xinput mode. - -Signed-off-by: Jonathan Frederick <doublej472@gmail.com> -Link: https://lore.kernel.org/r/ZKeKSbP3faIPv5jB@dbj-hp-flip -Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> ---- - drivers/input/joystick/xpad.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c -index bb2f69faa2a81..ede380551e55c 100644 ---- a/drivers/input/joystick/xpad.c -+++ b/drivers/input/joystick/xpad.c -@@ -366,6 +366,7 @@ static const struct xpad_device { - { 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 }, - { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 }, - { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 }, -+ { 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 }, - { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, - { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, - { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } -@@ -500,6 +501,7 @@ static const struct usb_device_id xpad_table[] = { - XPAD_XBOX360_VENDOR(0x2f24), /* GameSir controllers */ - XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */ - XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ -+ XPAD_XBOX360_VENDOR(0x3537), /* GameSir Controllers */ - XPAD_XBOXONE_VENDOR(0x3537), /* GameSir Controllers */ - { } - }; --- -2.41.0 - - |