mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
platform-drivers-x86 for v6.1-4
Highlights: - Surface Pro 9 and Surface Laptop 5 kbd, battery, etc. support (this is just a few hw-id additions) - A couple of other hw-id / DMI-quirk additions - A few small bug fixes + 1 build fix The following is an automated git shortlog grouped by driver: acer-wmi: - Enable SW_TABLET_MODE on Switch V 10 (SW5-017) asus-wmi: - add missing pci_dev_put() in asus_wmi_set_xusb2pr() hp-wmi: - Ignore Smart Experience App event ideapad-laptop: - Add module parameters to match DMI quirk tables - Fix interrupt storm on fn-lock toggle on some Yoga laptops platform/surface: - aggregator_registry: Add support for Surface Laptop 5 - aggregator_registry: Add support for Surface Pro 9 - aggregator: Do not check for repeated unsequenced packets platform/x86/amd: - pmc: Add new ACPI ID AMDI0009 - pmc: Remove more CONFIG_DEBUG_FS checks platform/x86/intel: - pmc: Don't unconditionally attach Intel PMC when virtualized thinkpad_acpi: - Enable s2idle quirk for 21A1 machine type -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmN0vq4UHGhkZWdvZWRl QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9yRQQgAmget34TuVhzBTUmXLxwSGbgcjbSb GN6ir81p6R0XJ4/lHT3xKmfU3KXOd3CxGcIXAnyhmFKQxcwUAlWmzvQQja9Gz5oR 7eg45Hd10Hi4iswlIvSDejYToQRPcE5POW4FbHsYvqh8jWaYuDSlw0KekLwDZWnQ leRtM+YzYCt3jDaOeFYfb4NtAU9lDzALeCA2myqXLfS5X1X+fKwsbsM0vZS5T/C5 YF/fdSqpHXssVRsggPTrNeHhOb3v9M5UjVt8apqR5D+4cmQxnMizpF/rYmI7P3fZ OJCwv/3XvN6RecSMS5LK4/4fOvCM57/W8oO3YEmc6xNR4/em34Sm5dTgRg== =iPTF -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Surface Pro 9 and Surface Laptop 5 kbd, battery, etc support (this is just a few hw-id additions) - A couple of other hw-id / DMI-quirk additions - A few small bug fixes + 1 build fix * tag 'platform-drivers-x86-v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: ideapad-laptop: Add module parameters to match DMI quirk tables platform/x86: ideapad-laptop: Fix interrupt storm on fn-lock toggle on some Yoga laptops platform/x86: hp-wmi: Ignore Smart Experience App event platform/surface: aggregator_registry: Add support for Surface Laptop 5 platform/surface: aggregator_registry: Add support for Surface Pro 9 platform/surface: aggregator: Do not check for repeated unsequenced packets platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017) platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr() platform/x86/intel: pmc: Don't unconditionally attach Intel PMC when virtualized platform/x86: thinkpad_acpi: Enable s2idle quirk for 21A1 machine type platform/x86/amd: pmc: Add new ACPI ID AMDI0009 platform/x86/amd: pmc: Remove more CONFIG_DEBUG_FS checks
This commit is contained in:
commit
941209ef89
@ -1596,16 +1596,32 @@ static void ssh_ptl_timeout_reap(struct work_struct *work)
|
||||
ssh_ptl_tx_wakeup_packet(ptl);
|
||||
}
|
||||
|
||||
static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq)
|
||||
static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, const struct ssh_frame *frame)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Ignore unsequenced packets. On some devices (notably Surface Pro 9),
|
||||
* unsequenced events will always be sent with SEQ=0x00. Attempting to
|
||||
* detect retransmission would thus just block all events.
|
||||
*
|
||||
* While sequence numbers would also allow detection of retransmitted
|
||||
* packets in unsequenced communication, they have only ever been used
|
||||
* to cover edge-cases in sequenced transmission. In particular, the
|
||||
* only instance of packets being retransmitted (that we are aware of)
|
||||
* is due to an ACK timeout. As this does not happen in unsequenced
|
||||
* communication, skip the retransmission check for those packets
|
||||
* entirely.
|
||||
*/
|
||||
if (frame->type == SSH_FRAME_TYPE_DATA_NSQ)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Check if SEQ has been seen recently (i.e. packet was
|
||||
* re-transmitted and we should ignore it).
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(ptl->rx.blocked.seqs); i++) {
|
||||
if (likely(ptl->rx.blocked.seqs[i] != seq))
|
||||
if (likely(ptl->rx.blocked.seqs[i] != frame->seq))
|
||||
continue;
|
||||
|
||||
ptl_dbg(ptl, "ptl: ignoring repeated data packet\n");
|
||||
@ -1613,7 +1629,7 @@ static bool ssh_ptl_rx_retransmit_check(struct ssh_ptl *ptl, u8 seq)
|
||||
}
|
||||
|
||||
/* Update list of blocked sequence IDs. */
|
||||
ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = seq;
|
||||
ptl->rx.blocked.seqs[ptl->rx.blocked.offset] = frame->seq;
|
||||
ptl->rx.blocked.offset = (ptl->rx.blocked.offset + 1)
|
||||
% ARRAY_SIZE(ptl->rx.blocked.seqs);
|
||||
|
||||
@ -1624,7 +1640,7 @@ static void ssh_ptl_rx_dataframe(struct ssh_ptl *ptl,
|
||||
const struct ssh_frame *frame,
|
||||
const struct ssam_span *payload)
|
||||
{
|
||||
if (ssh_ptl_rx_retransmit_check(ptl, frame->seq))
|
||||
if (ssh_ptl_rx_retransmit_check(ptl, frame))
|
||||
return;
|
||||
|
||||
ptl->ops.data_received(ptl, payload);
|
||||
|
@ -234,6 +234,19 @@ static const struct software_node *ssam_node_group_sl3[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* Devices for Surface Laptop 5. */
|
||||
static const struct software_node *ssam_node_group_sl5[] = {
|
||||
&ssam_node_root,
|
||||
&ssam_node_bat_ac,
|
||||
&ssam_node_bat_main,
|
||||
&ssam_node_tmp_pprof,
|
||||
&ssam_node_hid_main_keyboard,
|
||||
&ssam_node_hid_main_touchpad,
|
||||
&ssam_node_hid_main_iid5,
|
||||
&ssam_node_hid_sam_ucm_ucsi,
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* Devices for Surface Laptop Studio. */
|
||||
static const struct software_node *ssam_node_group_sls[] = {
|
||||
&ssam_node_root,
|
||||
@ -268,6 +281,7 @@ static const struct software_node *ssam_node_group_sp7[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* Devices for Surface Pro 8 */
|
||||
static const struct software_node *ssam_node_group_sp8[] = {
|
||||
&ssam_node_root,
|
||||
&ssam_node_hub_kip,
|
||||
@ -284,6 +298,23 @@ static const struct software_node *ssam_node_group_sp8[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* Devices for Surface Pro 9 */
|
||||
static const struct software_node *ssam_node_group_sp9[] = {
|
||||
&ssam_node_root,
|
||||
&ssam_node_hub_kip,
|
||||
&ssam_node_bat_ac,
|
||||
&ssam_node_bat_main,
|
||||
&ssam_node_tmp_pprof,
|
||||
/* TODO: Tablet mode switch (via POS subsystem) */
|
||||
&ssam_node_hid_kip_keyboard,
|
||||
&ssam_node_hid_kip_penstash,
|
||||
&ssam_node_hid_kip_touchpad,
|
||||
&ssam_node_hid_kip_fwupd,
|
||||
&ssam_node_hid_sam_sensors,
|
||||
&ssam_node_hid_sam_ucm_ucsi,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
/* -- SSAM platform/meta-hub driver. ---------------------------------------- */
|
||||
|
||||
@ -303,6 +334,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
|
||||
/* Surface Pro 8 */
|
||||
{ "MSHW0263", (unsigned long)ssam_node_group_sp8 },
|
||||
|
||||
/* Surface Pro 9 */
|
||||
{ "MSHW0343", (unsigned long)ssam_node_group_sp9 },
|
||||
|
||||
/* Surface Book 2 */
|
||||
{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
|
||||
|
||||
@ -324,6 +358,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
|
||||
/* Surface Laptop 4 (13", Intel) */
|
||||
{ "MSHW0250", (unsigned long)ssam_node_group_sl3 },
|
||||
|
||||
/* Surface Laptop 5 */
|
||||
{ "MSHW0350", (unsigned long)ssam_node_group_sl5 },
|
||||
|
||||
/* Surface Laptop Go 1 */
|
||||
{ "MSHW0118", (unsigned long)ssam_node_group_slg1 },
|
||||
|
||||
|
@ -564,6 +564,15 @@ static const struct dmi_system_id acer_quirks[] __initconst = {
|
||||
},
|
||||
.driver_data = (void *)ACER_CAP_KBD_DOCK,
|
||||
},
|
||||
{
|
||||
.callback = set_force_caps,
|
||||
.ident = "Acer Aspire Switch V 10 SW5-017",
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SW5-017"),
|
||||
},
|
||||
.driver_data = (void *)ACER_CAP_KBD_DOCK,
|
||||
},
|
||||
{
|
||||
.callback = set_force_caps,
|
||||
.ident = "Acer One 10 (S1003)",
|
||||
|
@ -276,7 +276,6 @@ static const struct file_operations amd_pmc_stb_debugfs_fops_v2 = {
|
||||
.release = amd_pmc_stb_debugfs_release_v2,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS)
|
||||
static int amd_pmc_setup_smu_logging(struct amd_pmc_dev *dev)
|
||||
{
|
||||
if (dev->cpu_id == AMD_CPU_ID_PCO) {
|
||||
@ -351,7 +350,6 @@ static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table
|
||||
memcpy_fromio(table, pdev->smu_virt_addr, sizeof(struct smu_metrics));
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_SUSPEND || CONFIG_DEBUG_FS */
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
|
||||
@ -964,6 +962,7 @@ static const struct acpi_device_id amd_pmc_acpi_ids[] = {
|
||||
{"AMDI0006", 0},
|
||||
{"AMDI0007", 0},
|
||||
{"AMDI0008", 0},
|
||||
{"AMDI0009", 0},
|
||||
{"AMD0004", 0},
|
||||
{"AMD0005", 0},
|
||||
{ }
|
||||
|
@ -1738,6 +1738,8 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus)
|
||||
pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
|
||||
cpu_to_le32(ports_available));
|
||||
|
||||
pci_dev_put(xhci_pdev);
|
||||
|
||||
pr_info("set USB_INTEL_XUSB2PR old: 0x%04x, new: 0x%04x\n",
|
||||
orig_ports_available, ports_available);
|
||||
}
|
||||
|
@ -90,6 +90,7 @@ enum hp_wmi_event_ids {
|
||||
HPWMI_PEAKSHIFT_PERIOD = 0x0F,
|
||||
HPWMI_BATTERY_CHARGE_PERIOD = 0x10,
|
||||
HPWMI_SANITIZATION_MODE = 0x17,
|
||||
HPWMI_SMART_EXPERIENCE_APP = 0x21,
|
||||
};
|
||||
|
||||
/*
|
||||
@ -859,6 +860,8 @@ static void hp_wmi_notify(u32 value, void *context)
|
||||
break;
|
||||
case HPWMI_SANITIZATION_MODE:
|
||||
break;
|
||||
case HPWMI_SMART_EXPERIENCE_APP:
|
||||
break;
|
||||
default:
|
||||
pr_info("Unknown event_id - %d - 0x%x\n", event_id, event_data);
|
||||
break;
|
||||
|
@ -136,6 +136,7 @@ struct ideapad_private {
|
||||
bool dytc : 1;
|
||||
bool fan_mode : 1;
|
||||
bool fn_lock : 1;
|
||||
bool set_fn_lock_led : 1;
|
||||
bool hw_rfkill_switch : 1;
|
||||
bool kbd_bl : 1;
|
||||
bool touchpad_ctrl_via_ec : 1;
|
||||
@ -154,7 +155,21 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth.");
|
||||
|
||||
static bool allow_v4_dytc;
|
||||
module_param(allow_v4_dytc, bool, 0444);
|
||||
MODULE_PARM_DESC(allow_v4_dytc, "Enable DYTC version 4 platform-profile support.");
|
||||
MODULE_PARM_DESC(allow_v4_dytc,
|
||||
"Enable DYTC version 4 platform-profile support. "
|
||||
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
|
||||
|
||||
static bool hw_rfkill_switch;
|
||||
module_param(hw_rfkill_switch, bool, 0444);
|
||||
MODULE_PARM_DESC(hw_rfkill_switch,
|
||||
"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
|
||||
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
|
||||
|
||||
static bool set_fn_lock_led;
|
||||
module_param(set_fn_lock_led, bool, 0444);
|
||||
MODULE_PARM_DESC(set_fn_lock_led,
|
||||
"Enable driver based updates of the fn-lock LED on fn-lock changes. "
|
||||
"If you need this please report this to: platform-driver-x86@vger.kernel.org");
|
||||
|
||||
/*
|
||||
* ACPI Helpers
|
||||
@ -1501,6 +1516,9 @@ static void ideapad_wmi_notify(u32 value, void *context)
|
||||
ideapad_input_report(priv, value);
|
||||
break;
|
||||
case 208:
|
||||
if (!priv->features.set_fn_lock_led)
|
||||
break;
|
||||
|
||||
if (!eval_hals(priv->adev->handle, &result)) {
|
||||
bool state = test_bit(HALS_FNLOCK_STATE_BIT, &result);
|
||||
|
||||
@ -1514,6 +1532,18 @@ static void ideapad_wmi_notify(u32 value, void *context)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* On some models we need to call exec_sals(SALS_FNLOCK_ON/OFF) to set the LED */
|
||||
static const struct dmi_system_id set_fn_lock_led_list[] = {
|
||||
{
|
||||
/* https://bugzilla.kernel.org/show_bug.cgi?id=212671 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion R7000P2020H"),
|
||||
}
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
/*
|
||||
* Some ideapads have a hardware rfkill switch, but most do not have one.
|
||||
* Reading VPCCMD_R_RF always results in 0 on models without a hardware rfkill,
|
||||
@ -1556,7 +1586,10 @@ static void ideapad_check_features(struct ideapad_private *priv)
|
||||
acpi_handle handle = priv->adev->handle;
|
||||
unsigned long val;
|
||||
|
||||
priv->features.hw_rfkill_switch = dmi_check_system(hw_rfkill_list);
|
||||
priv->features.set_fn_lock_led =
|
||||
set_fn_lock_led || dmi_check_system(set_fn_lock_led_list);
|
||||
priv->features.hw_rfkill_switch =
|
||||
hw_rfkill_switch || dmi_check_system(hw_rfkill_list);
|
||||
|
||||
/* Most ideapads with ELAN0634 touchpad don't use EC touchpad switch */
|
||||
if (acpi_dev_present("ELAN0634", NULL, -1))
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/intel-family.h>
|
||||
|
||||
#include <xen/xen.h>
|
||||
|
||||
static void intel_pmc_core_release(struct device *dev)
|
||||
{
|
||||
kfree(dev);
|
||||
@ -53,6 +55,13 @@ static int __init pmc_core_platform_init(void)
|
||||
if (acpi_dev_present("INT33A1", NULL, -1))
|
||||
return -ENODEV;
|
||||
|
||||
/*
|
||||
* Skip forcefully attaching the device for VMs. Make an exception for
|
||||
* Xen dom0, which does have full hardware access.
|
||||
*/
|
||||
if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR) && !xen_initial_domain())
|
||||
return -ENODEV;
|
||||
|
||||
if (!x86_match_cpu(intel_pmc_core_platform_ids))
|
||||
return -ENODEV;
|
||||
|
||||
|
@ -4497,6 +4497,14 @@ static const struct dmi_system_id fwbug_list[] __initconst = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21A0"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "P14s Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21A1"),
|
||||
}
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user