mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Pull x86 platform driver updates from Ilpo Järvinen:
"Highlights:
- amd/pmf:
- Avoid overwriting BIOS input values when events occur rapidly
- Fix PMF driver issues related to S4 (in part on crypto/ccp side)
- Add NPU metrics API (for accel side consumers)
- Allow disabling Smart PC function through a module parameter
- asus-wmi & HID/asus:
- Unification of backlight control (replaces quirks)
- Support multiple interfaces for controlling keyboard/RGB brightness
- Simplify init sequence
- hp-wmi:
- Add manual fan control for Victus S models
- Add fan mode keep-alive
- Fix platform profile values for Omen 16-wf1xxx
- Add EC offset to get the thermal profile
- intel/pmc: Show substate residencies also for non-primary PMCs
- intel/ISST:
- Store and restore data for all domains
- Write interface improvements
- lenovo-wmi:
- Support multiple Capability Data
- Add HWMON reporting and tuning support
- mellanox/mlx-platform: Add HI173 & HI174 support
- surface/aggregator_registry: Add Surface Pro 11 (QCOM)
- thinkpad_acpi: Add support for HW damage detection capability
- uniwill: Implement cTGP setting
- wmi:
- Introduce marshalling support
- Convert a few drivers to use the new buffer-based WMI API
- tools/power/x86/intel-speed-select: Allow read operations for non-root
- Miscellaneous cleanups / refactoring / improvements"
* tag 'platform-drivers-x86-v7.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (68 commits)
platform/x86: lenovo-wmi-{capdata,other}: Fix HWMON channel visibility
platform/x86: hp-wmi: Add EC offsets to read Victus S thermal profile
platform: mellanox: mlx-platform: Add support DGX flavor of next-generation 800GB/s ethernet switch.
platform: mellanox: mlx-platform: Add support for new Nvidia DGX system based on class VMOD0010
HID: asus: add support for the asus-wmi brightness handler
platform/x86: asus-wmi: add keyboard brightness event handler
platform/x86: asus-wmi: remove unused keyboard backlight quirk
HID: asus: listen to the asus-wmi brightness device instead of creating one
platform/x86: asus-wmi: Add support for multiple kbd led handlers
HID: asus: early return for ROG devices
HID: asus: move vendor initialization to probe
HID: asus: fortify keyboard handshake
HID: asus: use same report_id in response
HID: asus: initialize additional endpoints only for certain devices
HID: asus: simplify RGB init sequence
platform/wmi: string-kunit: Add missing oversized string test case
platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
platform/x86/uniwill: Implement cTGP setting
platform/x86: uniwill-laptop: Introduce device descriptor system
platform/x86/amd: Use scope-based cleanup for wbrf_record()
...
72 lines
1.6 KiB
C
72 lines
1.6 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* WMI Thunderbolt driver
|
|
*
|
|
* Copyright (C) 2017 Dell Inc. All Rights Reserved.
|
|
*/
|
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/hex.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/string.h>
|
|
#include <linux/sysfs.h>
|
|
#include <linux/types.h>
|
|
#include <linux/wmi.h>
|
|
|
|
#define INTEL_WMI_THUNDERBOLT_GUID "86CCFD48-205E-4A77-9C48-2021CBEDE341"
|
|
|
|
static ssize_t force_power_store(struct device *dev,
|
|
struct device_attribute *attr,
|
|
const char *buf, size_t count)
|
|
{
|
|
struct wmi_buffer buffer;
|
|
int ret;
|
|
u8 mode;
|
|
|
|
buffer.length = sizeof(mode);
|
|
buffer.data = &mode;
|
|
|
|
mode = hex_to_bin(buf[0]);
|
|
if (mode > 1)
|
|
return -EINVAL;
|
|
|
|
ret = wmidev_invoke_method(to_wmi_device(dev), 0, 1, &buffer, NULL);
|
|
if (ret < 0)
|
|
return ret;
|
|
|
|
return count;
|
|
}
|
|
|
|
static DEVICE_ATTR_WO(force_power);
|
|
|
|
static struct attribute *tbt_attrs[] = {
|
|
&dev_attr_force_power.attr,
|
|
NULL
|
|
};
|
|
ATTRIBUTE_GROUPS(tbt);
|
|
|
|
static const struct wmi_device_id intel_wmi_thunderbolt_id_table[] = {
|
|
{ .guid_string = INTEL_WMI_THUNDERBOLT_GUID },
|
|
{ },
|
|
};
|
|
|
|
static struct wmi_driver intel_wmi_thunderbolt_driver = {
|
|
.driver = {
|
|
.name = "intel-wmi-thunderbolt",
|
|
.dev_groups = tbt_groups,
|
|
},
|
|
.id_table = intel_wmi_thunderbolt_id_table,
|
|
.no_singleton = true,
|
|
};
|
|
|
|
module_wmi_driver(intel_wmi_thunderbolt_driver);
|
|
|
|
MODULE_DEVICE_TABLE(wmi, intel_wmi_thunderbolt_id_table);
|
|
MODULE_AUTHOR("Mario Limonciello <mario.limonciello@dell.com>");
|
|
MODULE_DESCRIPTION("Intel WMI Thunderbolt force power driver");
|
|
MODULE_LICENSE("GPL v2");
|