Commit 964ebc07 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v6.16-4' of...

Merge tag 'platform-drivers-x86-v6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers fixes from Ilpo Järvinen:

 - power supply code:
    - Add get/set property direct to allow avoiding taking
      psy->extensions_sem twice from power supply extensions

 - alienware-wmi-wmax:
    - Add AWCC support for Alienware Area-51m and m15 R5
    - Fix `dmi_system_id` array termination

 - arm64: huawei-gaokun-ec: fix OF node leak

 - dell-ddv: Fix taking psy->extensions_sem twice

 - dell-lis3lv02d: Add Precision 3551 accelerometer support

 - firmware_attributes_class: Fix initialization order

 - ideapad-laptop: Retain FnLock and kbd backlight across boots

 - lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED

 - mellanox: mlxbf-pmc: Validate event names and bool input

* tag 'platform-drivers-x86-v6.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  MAINTAINERS: Update entries for IFS and SBL drivers
  platform/x86: dell-lis3lv02d: Add Precision 3551
  platform/x86: alieneware-wmi-wmax: Add AWCC support to more laptops
  platform/x86: Fix initialization order for firmware_attributes_class
  platform: arm64: huawei-gaokun-ec: fix OF node leak
  lenovo-wmi-hotkey: Avoid triggering error -5 due to missing mute LED
  platform/x86: ideapad-laptop: Fix kbd backlight not remembered among boots
  platform/x86: ideapad-laptop: Fix FnLock not remembered among boots
  platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input
  platform/mellanox: mlxbf-pmc: Validate event/enable input
  platform/mellanox: mlxbf-pmc: Remove newline char from event name input
  platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice
  power: supply: test-power: Test access to extended power supply
  power: supply: core: Add power_supply_get/set_property_direct()
  platform/x86: alienware-wmi-wmax: Fix `dmi_system_id` array
