Skip to content

Commit eb7046e

Browse files
committed
Merge tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86
Pull x86 platform driver updates from Darren Hart: - Move the Dell dcdbas and dell_rbu drivers into platform/drivers/x86 as they are closely coupled with other drivers in this location. - Improve _init* usage for acerhdf and fix some usage issues with messages and module parameters. - Simplify asus-wmi by calling ACPI/WMI methods directly, eliminating workqueue overhead, eliminate double reporting of keyboard backlight. - Fix wake from USB failure on Bay Trail devices (intel_int0002_vgpio). - Notify intel_telemetry users when IPC1 device is not enabled. - Update various drivers with new laptop model IDs. - Update several intel drivers to use SPDX identifers and order headers alphabetically. * tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits) HID: asus: only support backlight when it's not driven by WMI platform/x86: asus-wmi: export function for evaluating WMI methods platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed platform/x86: wmi: declare device_type structure as constant platform/x86: ideapad: Add Y530-15ICH to no_hw_rfkill platform/x86: Add Intel AtomISP2 dummy / power-management driver platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models platform/x86: touchscreen_dmi: Add info for the Onda V80 Plus v3 tablet platform/x86: touchscreen_dmi: Add info for the Trekstor Primetab T13B tablet platform/x86: intel_telemetry: Get rid of custom macro platform/x86: intel_telemetry: report debugfs failure MAINTAINERS: intel_telemetry: Update maintainers info platform/x86: Add LG Gram laptop special features driver platform/x86: asus-wmi: Simplify the keyboard brightness updating process platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11 convertible platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items MAINTAINERS: intel_pmc_core: Update MAINTAINERS firmware: dcdbas: include linux/io.h platform/x86: intel-wmi-thunderbolt: Add dynamic debugging platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier ...
2 parents 5b74498 + 3b692c5 commit eb7046e

Some content is hidden

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

47 files changed

+1587
-494
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
What: /sys/devices/platform/lg-laptop/reader_mode
2+
Date: October 2018
3+
KernelVersion: 4.20
4+
Contact: "Matan Ziv-Av <matan@svgalib.org>
5+
Description:
6+
Control reader mode. 1 means on, 0 means off.
7+
8+
What: /sys/devices/platform/lg-laptop/fn_lock
9+
Date: October 2018
10+
KernelVersion: 4.20
11+
Contact: "Matan Ziv-Av <matan@svgalib.org>
12+
Description:
13+
Control FN lock mode. 1 means on, 0 means off.
14+
15+
What: /sys/devices/platform/lg-laptop/battery_care_limit
16+
Date: October 2018
17+
KernelVersion: 4.20
18+
Contact: "Matan Ziv-Av <matan@svgalib.org>
19+
Description:
20+
Maximal battery charge level. Accepted values are 80 or 100.
21+
22+
What: /sys/devices/platform/lg-laptop/fan_mode
23+
Date: October 2018
24+
KernelVersion: 4.20
25+
Contact: "Matan Ziv-Av <matan@svgalib.org>
26+
Description:
27+
Control fan mode. 1 for performance mode, 0 for silent mode.
28+
29+
What: /sys/devices/platform/lg-laptop/usb_charge
30+
Date: October 2018
31+
KernelVersion: 4.20
32+
Contact: "Matan Ziv-Av <matan@svgalib.org>
33+
Description:
34+
Control USB port charging when device is turned off.
35+
1 means on, 0 means off.

