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

Commit 899fbc33 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull x86 platform driver updates from Andy Shevchenko:

 - The driver for Silead touchscreen configurations has been renamed
   from silead_dmi to touchscreen_dmi since it starts supporting other
   touchscreens which require some DMI quirks

   It also gets expanded to cover cases for Chuwi Vi10, ONDA V891W,
   Connect Tablet 9, Onda V820w, and Cube KNote i1101 tablets.

 - Another bunch of changes is related to Mellanox platform code to
   allow user space to communicate with Mellanox for system control and
   monitoring purposes. The driver notifies user on hotplug device
   signal receiving.

 - ASUS WMI drivers recognize lid flip action on UX360, and correctly
   toggles airplane mode LED. In addition the keyboard backlight toggle
   gets support.

 - ThinkPad ACPI driver enables support for calculator key (on at least
   P52). It also has been fixed to support three characters model
   designators, which are used for modern laptops. Earlier the battery,
   marked as BAT1, on ThinkPad laptops has not been configured properly,
   which is fixed. On the opposite the multi-battery configurations now
   probed correctly.

 - Dell SMBIOS driver starts working on some Dell servers which do not
   support token interface. The regression with backlight detection has
   also been fixed. In order to support dock mode on some laptops, Intel
   virtual button driver has been fixed. The last but not least is the
   fix to Intel HID driver due to changes in Dell systems that prevented
   to use power button.

* tag 'platform-drivers-x86-v4.19-1' of git://git.infradead.org/linux-platform-drivers-x86: (47 commits)
  platform/x86: acer-wmi: Silence "unsupported" message a bit
  platform/x86: intel_punit_ipc: fix build errors
  platform/x86: ideapad: Add Y520-15IKBM and Y720-15IKBM to no_hw_rfkill
  platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360
  platform/x86: acer-wmi: refactor function has_cap
  platform/x86: thinkpad_acpi: Fix multi-battery bug
  platform/x86: thinkpad_acpi: extend battery quirk coverage
  platform/x86: touchscreen_dmi: Add info for the Cube KNote i1101 tablet
  platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()
  platform/x86: mlx-platform: Remove unused define
  platform/x86: mlx-platform: Change mlxreg-io configuration for MSN274x systems
  Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
  platform/x86: mlx-platform: Allow mlxreg-io driver activation for more systems
  platform/x86: mlx-platform: Add ASIC hotplug device configuration
  platform/mellanox: mlxreg-hotplug: Add hotplug hwmon uevent notification
  platform/mellanox: mlxreg-hotplug: Improve mechanism of ASIC health discovery
  platform/x86: mlx-platform: Add mlxreg-fan platform driver activation
  platform/x86: dell-laptop: Fix backlight detection
  platform/x86: toshiba_acpi: Fix defined but not used build warnings
  platform/x86: thinkpad_acpi: Support battery quirk
  ...
parents 2edd73a4 9bd5196e
Loading
Loading
Loading
Loading
+78 −0
Original line number Diff line number Diff line
What:		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
							asic_health

Date:		June 2018
KernelVersion:	4.19
Contact:	Vadim Pasternak <vadimpmellanox.com>
Description:	This file shows ASIC health status. The possible values are:
		0 - health failed, 2 - health OK, 3 - ASIC in booting state.

		The files are read only.

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

Date:		June 2018
KernelVersion:	4.19
Contact:	Vadim Pasternak <vadimpmellanox.com>
Description:	These files show with which CPLD versions have been burned
		on carrier and switch boards.

		The files are read only.

What:		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/select_iio
Date:		June 2018
KernelVersion:	4.19
Contact:	Vadim Pasternak <vadimpmellanox.com>
Description:	This file allows iio devices selection.

		Attribute select_iio can be written with 0 or with 1. It
		selects which one of iio devices can be accessed.

		The file is read/write.

What:		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu1_on
		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu2_on
		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle
		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_down
