platform-drivers-x86 for v5.19-2

Highlights:
  -  Fix hp-wmi regression on HP Omen laptops introduced in 5.18
  -  Several hardware-id additions
  -  A couple of other tiny fixes
 
 The following is an automated git shortlog grouped by driver:
 
 barco-p50-gpio:
  -  Add check for platform_driver_register
 
 gigabyte-wmi:
  -  Add support for B450M DS3H-CF
  -  Add Z690M AORUS ELITE AX DDR4 support
 
 hp-wmi:
  -  Use zero insize parameter only when supported
  -  Resolve WMI query failures on some devices
 
 platform/mellanox:
  -  Add static in struct declaration.
  -  Spelling s/platfom/platform/
 
 platform/x86/intel:
  -  hid: Add Surface Go to VGBS allow list
  -  pmc: Support Intel Raptorlake P
  -  Fix pmt_crashlog array reference
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmKl3+0UHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9zU3wf/YJUH3Obp0kAUssrOxT9QShHH6iFL
 Gh6CN38DYLEbV7FNBH/iA+ZW7DSsymQm1M3jj1QYB0Sd2X/hSsUEh2q6F0XNjTKH
 X8vVrSRAL+DStpgyKerBJHKpzO3ESUlipmIvR/JuGVHQAylR8ielHvAx+XhA1PKz
 8/ezppIa9bxZ1+LwQNPE40jJv+wlNctGrx3TEwqPep3STWWFEjkeYpR+3XIJ4Ads
 5P7FXxpM2cRFKBcI9jVIBDMIZulEfkXxBDcLCHOYYitxcpnrFFghn14ys5Exh9zL
 pdaVHnlP6pEFpVhCWa/ICpSyrLhNYqTUJ92dyFeakbGBj9QlwnfeceMLAw==
 =SaRl
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:
 "Highlights:

   - Fix hp-wmi regression on HP Omen laptops introduced in 5.18

   - Several hardware-id additions

   - A couple of other tiny fixes"

* tag 'platform-drivers-x86-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86/intel: hid: Add Surface Go to VGBS allow list
  platform/x86: hp-wmi: Use zero insize parameter only when supported
  platform/x86: hp-wmi: Resolve WMI query failures on some devices
  platform/x86: gigabyte-wmi: Add support for B450M DS3H-CF
  platform/x86: gigabyte-wmi: Add Z690M AORUS ELITE AX DDR4 support
  platform/x86: barco-p50-gpio: Add check for platform_driver_register
  platform/x86/intel: pmc: Support Intel Raptorlake P
  platform/x86/intel: Fix pmt_crashlog array reference
  platform/mellanox: Add static in struct declaration.
  platform/mellanox: Spelling s/platfom/platform/
This commit is contained in:
Linus Torvalds 2022-06-12 11:33:42 -07:00
commit 9979528518
8 changed files with 35 additions and 14 deletions

View File

@ -85,7 +85,7 @@ config NVSW_SN2201
depends on I2C depends on I2C
depends on REGMAP_I2C depends on REGMAP_I2C
help help
This driver provides support for the Nvidia SN2201 platfom. This driver provides support for the Nvidia SN2201 platform.
The SN2201 is a highly integrated for one rack unit system with The SN2201 is a highly integrated for one rack unit system with
L3 management switches. It has 48 x 1Gbps RJ45 + 4 x 100G QSFP28 L3 management switches. It has 48 x 1Gbps RJ45 + 4 x 100G QSFP28
ports in a compact 1RU form factor. The system also including a ports in a compact 1RU form factor. The system also including a

View File

@ -326,7 +326,7 @@ static struct resource nvsw_sn2201_lpc_res[] = {
}; };
/* SN2201 I2C platform data. */ /* SN2201 I2C platform data. */
struct mlxreg_core_hotplug_platform_data nvsw_sn2201_i2c_data = { static struct mlxreg_core_hotplug_platform_data nvsw_sn2201_i2c_data = {
.irq = NVSW_SN2201_CPLD_SYSIRQ, .irq = NVSW_SN2201_CPLD_SYSIRQ,
}; };

View File