Documentation/laptops/lg-laptop.rst

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.. SPDX-License-Identifier: GPL-2.0+
2+
LG Gram laptop extra features
3+
=============================
4+
5+
By Matan Ziv-Av <matan@svgalib.org>
6+
7+
8+
Hotkeys
9+
-------
10+
11+
The following FN keys are ignored by the kernel without this driver:
12+
- FN-F1 (LG control panel) - Generates F15
13+
- FN-F5 (Touchpad toggle) - Generates F13
14+
- FN-F6 (Airplane mode) - Generates RFKILL
15+
- FN-F8 (Keyboard backlight) - Generates F16.
16+
This key also changes keyboard backlight mode.
17+
- FN-F9 (Reader mode) - Generates F14
18+
19+
The rest of the FN key work without a need for a special driver.
20+
21+
22+
Reader mode
23+
-----------
24+
25+
Writing 0/1 to /sys/devices/platform/lg-laptop/reader_mode disables/enables
26+
reader mode. In this mode the screen colors change (blue color reduced),
27+
and the reader mode indicator LED (on F9 key) turns on.
28+
29+
30+
FN Lock
31+
-------
32+
33+
Writing 0/1 to /sys/devices/platform/lg-laptop/fn_lock disables/enables
34+
FN lock.
35+
36+
37+
Battery care limit
38+
------------------
39+
40+
Writing 80/100 to /sys/devices/platform/lg-laptop/battery_care_limit
41+
sets the maximum capacity to charge the battery. Limiting the charge
42+
reduces battery capacity loss over time.
43+
44+
This value is reset to 100 when the kernel boots.
45+
46+
47+
Fan mode
48+
--------
49+
50+
Writing 1/0 to /sys/devices/platform/lg-laptop/fan_mode disables/enables
51+
the fan silent mode.
52+
53+
54+
USB charge
55+
----------
56+
57+
Writing 0/1 to /sys/devices/platform/lg-laptop/usb_charge disables/enables
58+
charging another device from the USB port while the device is turned off.
59+
60+
This value is reset to 0 when the kernel boots.
61+
62+
63+
LEDs
64+
~~~~
65+
66+
The are two LED devices supported by the driver:
67+
68+
Keyboard backlight
69+
------------------
70+
71+
A led device named kbd_led controls the keyboard backlight. There are three
72+
lighting level: off (0), low (127) and high (255).
73+
74+
The keyboard backlight is also controlled by the key combination FN-F8
75+
which cycles through those levels.
76+
77+
78+
Touchpad indicator LED
79+
----------------------
80+
81+
On the F5 key. Controlled by led device names tpad_led.

MAINTAINERS

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ F: drivers/platform/x86/i2c-multi-instantiate.c
376376
ACPI PMIC DRIVERS
377377
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
378378
M: Len Brown <lenb@kernel.org>
379-
R: Andy Shevchenko <andy@infradead.org>
379+
R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
380380
R: Mika Westerberg <mika.westerberg@linux.intel.com>
381381
L: linux-acpi@vger.kernel.org
382382
Q: https://patchwork.kernel.org/project/linux-acpi/list/
@@ -4207,17 +4207,24 @@ M: Pali Rohár <pali.rohar@gmail.com>
42074207
S: Maintained
42084208
F: drivers/platform/x86/dell-rbtn.*
42094209

4210+
DELL REMOTE BIOS UPDATE DRIVER
4211+
M: Stuart Hayes <stuart.w.hayes@gmail.com>
4212+
L: platform-driver-x86@vger.kernel.org
4213+
S: Maintained
4214+
F: drivers/platform/x86/dell_rbu.c
4215+
42104216
DELL LAPTOP SMM DRIVER
42114217
M: Pali Rohár <pali.rohar@gmail.com>
42124218
S: Maintained
42134219
F: drivers/hwmon/dell-smm-hwmon.c
42144220
F: include/uapi/linux/i8k.h
42154221

42164222
DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
4217-
M: Doug Warzecha <Douglas_Warzecha@dell.com>
4223+
M: Stuart Hayes <stuart.w.hayes@gmail.com>
4224+
L: platform-driver-x86@vger.kernel.org
42184225
S: Maintained
42194226
F: Documentation/dcdbas.txt
4220-
F: drivers/firmware/dcdbas.*
4227+
F: drivers/platform/x86/dcdbas.*
42214228

42224229
DELL WMI NOTIFICATIONS DRIVER
42234230
M: Matthew Garrett <mjg59@srcf.ucam.org>
@@ -7347,6 +7354,12 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers)
73477354
S: Supported
73487355
F: sound/soc/intel/
73497356

7357+
INTEL ATOMISP2 DUMMY / POWER-MANAGEMENT DRIVER
7358+
M: Hans de Goede <hdegoede@redhat.com>
7359+
L: platform-driver-x86@vger.kernel.org
7360+
S: Maintained
7361+
F: drivers/platform/x86/intel_atomisp2_pm.c
7362+
73507363
INTEL C600 SERIES SAS CONTROLLER DRIVER
73517364
M: Intel SCU Linux support <intel-linux-scu@intel.com>
73527365
M: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
@@ -7533,7 +7546,6 @@ M: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
75337546
M: Vishwanath Somayaji <vishwanath.somayaji@intel.com>
75347547
L: platform-driver-x86@vger.kernel.org
75357548
S: Maintained
7536-
F: arch/x86/include/asm/pmc_core.h
75377549
F: drivers/platform/x86/intel_pmc_core*
75387550

75397551
INTEL PMC/P-Unit IPC DRIVER
@@ -7577,7 +7589,8 @@ F: drivers/infiniband/hw/i40iw/
75777589
F: include/uapi/rdma/i40iw-abi.h
75787590

