Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dfaeb61 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86

Pull x86 platform driver updates from Darren Hart:
 "Introduce new bus architecture for WMI and expose BMOF data through
  sysfs. Correct several assumptions about WMI instance number from 1 to
  0. Further fujitsu-laptop cleanups, continuing to prepare for
  separation into two modules. Add support for several new ideapad
  laptops and silead-based tablets. Various minor fixes and const
  cleanups.

  Detail summary:

  sony-laptop:
   - constify attribute_group and input index array

  fujitsu-laptop:
   - rework debugging
   - do not evaluate ACPI _INI methods
   - do not update ACPI device power status
   - sanitize hotkey input device identification
   - use strcpy to set ACPI device names and classes
   - remove redundant safety checks
   - use device-specific data in remaining module code
   - use device-specific data in LED-related code
   - explicitly pass ACPI device to call_fext_func()
   - track the last instantiated FUJ02E3 ACPI device
   - allocate fujitsu_laptop in acpi_fujitsu_laptop_add()
   - use device-specific data in backlight code
   - allocate fujitsu_bl in acpi_fujitsu_bl_add()
   - distinguish current uses of device-specific data

  msi-laptop:
   - constify msipf*_attribute_group

  eeepc-laptop:
   - constify platform_attribute_group

  toshiba_haps:
   - constify haps_attr_group

  dell-wmi-led:
   - Adjust instance of wmi_evaluate_method calls to 0

  alienware-wmi:
   - Adjust instance of wmi_evaluate_method calls to 0

  intel_menlow:
   - Add const to thermal_cooling_device_ops structure

  acerhdf:
   - Add const to thermal_cooling_device_ops structure

  dell-laptop:
   - Fix bogus keyboard backlight sysfs interface

  acer-wmi:
   - Using zero as first WMI instance number
   - Detect RF Button capability

  ideapad-laptop:
   - Add Y720-15IKBN to no_hw_rfkill
   - Add Y520-15IKBN to no_hw_rfkill
   - constify rfkill_ops structure
   - Squelch ACPI event 1
   - hide unused 'touchpad_store'
   - Switch touchpad attribute to be RO
   - Add sysfs interface for touchpad state

  silead_dmi:
   - Add touchscreen info for PoV mobii wintab p800w
   - Add touchscreen info for Pipo W2S tablet
   - Add touchscreen info for GP-electronic T701

  dell-rbtn:
   - constify rfkill_ops structures
   - Improve explanation about DELLABC6

  samsung-laptop:
   - constify rfkill_ops structures

  panasonic-laptop:
   - remove unused code

  samsung-laptop:
   - Initialize loca variable

  dell-wmi:
   - Convert to the WMI bus infrastructure
   - Add a better description for "stealth mode"
   - Add a comment explaining the 0xb2 magic number

  wmi-bmof:
   - New driver to expose embedded Binary WMI MOF metadata

  wmi*:
   - Fix printing info about WDG structure
   - Add recent copyright statements
   - Require query for data blocks, rename writable to setable
   - Add an interface for subdrivers to access sibling devices
   - Bind the platform device, not the ACPI node
   - Add a new interface to read block data
   - Incorporate acpi_install_notify_handler
   - Instantiate all devices before adding them
   - Probe data objects for read and write capabilities
   - Split devices into types and add basic sysfs attributes
   - Fix error handling when creating devices
   - Turn WMI into a bus driver
   - Track wmi devices per ACPI device
   - Clean up acpi_wmi_add
   - Pass the acpi_device through to parse_wdg
   - Drop "Mapper (un)loaded" messages

  intel_cht_int33fe:
   - Set supplied-from property on max17047 dev

  intel_pmc_ipc:
   - Mark ipc_data_readb() as __maybe_unused

  topstar-laptop:
   - Add new device id

  peaq-wmi:
   - Add new peaq-wmi driver

  thinkpad_acpi:
   - Add a comment about 0 in module_param_call()
   - Join string literals back

  toshiba_acpi:
   - use memdup_user_nul"

