Skip to content

Commit 66fd6d0

Browse files
committed
Merge tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Ilpo Järvinen: - New acer-wmi HW support - Support for new revision of amd/pmf heartbeat notify - Correctly handle asus-wmi HW without LEDs - fujitsu-laptop battery charge control support - Support for new hp-wmi thermal profiles - Support ideapad-laptop refresh rate key - Put intel/pmc AI accelerator (GNA) into D3 if it has no driver to allow entry into low-power modes, and temporarily removed Lunar Lake SSRAM support due to breaking FW changes causing probe fail (further breaking FW changes are still pending) - Report pmc/punit_atom devices that prevent reacing low power levels - Surface Fan speed function support - Support for more sperial keys and complete the list of models with non-standard fan registers in thinkpad_acpi - New DMI touchscreen HW support - Continued modernization efforts of wmi - Removal of obsoleted ledtrig-audio call and the related dependency - Debug & metrics interface improvements - Miscellaneous cleanups / fixes / improvements * tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (87 commits) platform/x86/intel/pmc: Improve PKGC residency counters debug platform/x86: asus-wmi: Consider device is absent when the read is ~0 Documentation/x86/amd/hsmp: Updating urls platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles platform/x86/amd/pmf: Add support to get sps default APTS index values platform/x86/amd/pmf: Add support to get APTS index numbers for static slider platform/x86/amd/pmf: Add support to notify sbios heart beat event platform/x86/amd/pmf: Add support to get sbios requests in PMF driver platform/x86/amd/pmf: Disable debugfs support for querying power thermals platform/x86/amd/pmf: Differentiate PMF ACPI versions x86/platform/atom: Check state of Punit managed devices on s2idle platform/x86: pmc_atom: Check state of PMC clocks on s2idle platform/x86: pmc_atom: Check state of PMC managed devices on s2idle platform/x86: pmc_atom: Annotate d3_sts register bit defines clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h platform/x86: make fw_attr_class constant platform/x86/intel/tpmi: Change vsec offset to u64 platform/x86: intel_scu_pcidrv: Remove unused intel-mid.h platform/x86: intel_scu_wdt: Remove unused intel-mid.h ...
2 parents f5c31bc + 16f8091 commit 66fd6d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1844
-709
lines changed

Documentation/admin-guide/laptops/thinkpad-acpi.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,9 @@ event code Key Notes
444444

445445
0x1008 0x07 FN+F8 IBM: toggle screen expand
446446
Lenovo: configure UltraNav,
447-
or toggle screen expand
447+
or toggle screen expand.
448+
On newer platforms (2024+)
449+
replaced by 0x131f (see below)
448450

449451
0x1009 0x08 FN+F9 -
450452

@@ -504,6 +506,9 @@ event code Key Notes
504506

505507
0x1019 0x18 unknown
506508

509+
0x131f ... FN+F8 Platform Mode change.
510+
Implemented in driver.
511+
507512
... ... ...
508513

509514
0x1020 0x1F unknown

Documentation/arch/x86/amd_hsmp.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ set of mailbox registers.
1313

1414
More details on the interface can be found in chapter
1515
"7 Host System Management Port (HSMP)" of the family/model PPR
16-
Eg: https://www.amd.com/system/files/TechDocs/55898_B1_pub_0.50.zip
16+
Eg: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip
17+
1718

1819
HSMP interface is supported on EPYC server CPU models only.
1920

@@ -97,8 +98,8 @@ what happened. The transaction returns 0 on success.
9798

9899
More details on the interface and message definitions can be found in chapter
99100
"7 Host System Management Port (HSMP)" of the respective family/model PPR
100-
eg: https://www.amd.com/system/files/TechDocs/55898_B1_pub_0.50.zip
101+
eg: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip
101102

102103
User space C-APIs are made available by linking against the esmi library,
103-
which is provided by the E-SMS project https://developer.amd.com/e-sms/.
104+
which is provided by the E-SMS project https://www.amd.com/en/developer/e-sms.html.
104105
See: https://github.com/amd/esmi_ib_library

Documentation/wmi/acpi-interface.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,7 @@ _WED ACPI method
9393
----------------
9494

