Skip to content

Commit

Permalink
Remove Ally X support
Browse files Browse the repository at this point in the history
This commit is to consolidate the removal of Ally X support code.
  • Loading branch information
uejji committed Sep 5, 2024
1 parent 42f1573 commit ff0135a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 62 deletions.
67 changes: 7 additions & 60 deletions PKGBUILD/linux/0021-rog-ally-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ diff -rupN linux-6.10.7.orig/drivers/platform/x86/asus-wmi.h linux-6.10.7/driver

#define ASUS_WMI_KEY_IGNORE (-1)
#define ASUS_WMI_BRN_DOWN 0x2e
@@ -85,4 +86,24 @@ struct asus_wmi_driver {
@@ -85,4 +86,19 @@ struct asus_wmi_driver {
int asus_wmi_register_driver(struct asus_wmi_driver *driver);
void asus_wmi_unregister_driver(struct asus_wmi_driver *driver);

Expand All @@ -294,11 +294,6 @@ diff -rupN linux-6.10.7.orig/drivers/platform/x86/asus-wmi.h linux-6.10.7/driver
+ },
+ .driver_data = (void *)(ASUS_ROG_ALLY_NO_POWERSAVE),
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_NAME, "RC72L"),
+ },
+ },
+ { },
+};
+
Expand Down Expand Up @@ -334,26 +329,25 @@ diff -rupN linux-6.10.7.orig/include/linux/platform_data/x86/asus-wmi.h linux-6.
diff -rupN linux-6.10.7.orig/drivers/hid/hid-asus.c linux-6.10.7/drivers/hid/hid-asus.c
--- linux-6.10.7.orig/drivers/hid/hid-asus.c 2024-08-29 15:36:13.000000000 +0000
+++ linux-6.10.7/drivers/hid/hid-asus.c 2024-09-03 05:45:58.091476188 +0000
@@ -52,6 +52,10 @@ MODULE_DESCRIPTION("Asus HID Keyboard an
@@ -52,6 +52,9 @@ MODULE_DESCRIPTION("Asus HID Keyboard an
#define FEATURE_KBD_LED_REPORT_ID1 0x5d
#define FEATURE_KBD_LED_REPORT_ID2 0x5e

+#define ALLY_CFG_INTF_IN_ADDRESS 0x83
+#define ALLY_CFG_INTF_OUT_ADDRESS 0x04
+#define ALLY_X_INTERFACE_ADDRESS 0x87
+
#define SUPPORT_KBD_BACKLIGHT BIT(0)

#define MAX_TOUCH_MAJOR 8
@@ -84,6 +88,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard an
@@ -84,6 +87,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard an
#define QUIRK_MEDION_E1239T BIT(10)
#define QUIRK_ROG_NKEY_KEYBOARD BIT(11)
#define QUIRK_ROG_CLAYMORE_II_KEYBOARD BIT(12)
+#define QUIRK_ROG_ALLY_XPAD BIT(13)

#define I2C_KEYBOARD_QUIRKS (QUIRK_FIX_NOTEBOOK_REPORT | \
QUIRK_NO_INIT_REPORTS | \
@@ -492,12 +497,19 @@ static void asus_kbd_backlight_work(stru
@@ -492,12 +496,19 @@ static void asus_kbd_backlight_work(stru
*/
static bool asus_kbd_wmi_led_control_present(struct hid_device *hdev)
{
Expand All @@ -373,7 +367,7 @@ diff -rupN linux-6.10.7.orig/drivers/hid/hid-asus.c linux-6.10.7/drivers/hid/hid
ret = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS,
ASUS_WMI_DEVID_KBD_BACKLIGHT, 0, &value);
hid_dbg(hdev, "WMI backlight check: rc %d value %x", ret, value);
@@ -996,6 +1008,17 @@ static int asus_probe(struct hid_device
@@ -996,6 +1007,16 @@ static int asus_probe(struct hid_device

drvdata->quirks = id->driver_data;

Expand All @@ -382,67 +376,20 @@ diff -rupN linux-6.10.7.orig/drivers/hid/hid-asus.c linux-6.10.7/drivers/hid/hid
+ struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
+ struct usb_host_endpoint *ep = intf->cur_altsetting->endpoint;
+
+ if (ep->desc.bEndpointAddress == ALLY_X_INTERFACE_ADDRESS ||
+ ep->desc.bEndpointAddress == ALLY_CFG_INTF_IN_ADDRESS ||
+ if (ep->desc.bEndpointAddress == ALLY_CFG_INTF_IN_ADDRESS ||
+ ep->desc.bEndpointAddress == ALLY_CFG_INTF_OUT_ADDRESS)
+ return -ENODEV;
+ }
+
/*
* T90CHI's keyboard dock returns same ID values as T100CHI's dock.
* Thus, identify T90CHI dock with product name string.
@@ -1247,7 +1270,10 @@ static const struct hid_device_id asus_d
@@ -1247,7 +1268,7 @@ static const struct hid_device_id asus_d
QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_ROG_NKEY_ALLY),
- QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD },
+ QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD | QUIRK_ROG_ALLY_XPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
+ USB_DEVICE_ID_ASUSTEK_ROG_NKEY_ALLY_X),
+ QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD | QUIRK_ROG_ALLY_XPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_ROG_CLAYMORE_II_KEYBOARD),
QUIRK_ROG_CLAYMORE_II_KEYBOARD },
diff -rupN linux-6.10.7.orig/drivers/hid/hid-ids.h linux-6.10.7/drivers/hid/hid-ids.h
--- linux-6.10.7.orig/drivers/hid/hid-ids.h 2024-08-29 15:36:13.000000000 +0000
+++ linux-6.10.7/drivers/hid/hid-ids.h 2024-09-03 16:49:24.146138822 +0000
@@ -210,6 +210,7 @@
#define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD3 0x1a30
#define USB_DEVICE_ID_ASUSTEK_ROG_Z13_LIGHTBAR 0x18c6
#define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_ALLY 0x1abe
+#define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_ALLY_X 0x1b4c
#define USB_DEVICE_ID_ASUSTEK_ROG_CLAYMORE_II_KEYBOARD 0x196b
#define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869

diff -rupN linux-6.10.7.orig/sound/pci/hda/patch_realtek.c linux-6.10.7/sound/pci/hda/patch_realtek.c
--- linux-6.10.7.orig/sound/pci/hda/patch_realtek.c 2024-08-29 15:36:13.000000000 +0000
+++ linux-6.10.7/sound/pci/hda/patch_realtek.c 2024-09-03 04:55:54.430568961 +0000
@@ -7408,6 +7408,7 @@ enum {
ALC285_FIXUP_THINKPAD_X1_GEN7,
ALC285_FIXUP_THINKPAD_HEADSET_JACK,
ALC294_FIXUP_ASUS_ALLY,
+ ALC294_FIXUP_ASUS_ALLY_X,
ALC294_FIXUP_ASUS_ALLY_PINS,
ALC294_FIXUP_ASUS_ALLY_VERBS,
ALC294_FIXUP_ASUS_ALLY_SPEAKER,
@@ -8874,6 +8875,12 @@ static const struct hda_fixup alc269_fix
.chained = true,
.chain_id = ALC294_FIXUP_ASUS_ALLY_PINS
},
+ [ALC294_FIXUP_ASUS_ALLY_X] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = tas2781_fixup_i2c,
+ .chained = true,
+ .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS
+ },
[ALC294_FIXUP_ASUS_ALLY_PINS] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
@@ -10306,6 +10313,7 @@ static const struct snd_pci_quirk alc269
SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY),
+ SND_PCI_QUIRK(0x1043, 0x1eb3, "ROG Ally X RC72LA", ALC294_FIXUP_ASUS_ALLY_X),
SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),

This file was deleted.

0 comments on commit ff0135a

Please sign in to comment.