parents 89be9a83 e2967b50
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -12188,9 +12188,8 @@ F: drivers/dma/idxd/*
F:	include/uapi/linux/idxd.h
INTEL IN FIELD SCAN (IFS) DEVICE
M:	Jithu Joseph <jithu.joseph@intel.com>
M:	Tony Luck <tony.luck@intel.com>
R:	Ashok Raj <ashok.raj.linux@gmail.com>
R:	Tony Luck <tony.luck@intel.com>
S:	Maintained
F:	drivers/platform/x86/intel/ifs
F:	include/trace/events/intel_ifs.h
@@ -12530,8 +12529,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi.git
F:	drivers/net/wireless/intel/iwlwifi/
INTEL WMI SLIM BOOTLOADER (SBL) FIRMWARE UPDATE DRIVER
M:	Jithu Joseph <jithu.joseph@intel.com>
S:	Maintained
S:	Orphan
W:	https://slimbootloader.github.io/security/firmware-update.html
F:	drivers/platform/x86/intel/wmi/sbl-fw-update.c
+2 −0
Original line number Diff line number Diff line
@@ -662,6 +662,7 @@ static void gaokun_aux_release(struct device *dev)
{
	struct auxiliary_device *adev = to_auxiliary_dev(dev);

	of_node_put(dev->of_node);
	kfree(adev);
}

@@ -693,6 +694,7 @@ static int gaokun_aux_init(struct device *parent, const char *name,

	ret = auxiliary_device_init(adev);
	if (ret) {
		of_node_put(adev->dev.of_node);
		kfree(adev);
		return ret;
	}
+17 −8
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/hwmon.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/string_helpers.h>
#include <uapi/linux/psci.h>

#define MLXBF_PMC_WRITE_REG_32 0x82000009
@@ -1222,7 +1223,7 @@ static int mlxbf_pmc_get_event_num(const char *blk, const char *evt)
	return -ENODEV;
}

/* Get the event number given the name */
/* Get the event name given the number */
static char *mlxbf_pmc_get_event_name(const char *blk, u32 evt)
{
	const struct mlxbf_pmc_events *events;
@@ -1784,6 +1785,7 @@ static ssize_t mlxbf_pmc_event_store(struct device *dev,
		attr, struct mlxbf_pmc_attribute, dev_attr);
	unsigned int blk_num, cnt_num;
	bool is_l3 = false;
	char *evt_name;
	int evt_num;
	int err;

@@ -1791,14 +1793,23 @@ static ssize_t mlxbf_pmc_event_store(struct device *dev,
	cnt_num = attr_event->index;

	if (isalpha(buf[0])) {
		/* Remove the trailing newline character if present */
		evt_name = kstrdup_and_replace(buf, '\n', '\0', GFP_KERNEL);
		if (!evt_name)
			return -ENOMEM;

		evt_num = mlxbf_pmc_get_event_num(pmc->block_name[blk_num],
						  buf);
						  evt_name);
		kfree(evt_name);
		if (evt_num < 0)
			return -EINVAL;
	} else {
		err = kstrtouint(buf, 0, &evt_num);
		if (err < 0)
			return err;

		if (!mlxbf_pmc_get_event_name(pmc->block_name[blk_num], evt_num))
			return -EINVAL;
	}

	if (strstr(pmc->block_name[blk_num], "l3cache"))
@@ -1879,13 +1890,14 @@ static ssize_t mlxbf_pmc_enable_store(struct device *dev,
{
	struct mlxbf_pmc_attribute *attr_enable = container_of(
		attr, struct mlxbf_pmc_attribute, dev_attr);
	unsigned int en, blk_num;
	unsigned int blk_num;
	u32 word;
	int err;
	bool en;

	blk_num = attr_enable->nr;

	err = kstrtouint(buf, 0, &en);
	err = kstrtobool(buf, &en);
	if (err < 0)
		return err;

@@ -1905,14 +1917,11 @@ static ssize_t mlxbf_pmc_enable_store(struct device *dev,
			MLXBF_PMC_CRSPACE_PERFMON_CTL(pmc->block[blk_num].counters),
			MLXBF_PMC_WRITE_REG_32, word);
	} else {
		if (en && en != 1)
			return -EINVAL;

		err = mlxbf_pmc_config_l3_counters(blk_num, false, !!en);
		if (err)
			return err;

		if (en == 1) {
		if (en) {
			err = mlxbf_pmc_config_l3_counters(blk_num, true, false);
			if (err)
				return err;
+2 −1
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ obj-$(CONFIG_X86_PLATFORM_DRIVERS_HP) += hp/
# Hewlett Packard Enterprise
obj-$(CONFIG_UV_SYSFS)       += uv_sysfs.o

obj-$(CONFIG_FW_ATTR_CLASS)	+= firmware_attributes_class.o

# IBM Thinkpad and Lenovo
obj-$(CONFIG_IBM_RTL)		+= ibm_rtl.o
obj-$(CONFIG_IDEAPAD_LAPTOP)	+= ideapad-laptop.o
@@ -128,7 +130,6 @@ obj-$(CONFIG_SYSTEM76_ACPI) += system76_acpi.o
obj-$(CONFIG_TOPSTAR_LAPTOP)	+= topstar-laptop.o

# Platform drivers
obj-$(CONFIG_FW_ATTR_CLASS)		+= firmware_attributes_class.o
obj-$(CONFIG_SERIAL_MULTI_INSTANTIATE)	+= serial-multi-instantiate.o
obj-$(CONFIG_TOUCHSCREEN_DMI)		+= touchscreen_dmi.o
obj-$(CONFIG_WIRELESS_HOTKEY)		+= wireless-hotkey.o
+17 −0
Original line number Diff line number Diff line
@@ -89,6 +89,14 @@ static struct awcc_quirks generic_quirks = {
static struct awcc_quirks empty_quirks;

static const struct dmi_system_id awcc_dmi_table[] __initconst = {
	{
		.ident = "Alienware Area-51m",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Alienware Area-51m"),
		},
		.driver_data = &generic_quirks,
	},
	{
		.ident = "Alienware Area-51m R2",
		.matches = {
@@ -97,6 +105,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
		},
		.driver_data = &generic_quirks,
	},
	{
		.ident = "Alienware m15 R5",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R5"),
		},
		.driver_data = &generic_quirks,
	},
	{
		.ident = "Alienware m15 R7",
		.matches = {
@@ -233,6 +249,7 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
		},
		.driver_data = &g_series_quirks,
	},
	{}
};

enum AWCC_GET_FAN_SENSORS_OPERATIONS {
Loading