Skip to content

Commit

Permalink
Merge tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/l…
Browse files Browse the repository at this point in the history
…inux-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
  ...
  • Loading branch information
torvalds committed Nov 1, 2018
2 parents 5b74498 + 3b692c5 commit eb7046e
Show file tree
Hide file tree
Showing 47 changed files with 1,587 additions and 494 deletions.
35 changes: 35 additions & 0 deletions Documentation/ABI/testing/sysfs-platform-lg-laptop
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
What: /sys/devices/platform/lg-laptop/reader_mode
Date: October 2018
KernelVersion: 4.20
Contact: "Matan Ziv-Av <matan@svgalib.org>
Description:
Control reader mode. 1 means on, 0 means off.

What: /sys/devices/platform/lg-laptop/fn_lock
Date: October 2018
KernelVersion: 4.20
Contact: "Matan Ziv-Av <matan@svgalib.org>
Description:
Control FN lock mode. 1 means on, 0 means off.

What: /sys/devices/platform/lg-laptop/battery_care_limit
Date: October 2018
KernelVersion: 4.20
Contact: "Matan Ziv-Av <matan@svgalib.org>
Description:
Maximal battery charge level. Accepted values are 80 or 100.

What: /sys/devices/platform/lg-laptop/fan_mode
Date: October 2018
KernelVersion: 4.20
Contact: "Matan Ziv-Av <matan@svgalib.org>
Description:
Control fan mode. 1 for performance mode, 0 for silent mode.

What: /sys/devices/platform/lg-laptop/usb_charge
Date: October 2018
KernelVersion: 4.20
Contact: "Matan Ziv-Av <matan@svgalib.org>
Description:
Control USB port charging when device is turned off.
1 means on, 0 means off.
81 changes: 81 additions & 0 deletions Documentation/laptops/lg-laptop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. SPDX-License-Identifier: GPL-2.0+
LG Gram laptop extra features
=============================

By Matan Ziv-Av <matan@svgalib.org>


Hotkeys
-------

The following FN keys are ignored by the kernel without this driver:
- FN-F1 (LG control panel) - Generates F15
- FN-F5 (Touchpad toggle) - Generates F13
- FN-F6 (Airplane mode) - Generates RFKILL
- FN-F8 (Keyboard backlight) - Generates F16.
This key also changes keyboard backlight mode.
- FN-F9 (Reader mode) - Generates F14

The rest of the FN key work without a need for a special driver.


Reader mode
-----------

Writing 0/1 to /sys/devices/platform/lg-laptop/reader_mode disables/enables
reader mode. In this mode the screen colors change (blue color reduced),
and the reader mode indicator LED (on F9 key) turns on.


FN Lock
-------

Writing 0/1 to /sys/devices/platform/lg-laptop/fn_lock disables/enables
FN lock.


Battery care limit
------------------

Writing 80/100 to /sys/devices/platform/lg-laptop/battery_care_limit
sets the maximum capacity to charge the battery. Limiting the charge
reduces battery capacity loss over time.

This value is reset to 100 when the kernel boots.


Fan mode
--------

Writing 1/0 to /sys/devices/platform/lg-laptop/fan_mode disables/enables
the fan silent mode.


USB charge
----------

Writing 0/1 to /sys/devices/platform/lg-laptop/usb_charge disables/enables
charging another device from the USB port while the device is turned off.

This value is reset to 0 when the kernel boots.


LEDs
~~~~

The are two LED devices supported by the driver:

Keyboard backlight
------------------

A led device named kbd_led controls the keyboard backlight. There are three
lighting level: off (0), low (127) and high (255).

The keyboard backlight is also controlled by the key combination FN-F8
which cycles through those levels.


Touchpad indicator LED
----------------------

On the F5 key. Controlled by led device names tpad_led.
31 changes: 26 additions & 5 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ F: drivers/platform/x86/i2c-multi-instantiate.c
ACPI PMIC DRIVERS
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
M: Len Brown <lenb@kernel.org>
R: Andy Shevchenko <andy@infradead.org>
R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
R: Mika Westerberg <mika.westerberg@linux.intel.com>
L: linux-acpi@vger.kernel.org
Q: https://patchwork.kernel.org/project/linux-acpi/list/
Expand Down Expand Up @@ -4207,17 +4207,24 @@ M: Pali Rohár <pali.rohar@gmail.com>
S: Maintained
F: drivers/platform/x86/dell-rbtn.*

DELL REMOTE BIOS UPDATE DRIVER
M: Stuart Hayes <stuart.w.hayes@gmail.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: drivers/platform/x86/dell_rbu.c

DELL LAPTOP SMM DRIVER
M: Pali Rohár <pali.rohar@gmail.com>
S: Maintained
F: drivers/hwmon/dell-smm-hwmon.c
F: include/uapi/linux/i8k.h

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

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

INTEL ATOMISP2 DUMMY / POWER-MANAGEMENT DRIVER
M: Hans de Goede <hdegoede@redhat.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: drivers/platform/x86/intel_atomisp2_pm.c

INTEL C600 SERIES SAS CONTROLLER DRIVER
M: Intel SCU Linux support <intel-linux-scu@intel.com>
M: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Expand Down Expand Up @@ -7533,7 +7546,6 @@ M: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
M: Vishwanath Somayaji <vishwanath.somayaji@intel.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: arch/x86/include/asm/pmc_core.h
F: drivers/platform/x86/intel_pmc_core*

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

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

LG LAPTOP EXTRAS
M: Matan Ziv-Av <matan@svgalib.org>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: Documentation/ABI/testing/sysfs-platform-lg-laptop
F: Documentation/laptops/lg-laptop.rst
F: drivers/platform/x86/lg-laptop.c