9595
Used to retrieve additional WMI event data, its single parameter is a integer
96-
holding the notification ID of the event.
96+
holding the notification ID of the event. This method should be evaluated every
97+
time an ACPI notification is received, since some ACPI implementations use a
98+
queue to store WMI event data items. This queue will overflow after a couple
99+
of WMI events are received without retrieving the associated WMI event data.

arch/x86/platform/atom/punit_atom_debug.c

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
* Copyright (c) 2015, Intel Corporation.
88
*/
99

10+
#define pr_fmt(fmt) "punit_atom: " fmt
11+
12+
#include <linux/acpi.h>
1013
#include <linux/module.h>
1114
#include <linux/init.h>
1215
#include <linux/device.h>
@@ -117,6 +120,51 @@ static void punit_dbgfs_unregister(void)
117120
debugfs_remove_recursive(punit_dbg_file);
118121
}
119122

123+
#if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
124+
static const struct punit_device *punit_dev;
125+
126+
static void punit_s2idle_check(void)
127+
{
128+
const struct punit_device *punit_devp;
129+
u32 punit_pwr_status, dstate;
130+
int status;
131+
132+
for (punit_devp = punit_dev; punit_devp->name; punit_devp++) {
133+
/* Skip MIO, it is on till the very last moment */
134+
if (punit_devp->reg == MIO_SS_PM)
135+
continue;
136+
137+
status = iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ,
138+
punit_devp->reg, &punit_pwr_status);
139+
if (status) {
140+
pr_err("%s read failed\n", punit_devp->name);
141+
} else {
142+
dstate = (punit_pwr_status >> punit_devp->sss_pos) & 3;
143+
if (!dstate)
144+
pr_err("%s is in D0 prior to s2idle\n", punit_devp->name);
145+
}
146+
}
147+
}
148+
149+
static struct acpi_s2idle_dev_ops punit_s2idle_ops = {
150+
.check = punit_s2idle_check,
151+
};
152+
153+
static void punit_s2idle_check_register(struct punit_device *punit_device)
154+
{
155+
punit_dev = punit_device;
156+
acpi_register_lps0_dev(&punit_s2idle_ops);
157+
}
158+
159+
static void punit_s2idle_check_unregister(void)
160+
{
161+
acpi_unregister_lps0_dev(&punit_s2idle_ops);
162+
}
163+
#else
164+
static void punit_s2idle_check_register(struct punit_device *punit_device) {}
165+
static void punit_s2idle_check_unregister(void) {}
166+
#endif
167+
120168
#define X86_MATCH(model, data) \
121169
X86_MATCH_VENDOR_FAM_MODEL_FEATURE(INTEL, 6, INTEL_FAM6_##model, \
122170
X86_FEATURE_MWAIT, data)
@@ -131,19 +179,23 @@ MODULE_DEVICE_TABLE(x86cpu, intel_punit_cpu_ids);
131179

132180
static int __init punit_atom_debug_init(void)
133181
{
182+
struct punit_device *punit_device;
134183
const struct x86_cpu_id *id;
135184

136185
id = x86_match_cpu(intel_punit_cpu_ids);
137186
if (!id)
138187
return -ENODEV;
139188

140-
punit_dbgfs_register((struct punit_device *)id->driver_data);
189+
punit_device = (struct punit_device *)id->driver_data;
190+
punit_dbgfs_register(punit_device);
191+
punit_s2idle_check_register(punit_device);
141192

142193
return 0;
143194
}
144195

145196
static void __exit punit_atom_debug_exit(void)
146197
{
198+
punit_s2idle_check_unregister();
147199
punit_dbgfs_unregister();
148200
}
149201

drivers/clk/x86/clk-pmc-atom.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,12 @@
1111
#include <linux/err.h>
1212
#include <linux/io.h>
1313
#include <linux/platform_data/x86/clk-pmc-atom.h>
14+
#include <linux/platform_data/x86/pmc_atom.h>
1415
#include <linux/platform_device.h>
1516
#include <linux/slab.h>
1617

1718
#define PLT_CLK_NAME_BASE "pmc_plt_clk"
1819