75797591
INTEL TELEMETRY DRIVER
7580-
M: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
7592+
M: Rajneesh Bhardwaj <rajneesh.bhardwaj@linux.intel.com>
7593+
M: "David E. Box" <david.e.box@linux.intel.com>
75817594
L: platform-driver-x86@vger.kernel.org
75827595
S: Maintained
75837596
F: arch/x86/include/asm/intel_telemetry.h
@@ -8310,6 +8323,14 @@ W: http://legousb.sourceforge.net/
83108323
S: Maintained
83118324
F: drivers/usb/misc/legousbtower.c
83128325

8326+
LG LAPTOP EXTRAS
8327+
M: Matan Ziv-Av <matan@svgalib.org>
8328+
L: platform-driver-x86@vger.kernel.org
8329+
S: Maintained
8330+
F: Documentation/ABI/testing/sysfs-platform-lg-laptop
8331+
F: Documentation/laptops/lg-laptop.rst
8332+
F: drivers/platform/x86/lg-laptop.c
8333+
83138334
LG2160 MEDIA DRIVER
83148335
M: Michael Krufky <mkrufky@linuxtv.org>
83158336
L: linux-media@vger.kernel.org

drivers/firmware/Kconfig

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -145,34 +145,6 @@ config EFI_PCDP
145145
See DIG64_HCDPv20_042804.pdf available from
146146
<http://www.dig64.org/specifications/>
147147

148-
config DELL_RBU
149-
tristate "BIOS update support for DELL systems via sysfs"
150-
depends on X86
151-
select FW_LOADER
152-
select FW_LOADER_USER_HELPER
153-
help
154-
Say m if you want to have the option of updating the BIOS for your
155-
DELL system. Note you need a Dell OpenManage or Dell Update package (DUP)
156-
supporting application to communicate with the BIOS regarding the new
157-
image for the image update to take effect.
158-
See <file:Documentation/dell_rbu.txt> for more details on the driver.
159-
160-
config DCDBAS
161-
tristate "Dell Systems Management Base Driver"
162-
depends on X86
163-
help
164-
The Dell Systems Management Base Driver provides a sysfs interface
165-
for systems management software to perform System Management
166-
Interrupts (SMIs) and Host Control Actions (system power cycle or
167-
power off after OS shutdown) on certain Dell systems.
168-
169-
See <file:Documentation/dcdbas.txt> for more details on the driver
170-
and the Dell systems on which Dell systems management software makes
171-
use of this driver.
172-
173-
Say Y or M here to enable the driver for use by Dell systems
174-
management software such as Dell OpenManage.
175-
176148
config DMIID
177149
bool "Export DMI identification via sysfs to userspace"
178150
depends on DMI

drivers/firmware/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ obj-$(CONFIG_DMI) += dmi_scan.o
1111
obj-$(CONFIG_DMI_SYSFS) += dmi-sysfs.o
1212
obj-$(CONFIG_EDD) += edd.o
1313
obj-$(CONFIG_EFI_PCDP) += pcdp.o
14-
obj-$(CONFIG_DELL_RBU) += dell_rbu.o
15-
obj-$(CONFIG_DCDBAS) += dcdbas.o
1614
obj-$(CONFIG_DMIID) += dmi-id.o
1715
obj-$(CONFIG_ISCSI_IBFT_FIND) += iscsi_ibft_find.o
1816
obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o

drivers/hid/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ config HID_APPLEIR
149149
config HID_ASUS
150150
tristate "Asus"
151151
depends on LEDS_CLASS
152+
depends on ASUS_WMI || ASUS_WMI=n
152153
---help---
153154
Support for Asus notebook built-in keyboard and touchpad via i2c, and
154155
the Asus Republic of Gamers laptop keyboard special keys.

drivers/hid/hid-asus.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/dmi.h>
3030
#include <linux/hid.h>
3131
#include <linux/module.h>
32+
#include <linux/platform_data/x86/asus-wmi.h>
3233
#include <linux/input/mt.h>
3334
#include <linux/usb.h> /* For to_usb_interface for T100 touchpad intf check */
3435

@@ -349,6 +350,24 @@ static void asus_kbd_backlight_work(struct work_struct *work)
349350
hid_err(led->hdev, "Asus failed to set keyboard backlight: %d\n", ret);
350351
}
351352