* tag 'platform-drivers-x86-v4.13-1' of git://git.infradead.org/linux-platform-drivers-x86: (67 commits)
  platform/x86: sony-laptop: constify attribute_group and input index array
  platform/x86: fujitsu-laptop: rework debugging
  platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods
  platform/x86: fujitsu-laptop: do not update ACPI device power status
  platform/x86: fujitsu-laptop: sanitize hotkey input device identification
  platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes
  platform/x86: fujitsu-laptop: remove redundant safety checks
  platform/x86: msi-laptop: constify msipf*_attribute_group
  platform/x86: eeepc-laptop: constify platform_attribute_group
  platform/x86: toshiba_haps: constify haps_attr_group
  platform/x86: dell-wmi-led: Adjust instance of wmi_evaluate_method calls to 0
  platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0
  platform/x86: intel_menlow: Add const to thermal_cooling_device_ops structure
  platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure
  platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface
  platform/x86: acer-wmi: Using zero as first WMI instance number
  platform/x86: ideapad-laptop: Add Y720-15IKBN to no_hw_rfkill
  platform/x86: ideapad-laptop: Add Y520-15IKBN to no_hw_rfkill
  platform/x86: silead_dmi: Add touchscreen info for PoV mobii wintab p800w
  platform/x86: silead_dmi: Add touchscreen info for Pipo W2S tablet
  ...
parents 90311148 d791db9a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -17,3 +17,11 @@ Description:
			* 2 -> Dust Cleaning
			* 4 -> Efficient Thermal Dissipation Mode

What:		/sys/devices/platform/ideapad/touchpad
Date:		May 2017
KernelVersion:	4.13
Contact:	"Ritesh Raj Sarraf <rrs@debian.org>"
Description:
		Control touchpad mode.
			* 1 -> Switched On
			* 0 -> Switched Off
+19 −10
Original line number Diff line number Diff line
@@ -195,16 +195,6 @@ config FUJITSU_LAPTOP

	  If you have a Fujitsu laptop, say Y or M here.

config FUJITSU_LAPTOP_DEBUG
	bool "Verbose debug mode for Fujitsu Laptop Extras"
	depends on FUJITSU_LAPTOP
	default n
	---help---
	  Enables extra debug output from the fujitsu extras driver, at the
	  expense of a slight increase in driver size.

	  If you are not sure, say N here.

config FUJITSU_TABLET
       tristate "Fujitsu Tablet Extras"
       depends on ACPI
@@ -656,6 +646,18 @@ config ACPI_WMI
	  It is safe to enable this driver even if your DSDT doesn't define
	  any ACPI-WMI devices.

config WMI_BMOF
	tristate "WMI embedded Binary MOF driver"
	depends on ACPI_WMI
	default ACPI_WMI
	---help---
	  Say Y here if you want to be able to read a firmware-embedded
	  WMI Binary MOF data. Using this requires userspace tools and may be
	  rather tedious.

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

config MSI_WMI
	tristate "MSI WMI extras"
	depends on ACPI_WMI
@@ -669,6 +671,13 @@ config MSI_WMI
	 To compile this driver as a module, choose M here: the module will
	 be called msi-wmi.

config PEAQ_WMI
	tristate "PEAQ 2-in-1 WMI hotkey driver"
	depends on ACPI_WMI
	depends on INPUT
	help
	 Say Y here if you want to support WMI-based hotkeys on PEAQ 2-in-1s.

config TOPSTAR_LAPTOP
	tristate "Topstar Laptop Extras"
	depends on ACPI