19-
#define PMC_CLK_CTL_OFFSET 0x60
20-
#define PMC_CLK_CTL_SIZE 4
21-
#define PMC_CLK_NUM 6
22-
#define PMC_CLK_CTL_GATED_ON_D3 0x0
23-
#define PMC_CLK_CTL_FORCE_ON 0x1
24-
#define PMC_CLK_CTL_FORCE_OFF 0x2
25-
#define PMC_CLK_CTL_RESERVED 0x3
26-
#define PMC_MASK_CLK_CTL GENMASK(1, 0)
27-
#define PMC_MASK_CLK_FREQ BIT(2)
28-
#define PMC_CLK_FREQ_XTAL (0 << 2) /* 25 MHz */
29-
#define PMC_CLK_FREQ_PLL (1 << 2) /* 19.2 MHz */
30-
3120
struct clk_plt_fixed {
3221
struct clk_hw *clk;
3322
struct clk_lookup *lookup;

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ static struct wmi_driver dell_smm_wmi_driver = {
16001600
},
16011601
.id_table = dell_smm_wmi_id_table,
16021602
.probe = dell_smm_wmi_probe,
1603+
.no_singleton = true,
16031604
};
16041605

16051606
/*

drivers/platform/mellanox/mlxbf-bootctl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static ssize_t large_icm_show(struct device *dev,
463463
if (res.a0)
464464
return -EPERM;
465465

466-
return snprintf(buf, PAGE_SIZE, "0x%lx", res.a1);
466+
return sysfs_emit(buf, "0x%lx", res.a1);
467467
}
468468

469469
static ssize_t large_icm_store(struct device *dev,
@@ -581,7 +581,7 @@ static ssize_t opn_show(struct device *dev,
581581
}
582582
mutex_unlock(&mfg_ops_lock);
583583

584-
return snprintf(buf, PAGE_SIZE, "%s", (char *)opn_data);
584+
return sysfs_emit(buf, "%s", (char *)opn_data);
585585
}
586586

587587
static ssize_t opn_store(struct device *dev,
@@ -632,7 +632,7 @@ static ssize_t sku_show(struct device *dev,
632632
}
633633
mutex_unlock(&mfg_ops_lock);
634634

635-
return snprintf(buf, PAGE_SIZE, "%s", (char *)sku_data);
635+
return sysfs_emit(buf, "%s", (char *)sku_data);
636636
}
637637

638638
static ssize_t sku_store(struct device *dev,
@@ -683,7 +683,7 @@ static ssize_t modl_show(struct device *dev,
683683
}
684684
mutex_unlock(&mfg_ops_lock);
685685

686-
return snprintf(buf, PAGE_SIZE, "%s", (char *)modl_data);
686+
return sysfs_emit(buf, "%s", (char *)modl_data);
687687
}
688688

689689
static ssize_t modl_store(struct device *dev,
@@ -734,7 +734,7 @@ static ssize_t sn_show(struct device *dev,
734734
}
735735
mutex_unlock(&mfg_ops_lock);
736736

737-
return snprintf(buf, PAGE_SIZE, "%s", (char *)sn_data);
737+
return sysfs_emit(buf, "%s", (char *)sn_data);
738738
}
739739

740740
static ssize_t sn_store(struct device *dev,
@@ -785,7 +785,7 @@ static ssize_t uuid_show(struct device *dev,
785785
}
786786
mutex_unlock(&mfg_ops_lock);
787787

788-
return snprintf(buf, PAGE_SIZE, "%s", (char *)uuid_data);
788+
return sysfs_emit(buf, "%s", (char *)uuid_data);
789789
}
790790

791791
static ssize_t uuid_store(struct device *dev,
@@ -836,7 +836,7 @@ static ssize_t rev_show(struct device *dev,
836836
}
837837
mutex_unlock(&mfg_ops_lock);
838838

839-
return snprintf(buf, PAGE_SIZE, "%s", (char *)rev_data);
839+
return sysfs_emit(buf, "%s", (char *)rev_data);
840840
}
841841

842842
static ssize_t rev_store(struct device *dev,

0 commit comments

Comments
 (0)