LG2160 MEDIA DRIVER
M: Michael Krufky <mkrufky@linuxtv.org>
L: linux-media@vger.kernel.org
Expand Down
28 changes: 0 additions & 28 deletions drivers/firmware/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,6 @@ config EFI_PCDP
See DIG64_HCDPv20_042804.pdf available from
<http://www.dig64.org/specifications/>

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

config DCDBAS
tristate "Dell Systems Management Base Driver"
depends on X86
help
The Dell Systems Management Base Driver provides a sysfs interface
for systems management software to perform System Management
Interrupts (SMIs) and Host Control Actions (system power cycle or
power off after OS shutdown) on certain Dell systems.

See <file:Documentation/dcdbas.txt> for more details on the driver
and the Dell systems on which Dell systems management software makes
use of this driver.

Say Y or M here to enable the driver for use by Dell systems
management software such as Dell OpenManage.

config DMIID
bool "Export DMI identification via sysfs to userspace"
depends on DMI
Expand Down
2 changes: 0 additions & 2 deletions drivers/firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ obj-$(CONFIG_DMI) += dmi_scan.o
obj-$(CONFIG_DMI_SYSFS) += dmi-sysfs.o
obj-$(CONFIG_EDD) += edd.o
obj-$(CONFIG_EFI_PCDP) += pcdp.o
obj-$(CONFIG_DELL_RBU) += dell_rbu.o
obj-$(CONFIG_DCDBAS) += dcdbas.o
obj-$(CONFIG_DMIID) += dmi-id.o
obj-$(CONFIG_ISCSI_IBFT_FIND) += iscsi_ibft_find.o
obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ config HID_APPLEIR
config HID_ASUS
tristate "Asus"
depends on LEDS_CLASS
depends on ASUS_WMI || ASUS_WMI=n
---help---
Support for Asus notebook built-in keyboard and touchpad via i2c, and
the Asus Republic of Gamers laptop keyboard special keys.
Expand Down
23 changes: 22 additions & 1 deletion drivers/hid/hid-asus.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/dmi.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/platform_data/x86/asus-wmi.h>
#include <linux/input/mt.h>
#include <linux/usb.h> /* For to_usb_interface for T100 touchpad intf check */

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

/* WMI-based keyboard backlight LED control (via asus-wmi driver) takes
* precedence. We only activate HID-based backlight control when the
* WMI control is not available.
*/
static bool asus_kbd_wmi_led_control_present(struct hid_device *hdev)
{
u32 value;
int ret;

ret = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2,
ASUS_WMI_DEVID_KBD_BACKLIGHT, 0, &value);
hid_dbg(hdev, "WMI backlight check: rc %d value %x", ret, value);
if (ret)
return false;

return !!(value & ASUS_WMI_DSTS_PRESENCE_BIT);
}

static int asus_kbd_register_leds(struct hid_device *hdev)
{
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
Expand Down Expand Up @@ -436,7 +455,9 @@ static int asus_input_configured(struct hid_device *hdev, struct hid_input *hi)

drvdata->input = input;

if (drvdata->enable_backlight && asus_kbd_register_leds(hdev))
if (drvdata->enable_backlight &&
!asus_kbd_wmi_led_control_present(hdev) &&
asus_kbd_register_leds(hdev))
hid_warn(hdev, "Failed to initialize backlight.\n");

return 0;
Expand Down
59 changes: 58 additions & 1 deletion drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ config ACERHDF

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

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

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

config DCDBAS
tristate "Dell Systems Management Base Driver"
depends on X86
help
The Dell Systems Management Base Driver provides a sysfs interface
for systems management software to perform System Management
Interrupts (SMIs) and Host Control Actions (system power cycle or
power off after OS shutdown) on certain Dell systems.

See <file:Documentation/dcdbas.txt> for more details on the driver
and the Dell systems on which Dell systems management software makes
use of this driver.

Say Y or M here to enable the driver for use by Dell systems
management software such as Dell OpenManage.

#
# The DELL_SMBIOS driver depends on ACPI_WMI and/or DCDBAS if those
# backends are selected. The "depends" line prevents a configuration
Expand Down Expand Up @@ -227,6 +246,18 @@ config DELL_RBTN
To compile this driver as a module, choose M here: the module will
be called dell-rbtn.

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


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

config LG_LAPTOP
tristate "LG Laptop Extras"
depends on ACPI
depends on ACPI_WMI
depends on INPUT
select INPUT_SPARSEKMAP
select LEDS_CLASS
help
This driver adds support for hotkeys as well as control of keyboard
backlight, battery maximum charge level and various other ACPI
features.

If you have an LG Gram laptop, say Y or M here.

config MSI_LAPTOP
tristate "MSI Laptop Extras"
depends on ACPI
Expand Down Expand Up @@ -1231,6 +1276,18 @@ config I2C_MULTI_INSTANTIATE
To compile this driver as a module, choose M here: the module
will be called i2c-multi-instantiate.

config INTEL_ATOMISP2_PM
tristate "Intel AtomISP2 dummy / power-management driver"
depends on PCI && IOSF_MBI && PM
help
Power-management driver for Intel's Image Signal Processor found on
Bay and Cherry Trail devices. This dummy driver's sole purpose is to
turn the ISP off (put it in D3) to save power and to allow entering
of S0ix modes.

To compile this driver as a module, choose M here: the module
will be called intel_atomisp2_pm.

endif # X86_PLATFORM_DEVICES

config PMC_ATOM
Expand Down
Loading

0 comments on commit eb7046e

Please sign in to comment.