+2 −0
Original line number Diff line number Diff line
@@ -35,8 +35,10 @@ obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o
obj-$(CONFIG_INTEL_MENLOW)	+= intel_menlow.o
obj-$(CONFIG_ACPI_WMI)		+= wmi.o
obj-$(CONFIG_MSI_WMI)		+= msi-wmi.o
obj-$(CONFIG_PEAQ_WMI)		+= peaq-wmi.o
obj-$(CONFIG_SURFACE3_WMI)	+= surface3-wmi.o
obj-$(CONFIG_TOPSTAR_LAPTOP)	+= topstar-laptop.o
obj-$(CONFIG_WMI_BMOF)		+= wmi-bmof.o

# toshiba_acpi must link after wmi to ensure that wmi devices are found
# before toshiba_acpi initializes
+11 −4
Original line number Diff line number Diff line
@@ -149,6 +149,8 @@ struct event_return_value {
#define ACER_WMID3_GDS_THREEG		(1<<6)	/* 3G */
#define ACER_WMID3_GDS_WIMAX		(1<<7)	/* WiMAX */
#define ACER_WMID3_GDS_BLUETOOTH	(1<<11)	/* BT */
#define ACER_WMID3_GDS_RFBTN		(1<<14)	/* RF Button */

#define ACER_WMID3_GDS_TOUCHPAD		(1<<1)	/* Touchpad */

/* Hotkey Customized Setting and Acer Application Status.
@@ -221,6 +223,7 @@ struct hotkey_function_type_aa {
#define ACER_CAP_BRIGHTNESS		(1<<3)
#define ACER_CAP_THREEG			(1<<4)
#define ACER_CAP_ACCEL			(1<<5)
#define ACER_CAP_RFBTN			(1<<6)
#define ACER_CAP_ANY			(0xFFFFFFFF)

/*
@@ -700,7 +703,7 @@ struct acpi_buffer *result)
	input.length = sizeof(struct wmab_args);
	input.pointer = (u8 *)regbuf;

	status = wmi_evaluate_method(AMW0_GUID1, 1, 1, &input, result);
	status = wmi_evaluate_method(AMW0_GUID1, 0, 1, &input, result);

	return status;
}
@@ -965,7 +968,7 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out)
	u32 tmp = 0;
	acpi_status status;

	status = wmi_evaluate_method(WMID_GUID1, 1, method_id, &input, &result);
	status = wmi_evaluate_method(WMID_GUID1, 0, method_id, &input, &result);

	if (ACPI_FAILURE(status))
		return status;
@@ -1264,6 +1267,10 @@ static void __init type_aa_dmi_decode(const struct dmi_header *header, void *d)
		interface->capability |= ACER_CAP_THREEG;
	if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH)
		interface->capability |= ACER_CAP_BLUETOOTH;
	if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_RFBTN) {
		interface->capability |= ACER_CAP_RFBTN;
		commun_func_bitmap &= ~ACER_WMID3_GDS_RFBTN;
	}

	commun_fn_key_number = type_aa->commun_fn_key_number;
}
@@ -1275,7 +1282,7 @@ static acpi_status __init WMID_set_capabilities(void)
	acpi_status status;
	u32 devices;

	status = wmi_query_block(WMID_GUID2, 1, &out);
	status = wmi_query_block(WMID_GUID2, 0, &out);
	if (ACPI_FAILURE(status))
		return status;

@@ -2018,7 +2025,7 @@ static u32 get_wmid_devices(void)
	acpi_status status;
	u32 devices = 0;

	status = wmi_query_block(WMID_GUID2, 1, &out);
	status = wmi_query_block(WMID_GUID2, 0, &out);
	if (ACPI_FAILURE(status))
		return 0;

+1 −1
Original line number Diff line number Diff line
@@ -557,7 +557,7 @@ static int acerhdf_set_cur_state(struct thermal_cooling_device *cdev,
}

/* bind fan callbacks to fan device */
static struct thermal_cooling_device_ops acerhdf_cooling_ops = {
static const struct thermal_cooling_device_ops acerhdf_cooling_ops = {
	.get_max_state = acerhdf_get_max_state,
	.get_cur_state = acerhdf_get_cur_state,
	.set_cur_state = acerhdf_set_cur_state,
Loading