mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
Pull x86 platform driver updates from Ilpo Järvinen
"Highlights:
Major refactoring effort: stop setting acpi_device_name/class() and
pnp.device_class to facilitate their eventual removal
Many rollback/remove path fixes (presumably mostly found by AI)
Miscellaneous cleanups / refactoring / improvements
amd/halo:
- Add Halo RGB LED driver
amd/hsmp:
- Properly serialize probe, remove, and data paths
- Add support for protocol v7 used by Family 1AH Model 80H
- Fix error checking corner cases (largely from AI review)
- Reject negative power cap
amd/pmc:
- Improve behavior on platforms that do not support STB
- Add T14 Gen2 AMD (20XL) to s2idle quirk list
amd/pmf:
- Add ioctl interface to retrieve device metrics
- Add support for new metrics tables used by Family 1AH Model 80H
qcom-hamoa-ec (arm64):
- Reject short responses
asus-nb-wmi:
- Support ProArt key on ASUS ProArt PX13
asus-armoury:
- Gate PPT writes behind active fan curve
- Add power limits for more models
dell-wmi-base:
- Fix handling of ultra performance key
dell-wmi-sysman:
- Don't hex dump attribute security buffer
hp-bioscfg:
- Various fixes
- Improve reduced ACPI packages support (necessary for HP EliteBook 840 G2)
lg-laptop:
- Fix LED resource handling
- Add support for events used in newer models
- Fix keyboard backlight support on LG Gram 16T90SP
hp-wmi:
- Generalize thermal params to board params
- Manage CPU and GPU PWM independently
- Add GPU MUX switch support
- Add Victus 15-fb0xxx support
- Add OMEN MAX 16-ak0xxx, OMEN 16-n0xxx, OMEN 16-wd0xxx, OMEN
16-wf0xxx, and OMEN board ID 8D88 support
- Add OMEN Transcend 16-u0xxx support
huawei:
- Add support for Fn-lock ACPI interface found on newer Huawei
laptops such as MateBook 14 2024
ISST:
- Improve input validation (many fixes)
- Disallow SST-CP (core-power) feature if perf profile add fails
lenovo/yb9-kbdock:
- Add driver for Yoga Book 9 14IAH10
lenovo/ymc:
- Extend hinge switch query to support Yoga 9 2-in-1 14IPH11
- Prevent loading on Yoga Book 9 14IAH10 to avoid duplicated input
nodes
msi-ec:
- Add MSI Raider A18 HX A9WJG and MSI Katana GF76 11UEK support
msi-wmi:
- Add MSI Claw M-Center keys support
oxpec:
- Add support for OneXPlayer X2 Mini Pro
redmi-wmi:
- Report kbd backlight cycle, OEM preset power mode, and FnLock
toggle events to userspace
samsung-galaxybook:
- Add Samsung Galaxy Book6 Pro support
thinkpad_acpi:
- Add USB-C Security support
uniwill-laptop:
- Add keyboard backlight, AC auto boot, and USB powershare support
- Add MACHENIKE L16 Pro, AiStone X4SP4NAL, and Avell A60 MUV support
- Make lightbar max brightness configurable and add support for
LAPQC71A/B"
* tag 'platform-drivers-x86-v7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (152 commits)
platform/x86: think-lmi: Fix current password length check
platform/x86: redmi-wmi: report EC state change events
MAINTAINERS: update Intel PMC Core maintainer contact
platform/x86: oxpec: Add support for OneXPlayer X2 Mini Pro
platform/x86: thinkpad_acpi: Fix fan speed reporting on Edge E330
platform/x86: msi-ec: Add MSI Katana GF76 11UEK EC firmware
platform/x86: think-lmi: Fix certificate thumbprint sysfs output
mlxbf-bootctl: fix the build error with FIELD_PREP()
platform/x86: think-lmi: Free system certificate signatures
platform/x86: ISST: Add a NULL check for sst_inst[]
platform/x86: ISST: Return error during profile addition
platform/x86: ISST: Just allow 2 bits for SST feature enable
platform/x86: ISST: Use PP level enable mask
platform/x86: ISST: Validate parameter for frequency and priority
platform/x86: ISST: Validate parameter for core power state
platform/x86: ISST: Validate max level for set feature
platform/x86: ISST: Validate logical CPU id and clos id
platform/x86: ISST: Validate level in perf mask ioctls
platform/x86: ISST: Validate socket ID in clos_assoc ioctl
platform/x86/amd/hsmp: Reject negative power cap writes in hwmon
...
94 lines
2.5 KiB
C
94 lines
2.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* AMD Platform Management Framework Interface
|
|
*
|
|
* Copyright (c) 2023, Advanced Micro Devices, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* Authors: Shyam Sundar S K <[email protected]>
|
|
* Basavaraj Natikar <[email protected]>
|
|
*/
|
|
|
|
#ifndef AMD_PMF_IO_H
|
|
#define AMD_PMF_IO_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/**
|
|
* enum sfh_message_type - Query the SFH message type
|
|
* @MT_HPD: Message ID to know the Human presence info from MP2 FW
|
|
* @MT_ALS: Message ID to know the Ambient light info from MP2 FW
|
|
* @MT_SRA: Message ID to know the SRA data from MP2 FW
|
|
* @MT_OP_MODE: Message ID to know the operating-mode (tablet/laptop) info
|
|
*/
|
|
enum sfh_message_type {
|
|
MT_HPD,
|
|
MT_ALS,
|
|
MT_SRA,
|
|
MT_OP_MODE,
|
|
};
|
|
|
|
/**
|
|
* enum sfh_hpd_info - Query the Human presence information
|
|
* @SFH_NOT_DETECTED: Check the HPD connection information from MP2 FW
|
|
* @SFH_USER_PRESENT: Check if the user is present from HPD sensor
|
|
* @SFH_USER_AWAY: Check if the user is away from HPD sensor
|
|
*/
|
|
enum sfh_hpd_info {
|
|
SFH_NOT_DETECTED,
|
|
SFH_USER_PRESENT,
|
|
SFH_USER_AWAY,
|
|
};
|
|
|
|
/**
|
|
* struct amd_sfh_info - get HPD sensor info from MP2 FW
|
|
* @ambient_light: Populates the ambient light information
|
|
* @user_present: Populates the user presence information
|
|
* @platform_type: Operating modes (clamshell, flat, tent, etc.)
|
|
* @laptop_placement: Device states (ontable, onlap, outbag)
|
|
* @op_mode: Operating-mode field (see enum sfh_dev_mode); used for tablet detection
|
|
*/
|
|
struct amd_sfh_info {
|
|
u32 ambient_light;
|
|
u8 user_present;
|
|
u32 platform_type;
|
|
u32 laptop_placement;
|
|
u32 op_mode;
|
|
};
|
|
|
|
/**
|
|
* enum sfh_dev_mode - SFH operating-mode field (sfh_op_mode.mode, bits 0-2)
|
|
* @SFH_MODE_LAPTOP: Device is in laptop/clamshell posture
|
|
* @SFH_MODE_TABLET: Device is in tablet posture
|
|
*/
|
|
enum sfh_dev_mode {
|
|
SFH_MODE_LAPTOP = 1,
|
|
SFH_MODE_TABLET = 3,
|
|
};
|
|
|
|
/**
|
|
* struct amd_pmf_npu_metrics: Get NPU metrics data from PMF driver
|
|
* @npuclk_freq: NPU clock frequency [MHz]
|
|
* @npu_busy: NPU busy % [0-100]
|
|
* @npu_power: NPU power [mW]
|
|
* @mpnpuclk_freq: MPNPU [MHz]
|
|
* @npu_reads: NPU read bandwidth [MB/sec]
|
|
* @npu_writes: NPU write bandwidth [MB/sec]
|
|
* @npu_temp: NPU temperature [C]
|
|
*/
|
|
struct amd_pmf_npu_metrics {
|
|
u16 npuclk_freq;
|
|
u16 npu_busy[8];
|
|
u16 npu_power;
|
|
u16 mpnpuclk_freq;
|
|
u16 npu_reads;
|
|
u16 npu_writes;
|
|
u16 npu_temp;
|
|
};
|
|
|
|
int amd_get_sfh_info(struct amd_sfh_info *sfh_info, enum sfh_message_type op);
|
|
|
|
/* AMD PMF and NPU interface */
|
|
int amd_pmf_get_npu_data(struct amd_pmf_npu_metrics *info);
|
|
#endif
|