Date:		June 2018
KernelVersion:	4.19
Contact:	Vadim Pasternak <vadimpmellanox.com>
Description:	These files allow asserting system power cycling, switching
		power supply units on and off and system's main power domain
		shutdown.
		Expected behavior:
		When pwr_cycle is written 1: auxiliary power domain will go
		down and after short period (about 1 second) up.
		When  psu1_on or psu2_on is written 1, related unit will be
		disconnected from the power source, when written 0 - connected.
		If both are written 1 - power supplies main power domain will
		go down.
		When pwr_down is written 1, system's main power domain will go
		down.

		The files are write only.

What:		/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
							reset_aux_pwr_or_ref
							reset_asic_thermal
							reset_hotswap_or_halt
							reset_hotswap_or_wd
							reset_fw_reset
							reset_long_pb
							reset_main_pwr_fail
							reset_short_pb
							reset_sw_reset
Date:		June 2018
KernelVersion:	4.19
Contact:	Vadim Pasternak <vadimpmellanox.com>
Description:	These files show the system reset cause, as following: power
		auxiliary outage or power refresh, ASIC thermal shutdown, halt,
		hotswap, watchdog, firmware reset, long press power button,
		short press power button, software reset. Value 1 in file means
		this is reset cause, 0 - otherwise. Only one of the above
		causes could be 1 at the same time, representing only last
		reset cause.

		The files are read only.
+1 −1
Original line number Diff line number Diff line
@@ -13207,7 +13207,7 @@ L: linux-input@vger.kernel.org
L:	platform-driver-x86@vger.kernel.org
S:	Maintained
F:	drivers/input/touchscreen/silead.c
F:	drivers/platform/x86/silead_dmi.c
F:	drivers/platform/x86/touchscreen_dmi.c

SILICON MOTION SM712 FRAME BUFFER DRIVER
M:	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+11 −0
Original line number Diff line number Diff line
@@ -23,4 +23,15 @@ config MLXREG_HOTPLUG
	  This driver handles hot-plug events for the power suppliers, power
	  cables and fans on the wide range Mellanox IB and Ethernet systems.

config MLXREG_IO
	tristate "Mellanox platform register access driver support"
	depends on REGMAP
	depends on HWMON
	help
	  This driver allows access to Mellanox programmable device register
	  space through sysfs interface. The sets of registers for sysfs access
	  are defined per system type bases and include the registers related
	  to system resets operation, system reset causes monitoring and some
	  kinds of mux selection.

endif # MELLANOX_PLATFORM
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@
# Mellanox Platform-Specific Drivers
#
obj-$(CONFIG_MLXREG_HOTPLUG)	+= mlxreg-hotplug.o
obj-$(CONFIG_MLXREG_IO) += mlxreg-io.o
+43 −17
Original line number Diff line number Diff line
@@ -50,9 +50,8 @@
#define MLXREG_HOTPLUG_MASK_OFF		2
#define MLXREG_HOTPLUG_AGGR_MASK_OFF	1

/* ASIC health parameters. */
#define MLXREG_HOTPLUG_HEALTH_MASK	0x02
#define MLXREG_HOTPLUG_RST_CNTR		3
/* ASIC good health mask. */
#define MLXREG_HOTPLUG_GOOD_HEALTH_MASK	0x02

