From: "Luke D. Jones" <luke@ljones.dev>
To: linux-kernel@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org,
ilpo.jarvinen@linux.intel.com, hdegoede@redhat.com,
corentin.chary@gmail.com, superm1@kernel.org,
"Luke D. Jones" <luke@ljones.dev>
Subject: [PATCH 2/3] Revert "platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend"
Date: Thu, 26 Sep 2024 21:53:43 +1200 [thread overview]
Message-ID: <20240926095344.1291013-3-luke@ljones.dev> (raw)
In-Reply-To: <20240926095344.1291013-1-luke@ljones.dev>
This reverts commit e0894ff038d86f30614ec16ec26dacb88c8d2bd4.
This is part of some hacks that are no-longer required when users have
updated their MCU firmware to the latest version:
- Ally 1: v319
- Ally X: v313
Signed-off-by: Luke D. Jones <luke@ljones.dev>
---
drivers/platform/x86/asus-wmi.c | 40 ---------------------------------
1 file changed, 40 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 8daefd9a0d94..27b9fa2c29ae 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -16,7 +16,6 @@
#include <linux/acpi.h>
#include <linux/backlight.h>
#include <linux/debugfs.h>
-#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/fb.h>
#include <linux/hwmon.h>
@@ -4962,43 +4961,6 @@ static int asus_hotk_resume(struct device *device)
asus_wmi_fnlock_update(asus);
asus_wmi_tablet_mode_get_state(asus);
-
- return 0;
-}
-
-static int asus_hotk_resume_early(struct device *device)
-{
- struct asus_wmi *asus = dev_get_drvdata(device);
-
- if (asus->ally_mcu_usb_switch) {
- if (ACPI_FAILURE(acpi_execute_simple_method(NULL, ASUS_USB0_PWR_EC0_CSEE, 0xB8)))
- dev_err(device, "ROG Ally MCU failed to connect USB dev\n");
- else
- msleep(ASUS_USB0_PWR_EC0_CSEE_WAIT);
- }
- return 0;
-}
-
-static int asus_hotk_prepare(struct device *device)
-{
- struct asus_wmi *asus = dev_get_drvdata(device);
- int result, err;
-
- if (asus->ally_mcu_usb_switch) {
- /* When powersave is enabled it causes many issues with resume of USB hub */
- result = asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_MCU_POWERSAVE);
- if (result == 1) {
- dev_warn(device, "MCU powersave enabled, disabling to prevent resume issues");
- err = asus_wmi_set_devstate(ASUS_WMI_DEVID_MCU_POWERSAVE, 0, &result);
- if (err || result != 1)
- dev_err(device, "Failed to set MCU powersave mode: %d\n", err);
- }
- /* sleep required to ensure USB0 is disabled before sleep continues */
- if (ACPI_FAILURE(acpi_execute_simple_method(NULL, ASUS_USB0_PWR_EC0_CSEE, 0xB7)))
- dev_err(device, "ROG Ally MCU failed to disconnect USB dev\n");
- else
- msleep(ASUS_USB0_PWR_EC0_CSEE_WAIT);
- }
return 0;
}
@@ -5046,8 +5008,6 @@ static const struct dev_pm_ops asus_pm_ops = {
.thaw = asus_hotk_thaw,
.restore = asus_hotk_restore,
.resume = asus_hotk_resume,
- .resume_early = asus_hotk_resume_early,
- .prepare = asus_hotk_prepare,
};
/* Registration ***************************************************************/
--
2.46.1
next prev parent reply other threads:[~2024-09-26 9:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 9:53 [PATCH 0/3] platfom/x86: asus-wmi: revert ROG Ally quirks Luke D. Jones
2024-09-26 9:53 ` [PATCH 1/3] Revert "platform/x86: asus-wmi: ROG Ally increase wait time, allow MCU powersave" Luke D. Jones
2024-09-26 9:53 ` Luke D. Jones [this message]
2024-09-26 9:53 ` [PATCH 3/3] platfom/x86: asus-wmi: cleanup after Ally quirk reverts Luke D. Jones
2024-09-28 20:56 ` kernel test robot
2024-09-26 13:36 ` [PATCH 0/3] platfom/x86: asus-wmi: revert ROG Ally quirks Mario Limonciello
2024-10-02 8:12 ` Luke Jones
2024-10-05 14:37 ` Hans de Goede
2024-10-05 19:48 ` Luke Jones
2024-10-05 21:59 ` Hans de Goede
2024-10-08 0:03 ` Luke Jones
2024-10-08 1:53 ` Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240926095344.1291013-3-luke@ljones.dev \
--to=luke@ljones.dev \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=superm1@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®