@ -405,11 +405,14 @@ MODULE_DEVICE_TABLE(dmi, dmi_ids);
static int __init p50_module_init(void) static int __init p50_module_init(void)
{ {
struct resource res = DEFINE_RES_IO(P50_GPIO_IO_PORT_BASE, P50_PORT_CMD + 1); struct resource res = DEFINE_RES_IO(P50_GPIO_IO_PORT_BASE, P50_PORT_CMD + 1);
int ret;
if (!dmi_first_match(dmi_ids)) if (!dmi_first_match(dmi_ids))
return -ENODEV; return -ENODEV;
platform_driver_register(&p50_gpio_driver); ret = platform_driver_register(&p50_gpio_driver);
if (ret)
return ret;
gpio_pdev = platform_device_register_simple(DRIVER_NAME, PLATFORM_DEVID_NONE, &res, 1); gpio_pdev = platform_device_register_simple(DRIVER_NAME, PLATFORM_DEVID_NONE, &res, 1);
if (IS_ERR(gpio_pdev)) { if (IS_ERR(gpio_pdev)) {

View File

@ -140,6 +140,7 @@ static u8 gigabyte_wmi_detect_sensor_usability(struct wmi_device *wdev)
}} }}
static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = { static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M DS3H-CF"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M S2H V2"), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M S2H V2"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE AX V2"), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE AX V2"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE"), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE"),
@ -156,6 +157,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 GAMING X"), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 GAMING X"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 I AORUS PRO WIFI"), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 I AORUS PRO WIFI"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 UD"), DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 UD"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z690M AORUS ELITE AX DDR4"),
{ } { }
}; };

View File

