Skip to content

Commit fb1ceb2

Browse files
committed
Merge tag 'platform-drivers-x86-v6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform drivers updates from Ilpo Järvinen: - alienware-wmi: - Refactor and split WMAX/legacy drivers - dell-ddv: - Correct +0.1 offset in temperature - Use the power supply extension mechanism for battery temperatures - intel/pmc: - Refactor init to mostly use a common init function - Add support for Arrow Lake U/H - Add support for Panther Lake - intel/sst: - Improve multi die handling - Prefix header search path with sysroot (fixes cross-compiling) - lenovo-wmi-hotkey-utilities: - Support for mic & audio mute LEDs - samsung-galaxybook: - Add driver for Samsung Galaxy Book series - wmi: - Rework WCxx/WExx ACPI method handling - Enable data block collection when the data block is set - platform/arm: - Add Huawei Matebook E Go EC driver - platform/mellanox: - Relocate to drivers/platform/mellanox/ - mlxbf-bootctl: - RTC battery status sysfs support - Miscellaneous cleanups / refactoring / improvements * tag 'platform-drivers-x86-v6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (75 commits) platform/x86: x86-android-tablets: Add select POWER_SUPPLY to Kconfig platform/x86/amd/pmf: convert timeouts to secs_to_jiffies() platform/x86: thinkpad_acpi: convert timeouts to secs_to_jiffies() irqdomain: platform/x86: Switch to irq_domain_create_linear() platform/x86/amd/pmc: fix leak in probe() tools/power/x86/intel-speed-select: v1.22 release tools/power/x86/intel-speed-select: Prefix header search path with sysroot tools/power/x86/intel-speed-select: Die ID for IO dies tools/power/x86/intel-speed-select: Fix the condition to check multi die system tools/power/x86/intel-speed-select: Prevent increasing MAX_DIE_PER_PACKAGE platform/x86/amd/pmc: Use managed APIs for mutex platform/x86/amd/pmc: Remove unnecessary line breaks platform/x86/amd/pmc: Move macros and structures to the PMC header file platform/x86/amd/pmc: Notify user when platform does not support s0ix transition platform/x86: dell-ddv: Use the power supply extension mechanism platform/x86: dell-ddv: Use devm_battery_hook_register platform/x86: dell-ddv: Fix temperature calculation platform/x86: thinkpad_acpi: check the return value of devm_mutex_init() platform/x86: samsung-galaxybook: Fix block_recording not supported logic platform/x86: dell-uart-backlight: Make dell_uart_bl_serdev_driver static ...
2 parents e50da55 + 2c30357 commit fb1ceb2

Some content is hidden

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

68 files changed

+5997
-2197
lines changed

Documentation/ABI/testing/sysfs-platform-mellanox-bootctl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,13 @@ Description:
150150
The "mfg_lock" sysfs attribute is write-only.
151151
A successful write to this attribute will latch the
152152
board-level attributes into EEPROM, making them read-only.
153+
154+
What: /sys/bus/platform/devices/MLNXBF04:00/rtc_battery
155+
Date: June 2025
156+
KernelVersion: 6.15
157+
Contact: "Xiangrong Li <xiangrongl@nvidia.com>"
158+
Description:
159+
The "rtc_battery" sysfs attribute is read-only.
160+
A successful read from this attribute returns the status of
161+
the board's RTC battery. The RTC battery status register is
162+
also cleared upon successful read operation.

