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

Commit dbbdf54c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull x86 platform driver updates from Darren Hart:

 - use MODULE_DEVICE_TABLE across several wmi drivers, keeping
   wmi_device_id and MODULE_ALIAS() declarations in sync

 - add several Ideapad models to the no_hw_rfkill list

 - add support for new Mellanox platforms, including new fan and LED
   functionality

 - address Dell keyboard backlight change event and power button release
   issues

 - update dell_rbu to use appropriate memory allocation mechanisms

 - several small fixes and Ice Lake support for intel_pmc_core

 - fix a suspend regression for Cherry Trail based devices in
   intel_int0002_vgpio

 - a few other routine fixes

* tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86: (50 commits)
  MAINTAINERS: Include mlxreg.h in Mellanox Platform Driver files
  platform/x86: ideapad-laptop: Add S130-14IGM to no_hw_rfkill list
  platform/x86: mlx-platform: Fix access mode for fan_dir attribute
  platform/x86: mlx-platform: Add UID LED for the next generation systems
  platform/x86: mlx-platform: Add extra CPLD for next generation systems
  platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
  platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
  modpost: file2alias: define size of alias
  platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Air tablet
  platform/x86: ideapad-laptop: Add Ideapad 530S-14ARR to no_hw_rfkill list
  platform/x86: ideapad-laptop: Add Yoga C930 to no_hw_rfkill_list
  platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown
  platform/x86: intel_pmc_core: Add Package cstates residency info
  platform/x86: intel_pmc_core: Add ICL platform support
  ...
parents 45ba8d5d 9c22cc02
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -21,7 +21,19 @@ Description: These files show with which CPLD versions have been burned
		The files are read only.

What:		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
							cpld3_version
							fan_dir

Date:		December 2018
KernelVersion:	5.0
Contact:	Vadim Pasternak <vadimpmellanox.com>
Description:	This file shows the system fans direction:
		forward direction - relevant bit is set 0;
		reversed direction - relevant bit is set 1.

		The files are read only.

What:		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
							jtag_enable

Date:		November 2018
KernelVersion:	5.0
+1 −0
Original line number Diff line number Diff line
@@ -9900,6 +9900,7 @@ M: Vadim Pasternak <vadimp@mellanox.com>
L:	platform-driver-x86@vger.kernel.org
S:	Supported
F:	drivers/platform/mellanox/
F:	include/linux/platform_data/mlxreg.h

MELLANOX MLX4 core VPI driver
M:	Tariq Toukan <tariqt@mellanox.com>
+1 −0
Original line number Diff line number Diff line
@@ -1545,6 +1545,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
	 */
	static const struct acpi_device_id i2c_multi_instantiate_ids[] = {
		{"BSG1160", },
		{"BSG2150", },
		{"INT33FE", },
		{"INT3515", },
		{}
+19 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#define MLXREG_LED_AMBER_SOLID		0x09 /* Solid amber */
#define MLXREG_LED_BLINK_3HZ		167 /* ~167 msec off/on - HW support */
#define MLXREG_LED_BLINK_6HZ		83 /* ~83 msec off/on - HW support */
#define MLXREG_LED_CAPABILITY_CLEAR	GENMASK(31, 8) /* Clear mask */

/**
 * struct mlxreg_led_data - led control data:
@@ -187,6 +188,7 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
	struct mlxreg_led_data *led_data;
	struct led_classdev *led_cdev;
	enum led_brightness brightness;
	u32 regval;
	int i;
	int err;

@@ -196,6 +198,23 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv)
		if (!led_data)
			return -ENOMEM;

		if (data->capability) {
			err = regmap_read(led_pdata->regmap, data->capability,
					  &regval);
			if (err) {
				dev_err(&priv->pdev->dev, "Failed to query capability register\n");
				return err;
			}
			if (!(regval & data->bit))
				continue;
			/*
			 * Field "bit" can contain one capability bit in 0 byte
			 * and offset bit in 1-3 bytes. Clear capability bit and
			 * keep only offset bit.
			 */
			data->bit &= MLXREG_LED_CAPABILITY_CLEAR;
		}

		led_cdev = &led_data->led_cdev;
		led_data->data_parent = priv;
		if (strstr(data->label, "red") ||
+25 −3
Original line number Diff line number Diff line
@@ -248,7 +248,8 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv,
			   struct mlxreg_core_item *item)
{
	struct mlxreg_core_data *data;
	u32 asserted, regval, bit;
	unsigned long asserted;
	u32 regval, bit;
	int ret;

	/*
@@ -281,7 +282,7 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv,
	asserted = item->cache ^ regval;
	item->cache = regval;

	for_each_set_bit(bit, (unsigned long *)&asserted, 8) {
	for_each_set_bit(bit, &asserted, 8) {
		data = item->data + bit;
		if (regval & BIT(bit)) {
			if (item->inversed)
@@ -495,7 +496,9 @@ static int mlxreg_hotplug_set_irq(struct mlxreg_hotplug_priv_data *priv)
{
	struct mlxreg_core_hotplug_platform_data *pdata;
	struct mlxreg_core_item *item;
	int i, ret;
	struct mlxreg_core_data *data;
	u32 regval;
	int i, j, ret;

	pdata = dev_get_platdata(&priv->pdev->dev);
	item = pdata->items;
@@ -507,6 +510,25 @@ static int mlxreg_hotplug_set_irq(struct mlxreg_hotplug_priv_data *priv)
		if (ret)
			goto out;

		/*
		 * Verify if hardware configuration requires to disable
		 * interrupt capability for some of components.
		 */
		data = item->data;
		for (j = 0; j < item->count; j++, data++) {
			/* Verify if the attribute has capability register. */
			if (data->capability) {
				/* Read capability register. */
				ret = regmap_read(priv->regmap,
						  data->capability, &regval);
				if (ret)
					goto out;

				if (!(regval & data->bit))
					item->mask &= ~BIT(j);
			}
		}

		/* Set group initial status as mask and unmask group event. */
		if (item->inversed) {
			item->cache = item->mask;
Loading