353+
/* WMI-based keyboard backlight LED control (via asus-wmi driver) takes
354+
* precedence. We only activate HID-based backlight control when the
355+
* WMI control is not available.
356+
*/
357+
static bool asus_kbd_wmi_led_control_present(struct hid_device *hdev)
358+
{
359+
u32 value;
360+
int ret;
361+
362+
ret = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2,
363+
ASUS_WMI_DEVID_KBD_BACKLIGHT, 0, &value);
364+
hid_dbg(hdev, "WMI backlight check: rc %d value %x", ret, value);
365+
if (ret)
366+
return false;
367+
368+
return !!(value & ASUS_WMI_DSTS_PRESENCE_BIT);
369+
}
370+
352371
static int asus_kbd_register_leds(struct hid_device *hdev)
353372
{
354373
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
@@ -436,7 +455,9 @@ static int asus_input_configured(struct hid_device *hdev, struct hid_input *hi)
436455

437456
drvdata->input = input;
438457

439-
if (drvdata->enable_backlight && asus_kbd_register_leds(hdev))
458+
if (drvdata->enable_backlight &&
459+
!asus_kbd_wmi_led_control_present(hdev) &&
460+
asus_kbd_register_leds(hdev))
440461
hid_warn(hdev, "Failed to initialize backlight.\n");
441462

442463
return 0;

drivers/platform/x86/Kconfig

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ config ACERHDF
6060

6161
After loading this driver the BIOS is still in control of the fan.
6262
To let the kernel handle the fan, do:
63-
echo -n enabled > /sys/class/thermal/thermal_zone0/mode
63+
echo -n enabled > /sys/class/thermal/thermal_zoneN/mode
64+
where N=0,1,2... depending on the number of thermal nodes and the
65+
detection order of your particular system. The "type" parameter
66+
in the same node directory will tell you if it is "acerhdf".
6467

6568
For more information about this driver see
6669
<http://piie.net/files/acerhdf_README.txt>
@@ -105,6 +108,22 @@ config ASUS_LAPTOP
105108

106109
If you have an ACPI-compatible ASUS laptop, say Y or M here.
107110

111+
config DCDBAS
112+
tristate "Dell Systems Management Base Driver"
113+
depends on X86
114+
help
115+
The Dell Systems Management Base Driver provides a sysfs interface
116+
for systems management software to perform System Management
117+
Interrupts (SMIs) and Host Control Actions (system power cycle or
118+
power off after OS shutdown) on certain Dell systems.
119+
120+
See <file:Documentation/dcdbas.txt> for more details on the driver
121+
and the Dell systems on which Dell systems management software makes
122+
use of this driver.
123+
124+
Say Y or M here to enable the driver for use by Dell systems
125+
management software such as Dell OpenManage.
126+
108127
#
109128
# The DELL_SMBIOS driver depends on ACPI_WMI and/or DCDBAS if those
110129
# backends are selected. The "depends" line prevents a configuration
@@ -227,6 +246,18 @@ config DELL_RBTN
227246
To compile this driver as a module, choose M here: the module will
228247
be called dell-rbtn.
229248

249+
config DELL_RBU
250+
tristate "BIOS update support for DELL systems via sysfs"
251+
depends on X86
252+
select FW_LOADER
253+
select FW_LOADER_USER_HELPER
254+
help
255+
Say m if you want to have the option of updating the BIOS for your
256+
DELL system. Note you need a Dell OpenManage or Dell Update package (DUP)
257+
supporting application to communicate with the BIOS regarding the new
258+
image for the image update to take effect.
259+
See <file:Documentation/dell_rbu.txt> for more details on the driver.
260+
230261

231262
config FUJITSU_LAPTOP
232263
tristate "Fujitsu Laptop Extras"
@@ -336,6 +367,20 @@ config HP_WMI
336367
To compile this driver as a module, choose M here: the module will
337368
be called hp-wmi.
338369

370+
config LG_LAPTOP
371+
tristate "LG Laptop Extras"
372+
depends on ACPI
373+
depends on ACPI_WMI
374+
depends on INPUT
375+
select INPUT_SPARSEKMAP
376+
select LEDS_CLASS
377+
help
378+
This driver adds support for hotkeys as well as control of keyboard
379+
backlight, battery maximum charge level and various other ACPI
380+
features.
381+
382+
If you have an LG Gram laptop, say Y or M here.
383+
339384
config MSI_LAPTOP
340385
tristate "MSI Laptop Extras"
341386
depends on ACPI
@@ -1231,6 +1276,18 @@ config I2C_MULTI_INSTANTIATE
12311276
To compile this driver as a module, choose M here: the module
12321277
will be called i2c-multi-instantiate.
12331278

1279+
config INTEL_ATOMISP2_PM
1280+
tristate "Intel AtomISP2 dummy / power-management driver"
1281+
depends on PCI && IOSF_MBI && PM
1282+
help
1283+
Power-management driver for Intel's Image Signal Processor found on
1284+
Bay and Cherry Trail devices. This dummy driver's sole purpose is to
1285+
turn the ISP off (put it in D3) to save power and to allow entering
1286+
of S0ix modes.
1287+
1288+
To compile this driver as a module, choose M here: the module
1289+
will be called intel_atomisp2_pm.
1290+
12341291
endif # X86_PLATFORM_DEVICES
12351292

12361293
config PMC_ATOM

0 commit comments

Comments
 (0)