Documentation/admin-guide/laptops/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Laptop Drivers
1111
disk-shock-protection
1212
laptop-mode
1313
lg-laptop
14+
samsung-galaxybook
1415
sony-laptop
1516
sonypi
1617
thinkpad-acpi
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
==========================
4+
Samsung Galaxy Book Driver
5+
==========================
6+
7+
Joshua Grisham <josh@joshuagrisham.com>
8+
9+
This is a Linux x86 platform driver for Samsung Galaxy Book series notebook
10+
devices which utilizes Samsung's ``SCAI`` ACPI device in order to control
11+
extra features and receive various notifications.
12+
13+
Supported devices
14+
=================
15+
16+
Any device with one of the supported ACPI device IDs should be supported. This
17+
covers most of the "Samsung Galaxy Book" series notebooks that are currently
18+
available as of this writing, and could include other Samsung notebook devices
19+
as well.
20+
21+
Status
22+
======
23+
24+
The following features are currently supported:
25+
26+
- :ref:`Keyboard backlight <keyboard-backlight>` control
27+
- :ref:`Performance mode <performance-mode>` control implemented using the
28+
platform profile interface
29+
- :ref:`Battery charge control end threshold
30+
<battery-charge-control-end-threshold>` (stop charging battery at given
31+
percentage value) implemented as a battery hook
32+
- :ref:`Firmware Attributes <firmware-attributes>` to allow control of various
33+
device settings
34+
- :ref:`Handling of Fn hotkeys <keyboard-hotkey-actions>` for various actions
35+
- :ref:`Handling of ACPI notifications and hotkeys
36+
<acpi-notifications-and-hotkey-actions>`
37+
38+
Because different models of these devices can vary in their features, there is
39+
logic built within the driver which attempts to test each implemented feature
40+
for a valid response before enabling its support (registering additional devices
41+
or extensions, adding sysfs attributes, etc). Therefore, it can be important to
42+
note that not all features may be supported for your particular device.
43+
44+
The following features might be possible to implement but will require
45+
additional investigation and are therefore not supported at this time:
46+
47+
- "Dolby Atmos" mode for the speakers
48+
- "Outdoor Mode" for increasing screen brightness on models with ``SAM0427``
49+
- "Silent Mode" on models with ``SAM0427``
50+
51+
.. _keyboard-backlight:
52+
53+
Keyboard backlight
54+
==================
55+
56+
A new LED class named ``samsung-galaxybook::kbd_backlight`` is created which
57+
will then expose the device using the standard sysfs-based LED interface at
58+
``/sys/class/leds/samsung-galaxybook::kbd_backlight``. Brightness can be
59+
controlled by writing the desired value to the ``brightness`` sysfs attribute or
60+
with any other desired userspace utility.
61+
62+
.. note::
63+
Most of these devices have an ambient light sensor which also turns
64+
off the keyboard backlight under well-lit conditions. This behavior does not
65+
seem possible to control at this time, but can be good to be aware of.
66+
67+
.. _performance-mode:
68+
69+
Performance mode
70+
================
71+
72+
This driver implements the
73+
Documentation/userspace-api/sysfs-platform_profile.rst interface for working
74+
with the "performance mode" function of the Samsung ACPI device.
75+
76+
Mapping of each Samsung "performance mode" to its respective platform profile is
77+
performed dynamically by the driver, as not all models support all of the same
78+
performance modes. Your device might have one or more of the following mappings:
79+
80+
- "Silent" maps to ``low-power``
81+
- "Quiet" maps to ``quiet``
82+
- "Optimized" maps to ``balanced``
83+
- "High performance" maps to ``performance``
84+
85+
The result of the mapping can be printed in the kernel log when the module is
86+
loaded. Supported profiles can also be retrieved from
87+
``/sys/firmware/acpi/platform_profile_choices``, while
88+
``/sys/firmware/acpi/platform_profile`` can be used to read or write the
89+
currently selected profile.
90+
91+
The ``balanced`` platform profile will be set during module load if no profile
92+
has been previously set.
93+
94+
.. _battery-charge-control-end-threshold:
95+
96+
Battery charge control end threshold
97+
====================================
98+
99+
This platform driver will add the ability to set the battery's charge control
100+
end threshold, but does not have the ability to set a start threshold.
101+
102+
This feature is typically called "Battery Saver" by the various Samsung
103+
applications in Windows, but in Linux we have implemented the standardized
104+
"charge control threshold" sysfs interface on the battery device to allow for
105+
controlling this functionality from the userspace.
106+
107+
The sysfs attribute
108+
``/sys/class/power_supply/BAT1/charge_control_end_threshold`` can be used to
109+
read or set the desired charge end threshold.
110+
111+
If you wish to maintain interoperability with the Samsung Settings application
112+
in Windows, then you should set the value to 100 to represent "off", or enable
113+
the feature using only one of the following values: 50, 60, 70, 80, or 90.
114+
Otherwise, the driver will accept any value between 1 and 100 as the percentage
115+
that you wish the battery to stop charging at.
116+
117+
.. note::
118+
Some devices have been observed as automatically "turning off" the charge
119+
control end threshold if an input value of less than 30 is given.
120+
121+
.. _firmware-attributes:
122+
123+
Firmware Attributes
124+
===================
125+
126+
The following enumeration-typed firmware attributes are set up by this driver
127+
and should be accessible under
128+
``/sys/class/firmware-attributes/samsung-galaxybook/attributes/`` if your device
129+
supports them:
130+
131+
- ``power_on_lid_open`` (device should power on when the lid is opened)
132+
- ``usb_charging`` (USB ports can deliver power to connected devices even when
133+
the device is powered off or in a low sleep state)
134+
- ``block_recording`` (blocks access to camera and microphone)
135+
136+
All of these attributes are simple boolean-like enumeration values which use 0
137+
to represent "off" and 1 to represent "on". Use the ``current_value`` attribute
138+
to get or change the setting on the device.
139+
140+
Note that when ``block_recording`` is updated, the input device "Samsung Galaxy
141+
Book Lens Cover" will receive a ``SW_CAMERA_LENS_COVER`` switch event which
142+
reflects the current state.
143+
144+
.. _keyboard-hotkey-actions:
145+
146+
Keyboard hotkey actions (i8042 filter)
147+
======================================
148+
149+
The i8042 filter will swallow the keyboard events for the Fn+F9 hotkey (Multi-
150+
level keyboard backlight toggle) and Fn+F10 hotkey (Block recording toggle)
151+
and instead execute their actions within the driver itself.
152+
153+
Fn+F9 will cycle through the brightness levels of the keyboard backlight. A
154+
notification will be sent using ``led_classdev_notify_brightness_hw_changed``
155+
so that the userspace can be aware of the change. This mimics the behavior of
156+
other existing devices where the brightness level is cycled internally by the
157+
embedded controller and then reported via a notification.
158+
159+
Fn+F10 will toggle the value of the "block recording" setting, which blocks
160+
or allows usage of the built-in camera and microphone (and generates the same
161+
Lens Cover switch event mentioned above).
162+
163+
.. _acpi-notifications-and-hotkey-actions:
164+
165+
ACPI notifications and hotkey actions
166+
=====================================
167+
168+
ACPI notifications will generate ACPI netlink events under the device class
169+
``samsung-galaxybook`` and bus ID matching the Samsung ACPI device ID found on
170+
your device. The events can be received using userspace tools such as
171+
``acpi_listen`` and ``acpid``.
172+
173+
The Fn+F11 Performance mode hotkey will be handled by the driver; each keypress
174+
will cycle to the next available platform profile.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/platform/huawei,gaokun-ec.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Huawei Matebook E Go Embedded Controller
8+
9+
maintainers:
10+
- Pengyu Luo <mitltlatltl@gmail.com>
11+
12+
description:
13+
Different from other Qualcomm Snapdragon sc8180x and sc8280xp-based
14+
machines, the Huawei Matebook E Go tablets use embedded controllers
15+
while others use a system called PMIC GLink which handles battery,
16+
UCSI, USB Type-C DP Alt Mode. In addition, Huawei's implementation
17+
also handles additional features, such as charging thresholds, FN
18+
lock, smart charging, tablet lid status, thermal sensors, and more.
19+
20+
properties:
21+
compatible:
22+
enum:
23+
- huawei,gaokun3-ec
24+
25+
reg:
26+
const: 0x38
27+
28+
'#address-cells':
29+
const: 1
30+
31+
'#size-cells':
32+
const: 0
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
patternProperties:
38+
'^connector@[01]$':
39+
$ref: /schemas/connector/usb-connector.yaml#
40+
41+
properties:
42+
reg:
43+
maxItems: 1
44+
45+
required:
46+
- compatible
47+
- reg
48+
- interrupts
49+
50+
additionalProperties: false
51+
52+
examples:
53+
- |
54+
#include <dt-bindings/interrupt-controller/irq.h>
55+
i2c {
56+
#address-cells = <1>;
57+
#size-cells = <0>;
58+
59+
embedded-controller@38 {
60+
compatible = "huawei,gaokun3-ec";
61+
reg = <0x38>;
62+
63+
interrupts-extended = <&tlmm 107 IRQ_TYPE_LEVEL_LOW>;
64+
65+
#address-cells = <1>;
66+
#size-cells = <0>;
67+
68+
connector@0 {
69+
compatible = "usb-c-connector";
70+
reg = <0>;
71+
power-role = "dual";
72+
data-role = "dual";
73+
74+
ports {
75+
#address-cells = <1>;
76+
#size-cells = <0>;
77+
78+
port@0 {
79+
reg = <0>;
80+
81+
ucsi0_ss_in: endpoint {
82+
remote-endpoint = <&usb_0_qmpphy_out>;
83+
};
84+
};
85+
86+
port@1 {
87+
reg = <1>;
88+
89+
ucsi0_sbu: endpoint {
90+
remote-endpoint = <&usb0_sbu_mux>;
91+
};
92+
};
93+
};
94+
};
95+
96+
connector@1 {
97+
compatible = "usb-c-connector";
98+
reg = <1>;
99+
power-role = "dual";
100+
data-role = "dual";
101+
102+
ports {
103+
#address-cells = <1>;
104+
#size-cells = <0>;
105+
106+
port@0 {
107+
reg = <0>;
108+
109+
ucsi1_ss_in: endpoint {
110+
remote-endpoint = <&usb_1_qmpphy_out>;
111+
};
112+
};
113+
114+
port@1 {
115+
reg = <1>;
116+
117+
ucsi1_sbu: endpoint {
118+
remote-endpoint = <&usb1_sbu_mux>;
119+
};
120+
};
121+
};
122+
};
123+
};
124+
};

Documentation/wmi/acpi-interface.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ Similar to the ``WExx`` ACPI methods, except that it controls data collection
8989
instead of events and thus the last two characters of the ACPI method name are
9090
the method ID of the data block to enable/disable.
9191

92+
Those ACPI methods are also called before setting data blocks to match the
93+
behaviour of the Windows driver.
94+
9295
_WED ACPI method
9396
----------------
9497

Documentation/wmi/driver-development-guide.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ on a given machine.
9696
Because of this, WMI drivers should use the state container design pattern as described in
9797
Documentation/driver-api/driver-model/design-patterns.rst.
9898

99+
.. warning:: Using both GUID-based and non-GUID-based functions for querying WMI data blocks and
100+
handling WMI events simultaneously on the same device is guaranteed to corrupt the
101+
WMI device state and might lead to erratic behaviour.
102+
99103
WMI method drivers
100104
------------------
101105

0 commit comments

Comments
 (0)