@ -38,6 +38,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
#define HPWMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" #define HPWMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C"
#define HPWMI_BIOS_GUID "5FB7F034-2C63-45e9-BE91-3D44E2C707E4" #define HPWMI_BIOS_GUID "5FB7F034-2C63-45e9-BE91-3D44E2C707E4"
#define HP_OMEN_EC_THERMAL_PROFILE_OFFSET 0x95 #define HP_OMEN_EC_THERMAL_PROFILE_OFFSET 0x95
#define zero_if_sup(tmp) (zero_insize_support?0:sizeof(tmp)) // use when zero insize is required
/* DMI board names of devices that should use the omen specific path for /* DMI board names of devices that should use the omen specific path for
* thermal profiles. * thermal profiles.
@ -220,6 +221,7 @@ static struct input_dev *hp_wmi_input_dev;
static struct platform_device *hp_wmi_platform_dev; static struct platform_device *hp_wmi_platform_dev;
static struct platform_profile_handler platform_profile_handler; static struct platform_profile_handler platform_profile_handler;
static bool platform_profile_support; static bool platform_profile_support;
static bool zero_insize_support;
static struct rfkill *wifi_rfkill; static struct rfkill *wifi_rfkill;
static struct rfkill *bluetooth_rfkill; static struct rfkill *bluetooth_rfkill;
@ -290,14 +292,16 @@ static int hp_wmi_perform_query(int query, enum hp_wmi_command command,
struct bios_return *bios_return; struct bios_return *bios_return;
union acpi_object *obj = NULL; union acpi_object *obj = NULL;
struct bios_args *args = NULL; struct bios_args *args = NULL;
int mid, actual_outsize, ret; int mid, actual_insize, actual_outsize;
size_t bios_args_size; size_t bios_args_size;
int ret;
mid = encode_outsize_for_pvsz(outsize); mid = encode_outsize_for_pvsz(outsize);
if (WARN_ON(mid < 0)) if (WARN_ON(mid < 0))
return mid; return mid;
bios_args_size = struct_size(args, data, insize); actual_insize = max(insize, 128);
bios_args_size = struct_size(args, data, actual_insize);
args = kmalloc(bios_args_size, GFP_KERNEL); args = kmalloc(bios_args_size, GFP_KERNEL);
if (!args) if (!args)
return -ENOMEM; return -ENOMEM;
@ -374,7 +378,7 @@ static int hp_wmi_read_int(int query)
int val = 0, ret; int val = 0, ret;
ret = hp_wmi_perform_query(query, HPWMI_READ, &val, ret = hp_wmi_perform_query(query, HPWMI_READ, &val,
0, sizeof(val)); zero_if_sup(val), sizeof(val));
if (ret) if (ret)
return ret < 0 ? ret : -EINVAL; return ret < 0 ? ret : -EINVAL;
@ -410,7 +414,8 @@ static int hp_wmi_get_tablet_mode(void)
return -ENODEV; return -ENODEV;
ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ, ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ,
system_device_mode, 0, sizeof(system_device_mode)); system_device_mode, zero_if_sup(system_device_mode),
sizeof(system_device_mode));
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -497,7 +502,7 @@ static int hp_wmi_fan_speed_max_get(void)
int val = 0, ret; int val = 0, ret;
ret = hp_wmi_perform_query(HPWMI_FAN_SPEED_MAX_GET_QUERY, HPWMI_GM, ret = hp_wmi_perform_query(HPWMI_FAN_SPEED_MAX_GET_QUERY, HPWMI_GM,
&val, 0, sizeof(val)); &val, zero_if_sup(val), sizeof(val));
if (ret) if (ret)
return ret < 0 ? ret : -EINVAL; return ret < 0 ? ret : -EINVAL;
@ -509,7 +514,7 @@ static int __init hp_wmi_bios_2008_later(void)
{ {
int state = 0; int state = 0;
int ret = hp_wmi_perform_query(HPWMI_FEATURE_QUERY, HPWMI_READ, &state, int ret = hp_wmi_perform_query(HPWMI_FEATURE_QUERY, HPWMI_READ, &state,
0, sizeof(state)); zero_if_sup(state), sizeof(state));
if (!ret) if (!ret)
return 1; return 1;
@ -520,7 +525,7 @@ static int __init hp_wmi_bios_2009_later(void)
{ {
u8 state[128]; u8 state[128];
int ret = hp_wmi_perform_query(HPWMI_FEATURE2_QUERY, HPWMI_READ, &state, int ret = hp_wmi_perform_query(HPWMI_FEATURE2_QUERY, HPWMI_READ, &state,
0, sizeof(state)); zero_if_sup(state), sizeof(state));
if (!ret) if (!ret)
return 1; return 1;
@ -598,7 +603,7 @@ static int hp_wmi_rfkill2_refresh(void)
int err, i; int err, i;
err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state, err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state,
0, sizeof(state)); zero_if_sup(state), sizeof(state));
if (err) if (err)
return err; return err;
@ -1007,7 +1012,7 @@ static int __init hp_wmi_rfkill2_setup(struct platform_device *device)
int err, i; int err, i;
err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state, err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state,
0, sizeof(state)); zero_if_sup(state), sizeof(state));
if (err) if (err)
return err < 0 ? err : -EINVAL; return err < 0 ? err : -EINVAL;
@ -1483,11 +1488,15 @@ static int __init hp_wmi_init(void)
{ {
int event_capable = wmi_has_guid(HPWMI_EVENT_GUID); int event_capable = wmi_has_guid(HPWMI_EVENT_GUID);
int bios_capable = wmi_has_guid(HPWMI_BIOS_GUID); int bios_capable = wmi_has_guid(HPWMI_BIOS_GUID);
int err; int err, tmp = 0;
if (!bios_capable && !event_capable) if (!bios_capable && !event_capable)
return -ENODEV; return -ENODEV;
if (hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, HPWMI_READ, &tmp,
sizeof(tmp), sizeof(tmp)) == HPWMI_RET_INVALID_PARAMETERS)
zero_insize_support = true;
if (event_capable) { if (event_capable) {
err = hp_wmi_input_setup(); err = hp_wmi_input_setup();
if (err) if (err)

View File

@ -122,6 +122,12 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP Spectre x360 Convertible 15-df0xxx"), DMI_MATCH(DMI_PRODUCT_NAME, "HP Spectre x360 Convertible 15-df0xxx"),
}, },
}, },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go"),
},
},
{ } { }
}; };

View File

@ -1912,6 +1912,7 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, &tgl_reg_map), X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, &tgl_reg_map),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &tgl_reg_map), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &tgl_reg_map),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &adl_reg_map), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &adl_reg_map),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &tgl_reg_map),
{} {}
}; };

View File

@ -282,7 +282,7 @@ static int pmt_crashlog_probe(struct auxiliary_device *auxdev,
auxiliary_set_drvdata(auxdev, priv); auxiliary_set_drvdata(auxdev, priv);
for (i = 0; i < intel_vsec_dev->num_resources; i++) { for (i = 0; i < intel_vsec_dev->num_resources; i++) {
struct intel_pmt_entry *entry = &priv->entry[i].entry; struct intel_pmt_entry *entry = &priv->entry[priv->num_entries].entry;
ret = intel_pmt_dev_create(entry, &pmt_crashlog_ns, intel_vsec_dev, i); ret = intel_pmt_dev_create(entry, &pmt_crashlog_ns, intel_vsec_dev, i);
if (ret < 0) if (ret < 0)