Skip to content

Commit 5a57b48

Browse files
committed
Merge tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Hans de Goede: - Fix a regression in ideapad-laptop which caused the touchpad to stop working after a suspend/resume on some models - One other small fix and three hw-id additions * tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix
2 parents 916fc60 + e3271a5 commit 5a57b48

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

drivers/platform/x86/asus-nb-wmi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ static const struct dmi_system_id asus_quirks[] = {
464464
.ident = "ASUS ROG FLOW X13",
465465
.matches = {
466466
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
467-
DMI_MATCH(DMI_PRODUCT_NAME, "GV301Q"),
467+
/* Match GV301** */
468+
DMI_MATCH(DMI_PRODUCT_NAME, "GV301"),
468469
},
469470
.driver_data = &quirk_asus_tablet_mode,
470471
},

drivers/platform/x86/gigabyte-wmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
151151
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550I AORUS PRO AX"),
152152
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M AORUS PRO-P"),
153153
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M DS3H"),
154+
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B650 AORUS ELITE AX"),
154155
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B660 GAMING X DDR4"),
155156
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B660I AORUS PRO DDR4"),
156157
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z390 I AORUS PRO WIFI-CF"),
@@ -160,6 +161,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
160161
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 GAMING X"),
161162
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 I AORUS PRO WIFI"),
162163
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 UD"),
164+
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570S AORUS ELITE"),
163165
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z690M AORUS ELITE AX DDR4"),
164166
{ }
165167
};

drivers/platform/x86/ideapad-laptop.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,6 @@ static const struct key_entry ideapad_keymap[] = {
11701170
{ KE_KEY, 65, { KEY_PROG4 } },
11711171
{ KE_KEY, 66, { KEY_TOUCHPAD_OFF } },
11721172
{ KE_KEY, 67, { KEY_TOUCHPAD_ON } },
1173-
{ KE_KEY, 68, { KEY_TOUCHPAD_TOGGLE } },
11741173
{ KE_KEY, 128, { KEY_ESC } },
11751174

11761175
/*
@@ -1526,18 +1525,16 @@ static void ideapad_sync_touchpad_state(struct ideapad_private *priv, bool send_
15261525
if (priv->features.ctrl_ps2_aux_port)
15271526
i8042_command(&param, value ? I8042_CMD_AUX_ENABLE : I8042_CMD_AUX_DISABLE);
15281527

1529-
if (send_events) {
1530-
/*
1531-
* On older models the EC controls the touchpad and toggles it
1532-
* on/off itself, in this case we report KEY_TOUCHPAD_ON/_OFF.
1533-
* If the EC did not toggle, report KEY_TOUCHPAD_TOGGLE.
1534-
*/
1535-
if (value != priv->r_touchpad_val) {
1536-
ideapad_input_report(priv, value ? 67 : 66);
1537-
sysfs_notify(&priv->platform_device->dev.kobj, NULL, "touchpad");
1538-
} else {
1539-
ideapad_input_report(priv, 68);
1540-
}
1528+
/*
1529+
* On older models the EC controls the touchpad and toggles it on/off
1530+
* itself, in this case we report KEY_TOUCHPAD_ON/_OFF. Some models do
1531+
* an acpi-notify with VPC bit 5 set on resume, so this function get
1532+
* called with send_events=true on every resume. Therefor if the EC did
1533+
* not toggle, do nothing to avoid sending spurious KEY_TOUCHPAD_TOGGLE.
1534+
*/
1535+
if (send_events && value != priv->r_touchpad_val) {
1536+
ideapad_input_report(priv, value ? 67 : 66);
1537+
sysfs_notify(&priv->platform_device->dev.kobj, NULL, "touchpad");
15411538
}
15421539

15431540
priv->r_touchpad_val = value;

drivers/platform/x86/intel/pmc/core.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,18 @@ static inline void pmc_core_reg_write(struct pmc_dev *pmcdev, int reg_offset,
6666

6767
static inline u64 pmc_core_adjust_slp_s0_step(struct pmc_dev *pmcdev, u32 value)
6868
{
69-
return (u64)value * pmcdev->map->slp_s0_res_counter_step;
69+
/*
70+
* ADL PCH does not have the SLP_S0 counter and LPM Residency counters are
71+
* used as a workaround which uses 30.5 usec tick. All other client
72+
* programs have the legacy SLP_S0 residency counter that is using the 122
73+
* usec tick.
74+
*/
75+
const int lpm_adj_x2 = pmcdev->map->lpm_res_counter_step_x2;
76+
77+
if (pmcdev->map == &adl_reg_map)
78+
return (u64)value * GET_X2_COUNTER((u64)lpm_adj_x2);
79+
else
80+
return (u64)value * pmcdev->map->slp_s0_res_counter_step;
7081
}
7182

7283
static int set_etr3(struct pmc_dev *pmcdev)

0 commit comments

Comments
 (0)