#define MLXREG_HOTPLUG_ATTRS_MAX	24
#define MLXREG_HOTPLUG_NOT_ASSERT	3
@@ -103,6 +102,9 @@ static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv,
{
	struct mlxreg_core_hotplug_platform_data *pdata;

	/* Notify user by sending hwmon uevent. */
	kobject_uevent(&priv->hwmon->kobj, KOBJ_CHANGE);

	/*
	 * Return if adapter number is negative. It could be in case hotplug
	 * event is not associated with hotplug device.
@@ -134,8 +136,13 @@ static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv,
	return 0;
}

static void mlxreg_hotplug_device_destroy(struct mlxreg_core_data *data)
static void
mlxreg_hotplug_device_destroy(struct mlxreg_hotplug_priv_data *priv,
			      struct mlxreg_core_data *data)
{
	/* Notify user by sending hwmon uevent. */
	kobject_uevent(&priv->hwmon->kobj, KOBJ_CHANGE);

	if (data->hpdev.client) {
		i2c_unregister_device(data->hpdev.client);
		data->hpdev.client = NULL;
@@ -278,14 +285,14 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv,
		data = item->data + bit;
		if (regval & BIT(bit)) {
			if (item->inversed)
				mlxreg_hotplug_device_destroy(data);
				mlxreg_hotplug_device_destroy(priv, data);
			else
				mlxreg_hotplug_device_create(priv, data);
		} else {
			if (item->inversed)
				mlxreg_hotplug_device_create(priv, data);
			else
				mlxreg_hotplug_device_destroy(data);
				mlxreg_hotplug_device_destroy(priv, data);
		}
	}

@@ -325,21 +332,40 @@ mlxreg_hotplug_health_work_helper(struct mlxreg_hotplug_priv_data *priv,
			goto out;

		regval &= data->mask;
		item->cache = regval;
		if (regval == MLXREG_HOTPLUG_HEALTH_MASK) {
			if ((data->health_cntr++ == MLXREG_HOTPLUG_RST_CNTR) ||
			    !priv->after_probe) {

		if (item->cache == regval)
			goto ack_event;

		/*
		 * ASIC health indication is provided through two bits. Bits
		 * value 0x2 indicates that ASIC reached the good health, value
		 * 0x0 indicates ASIC the bad health or dormant state and value
		 * 0x3 indicates the booting state. During ASIC reset it should
		 * pass the following states: dormant -> booting -> good.
		 */
		if (regval == MLXREG_HOTPLUG_GOOD_HEALTH_MASK) {
			if (!data->attached) {
				/*
				 * ASIC is in steady state. Connect associated
				 * device, if configured.
				 */
				mlxreg_hotplug_device_create(priv, data);
				data->attached = true;
			}
		} else {
			if (data->attached) {
				mlxreg_hotplug_device_destroy(data);
				/*
				 * ASIC health is failed after ASIC has been
				 * in steady state. Disconnect associated
				 * device, if it has been connected.
				 */
				mlxreg_hotplug_device_destroy(priv, data);
				data->attached = false;
				data->health_cntr = 0;
			}
		}

		item->cache = regval;
ack_event:
		/* Acknowledge event. */
		ret = regmap_write(priv->regmap, data->reg +
				   MLXREG_HOTPLUG_EVENT_OFF, 0);
@@ -551,7 +577,7 @@ static void mlxreg_hotplug_unset_irq(struct mlxreg_hotplug_priv_data *priv)
		/* Remove all the attached devices in group. */
		count = item->count;
		for (j = 0; j < count; j++, data++)
			mlxreg_hotplug_device_destroy(data);
			mlxreg_hotplug_device_destroy(priv, data);
	}
}

@@ -616,10 +642,6 @@ static int mlxreg_hotplug_probe(struct platform_device *pdev)
	disable_irq(priv->irq);
	spin_lock_init(&priv->lock);
	INIT_DELAYED_WORK(&priv->dwork_irq, mlxreg_hotplug_work_handler);
	/* Perform initial interrupts setup. */
	mlxreg_hotplug_set_irq(priv);

	priv->after_probe = true;
	dev_set_drvdata(&pdev->dev, priv);

	err = mlxreg_hotplug_attr_init(priv);
@@ -637,6 +659,10 @@ static int mlxreg_hotplug_probe(struct platform_device *pdev)
		return PTR_ERR(priv->hwmon);
	}

	/* Perform initial interrupts setup. */
	mlxreg_hotplug_set_irq(priv);
	priv->after_probe = true;

	return 0;
}

Loading