Unverified Commit 0da9a3f9 authored by Ilpo Järvinen's avatar Ilpo Järvinen
Browse files

Merge branch 'fixes' into 'for-next'

Merged the 'fixes' branch into the 'for-next' branch to resolve
a conflict in alienware-wmi zone teardown code.
parents 3ef4ea51 59616a91
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -445,8 +445,10 @@ event code Key Notes
0x1008	0x07	FN+F8		IBM: toggle screen expand
				Lenovo: configure UltraNav,
				or toggle screen expand.
				On newer platforms (2024+)
				replaced by 0x131f (see below)
				On 2024 platforms replaced by
				0x131f (see below) and on newer
				platforms (2025 +) keycode is
				replaced by 0x1401 (see below).

0x1009	0x08	FN+F9		-

@@ -506,9 +508,11 @@ event code Key Notes

0x1019	0x18	unknown

0x131f	...	FN+F8	        Platform Mode change.
0x131f	...	FN+F8		Platform Mode change (2024 systems).
				Implemented in driver.

0x1401	...	FN+F8		Platform Mode change (2025 + systems).
				Implemented in driver.
...	...	...

0x1020	0x1F	unknown
+7 −1
Original line number Diff line number Diff line
@@ -778,6 +778,10 @@ static int amd_pmc_suspend_handler(struct device *dev)
{
	struct amd_pmc_dev *pdev = dev_get_drvdata(dev);

	/*
	 * Must be called only from the same set of dev_pm_ops handlers
	 * as i8042_pm_suspend() is called: currently just from .suspend.
	 */
	if (pdev->disable_8042_wakeup && !disable_workarounds) {
		int rc = amd_pmc_wa_irq1(pdev);

@@ -790,7 +794,9 @@ static int amd_pmc_suspend_handler(struct device *dev)
	return 0;
}

static DEFINE_SIMPLE_DEV_PM_OPS(amd_pmc_pm, amd_pmc_suspend_handler, NULL);
static const struct dev_pm_ops amd_pmc_pm = {
	.suspend = amd_pmc_suspend_handler,
};

static const struct pci_device_id pmc_pci_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PS) },
+1 −0
Original line number Diff line number Diff line
@@ -624,6 +624,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
	{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
	{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
	{ KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
	{ KE_IGNORE, 0xCF, },	/* AC mode */
	{ KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip action */
	{ KE_KEY, 0xBD, { KEY_PROG2 } },           /* Lid flip action on ROG xflow laptops */
	{ KE_END, 0},
+2 −9
Original line number Diff line number Diff line
@@ -3696,7 +3696,6 @@ static int asus_wmi_custom_fan_curve_init(struct asus_wmi *asus)
/* Throttle thermal policy ****************************************************/
static int throttle_thermal_policy_write(struct asus_wmi *asus)
{
	u32 retval;
	u8 value;
	int err;

@@ -3718,8 +3717,8 @@ static int throttle_thermal_policy_write(struct asus_wmi *asus)
		value = asus->throttle_thermal_policy_mode;
	}

	err = asus_wmi_set_devstate(asus->throttle_thermal_policy_dev,
				    value, &retval);
	/* Some machines do not return an error code as a result, so we ignore it */
	err = asus_wmi_set_devstate(asus->throttle_thermal_policy_dev, value, NULL);

	sysfs_notify(&asus->platform_device->dev.kobj, NULL,
			"throttle_thermal_policy");
@@ -3729,12 +3728,6 @@ static int throttle_thermal_policy_write(struct asus_wmi *asus)
		return err;
	}

	if (retval != 1) {
		pr_warn("Failed to set throttle thermal policy (retval): 0x%x\n",
			retval);
		return -EIO;
	}

	/* Must set to disabled if mode is toggled */
	if (asus->cpu_fan_curve_available)
		asus->custom_fan_curves[FAN_CURVE_DEV_CPU].enabled = false;
+19 −5
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ static struct quirk_entry quirk_asm201 = {
};

static struct quirk_entry quirk_g_series = {
	.num_zones = 2,
	.num_zones = 0,
	.hdmi_mux = 0,
	.amplifier = 0,
	.deepslp = 0,
@@ -199,7 +199,7 @@ static struct quirk_entry quirk_g_series = {
};

static struct quirk_entry quirk_x_series = {
	.num_zones = 2,
	.num_zones = 0,
	.hdmi_mux = 0,
	.amplifier = 0,
	.deepslp = 0,
@@ -241,6 +241,15 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
		},
		.driver_data = &quirk_asm201,
	},
	{
		.callback = dmi_matched,
		.ident = "Alienware m16 R1 AMD",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
		},
		.driver_data = &quirk_x_series,
	},
	{
		.callback = dmi_matched,
		.ident = "Alienware m17 R5",
@@ -689,6 +698,9 @@ static int alienware_zone_init(struct platform_device *dev)

static void alienware_zone_exit(struct platform_device *dev)
{
	if (!quirks->num_zones)
		return;

	led_classdev_unregister(&global_led);
}

@@ -1205,9 +1217,11 @@ static int __init alienware_wmi_init(void)
			goto fail_prep_thermal_profile;
	}

	if (quirks->num_zones > 0) {
		ret = alienware_zone_init(platform_device);
		if (ret)
			goto fail_prep_zones;
	}

	return 0;

Loading