platform-drivers-x86 for v5.15-2

Highlights:
  -  amd-pmc fix for some suspend/resume issues
  -  intel-hid fix to avoid false-positive SW_TABLET_MODE=1 reporting
  -  some build error/warning fixes
  -  various DMI quirk additions
 
 The following is an automated git shortlog grouped by driver:
 
 amd-pmc:
  -  Increase the response register timeout
 
 dell:
  -  fix DELL_WMI_PRIVACY dependencies & build error
 
 gigabyte-wmi:
  -  add support for B550I Aorus Pro AX
 
 lg-laptop:
  -  Correctly handle dmi_get_system_info() returning NULL
 
 platform/x86/intel:
  -  hid: Add DMI switches allow list
  -  punit_ipc: Drop wrong use of ACPI_PTR()
 
 touchscreen_dmi:
  -  Update info for the Chuwi Hi10 Plus (CWI527) tablet
  -  Add info for the Chuwi HiBook (CWI514) tablet
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmFJ5SwUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9zuPwf/ZGt6pXKBZLPQqZ0MpjUgBgUtjk70
 ISEplVXx7A3zBJGRJCHBVVT7VYnx7rnRyq/jIukOxTHG6EfbQS88+oDXePSoNzNp
 xkrY17xPBWjny1yYWcmkRMVYdyRBmF6jKEC3oLVW/ilot5+BYG4m9QNgQbSKmUnQ
 eKGZ8O4r0COBeUJVmcPa4Gcd9LuLQMMEE2yE6Hi1la4fo2civ+QzSTdbLw28QhAd
 QlD79pw744lhvBdXqzNZzyHAUhbbBxWIl79YJZnwScPN2EEqht3BIqehtd+uRm3l
 OCvR7x14xmEfTm96rjrGwQFxEKPR3HWtwqJmb7W0ZeLJ4bsxdxYb3wHfug==
 =5l9q
 -----END PGP SIGNATURE-----

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

Pull x86 platform driver fixes from Hans de Goede:
 "The first round of bug-fixes for platform-drivers-x86 for 5.15,
  highlights:

   - amd-pmc fix for some suspend/resume issues

   - intel-hid fix to avoid false-positive SW_TABLET_MODE=1 reporting

   - some build error/warning fixes

   - various DMI quirk additions"

* tag 'platform-drivers-x86-v5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: gigabyte-wmi: add support for B550I Aorus Pro AX
  platform/x86/intel: hid: Add DMI switches allow list
  platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error
  platform/x86: amd-pmc: Increase the response register timeout
  platform/x86: touchscreen_dmi: Update info for the Chuwi Hi10 Plus (CWI527) tablet
  platform/x86: touchscreen_dmi: Add info for the Chuwi HiBook (CWI514) tablet
  lg-laptop: Correctly handle dmi_get_system_info() returning NULL
  platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR()
This commit is contained in:
Linus Torvalds 2021-09-22 09:16:18 -07:00
commit bee42512c4
7 changed files with 77 additions and 15 deletions

View File

@ -71,7 +71,7 @@
#define AMD_CPU_ID_YC 0x14B5
#define PMC_MSG_DELAY_MIN_US 100
#define RESPONSE_REGISTER_LOOP_MAX 200
#define RESPONSE_REGISTER_LOOP_MAX 20000
#define SOC_SUBSYSTEM_IP_MAX 12
#define DELAY_MIN_US 2000

View File

@ -166,8 +166,7 @@ config DELL_WMI
config DELL_WMI_PRIVACY
bool "Dell WMI Hardware Privacy Support"
depends on DELL_WMI
depends on LEDS_TRIGGER_AUDIO
depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
help
This option adds integration with the "Dell Hardware Privacy"
feature of Dell laptops to the dell-wmi driver.

View File

@ -144,6 +144,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE V2"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 GAMING X V2"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550I AORUS PRO AX"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M AORUS PRO-P"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M DS3H"),
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z390 I AORUS PRO WIFI-CF"),

View File

@ -118,12 +118,30 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = {
{ }
};
/*
* Some devices, even non convertible ones, can send incorrect SW_TABLET_MODE
* reports. Accept such reports only from devices in this list.
*/
static const struct dmi_system_id dmi_auto_add_switch[] = {
{
.matches = {
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "31" /* Convertible */),
},
},
{
.matches = {
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */),
},
},
{} /* Array terminator */
};
struct intel_hid_priv {
struct input_dev *input_dev;
struct input_dev *array;
struct input_dev *switches;
bool wakeup_mode;
bool dual_accel;
bool auto_add_switch;
};
#define HID_EVENT_FILTER_UUID "eeec56b3-4442-408f-a792-4edd4d758054"
@ -452,10 +470,8 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
* Some convertible have unreliable VGBS return which could cause incorrect
* SW_TABLET_MODE report, in these cases we enable support when receiving
* the first event instead of during driver setup.
*
* See dual_accel_detect.h for more info on the dual_accel check.
*/
if (!priv->switches && !priv->dual_accel && (event == 0xcc || event == 0xcd)) {
if (!priv->switches && priv->auto_add_switch && (event == 0xcc || event == 0xcd)) {
dev_info(&device->dev, "switch event received, enable switches supports\n");
err = intel_hid_switches_setup(device);
if (err)
@ -596,7 +612,8 @@ static int intel_hid_probe(struct platform_device *device)
return -ENOMEM;
dev_set_drvdata(&device->dev, priv);
priv->dual_accel = dual_accel_detect();
/* See dual_accel_detect.h for more info on the dual_accel check. */
priv->auto_add_switch = dmi_check_system(dmi_auto_add_switch) && !dual_accel_detect();
err = intel_hid_input_setup(device);
if (err) {

View File

@ -8,7 +8,6 @@
* which provide mailbox interface for power management usage.
*/
#include <linux/acpi.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/device.h>
@ -319,7 +318,7 @@ static struct platform_driver intel_punit_ipc_driver = {
.remove = intel_punit_ipc_remove,
.driver = {
.name = "intel_punit_ipc",
.acpi_match_table = ACPI_PTR(punit_ipc_acpi_ids),
.acpi_match_table = punit_ipc_acpi_ids,
},
};

View File

@ -655,7 +655,7 @@ static int acpi_add(struct acpi_device *device)
goto out_platform_registered;
}
product = dmi_get_system_info(DMI_PRODUCT_NAME);
if (strlen(product) > 4)
if (product && strlen(product) > 4)
switch (product[4]) {
case '5':
case '6':

View File

@ -100,10 +100,10 @@ static const struct ts_dmi_data chuwi_hi10_air_data = {
};
static const struct property_entry chuwi_hi10_plus_props[] = {
PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
PROPERTY_ENTRY_U32("touchscreen-size-x", 1908),
PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
PROPERTY_ENTRY_BOOL("silead,home-button"),
@ -111,6 +111,15 @@ static const struct property_entry chuwi_hi10_plus_props[] = {
};
static const struct ts_dmi_data chuwi_hi10_plus_data = {
.embedded_fw = {
.name = "silead/gsl1680-chuwi-hi10plus.fw",
.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
.length = 34056,
.sha256 = { 0xfd, 0x0a, 0x08, 0x08, 0x3c, 0xa6, 0x34, 0x4e,
0x2c, 0x49, 0x9c, 0xcd, 0x7d, 0x44, 0x9d, 0x38,
0x10, 0x68, 0xb5, 0xbd, 0xb7, 0x2a, 0x63, 0xb5,
0x67, 0x0b, 0x96, 0xbd, 0x89, 0x67, 0x85, 0x09 },
},
.acpi_name = "MSSL0017:00",
.properties = chuwi_hi10_plus_props,
};
@ -141,6 +150,33 @@ static const struct ts_dmi_data chuwi_hi10_pro_data = {
.properties = chuwi_hi10_pro_props,
};
static const struct property_entry chuwi_hibook_props[] = {
PROPERTY_ENTRY_U32("touchscreen-min-x", 30),
PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
PROPERTY_ENTRY_U32("touchscreen-size-x", 1892),
PROPERTY_ENTRY_U32("touchscreen-size-y", 1276),
PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hibook.fw"),
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
PROPERTY_ENTRY_BOOL("silead,home-button"),
{ }
};
static const struct ts_dmi_data chuwi_hibook_data = {
.embedded_fw = {
.name = "silead/gsl1680-chuwi-hibook.fw",
.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
.length = 40392,
.sha256 = { 0xf7, 0xc0, 0xe8, 0x5a, 0x6c, 0xf2, 0xeb, 0x8d,
0x12, 0xc4, 0x45, 0xbf, 0x55, 0x13, 0x4c, 0x1a,
0x13, 0x04, 0x31, 0x08, 0x65, 0x73, 0xf7, 0xa8,
0x1b, 0x7d, 0x59, 0xc9, 0xe6, 0x97, 0xf7, 0x38 },
},
.acpi_name = "MSSL0017:00",
.properties = chuwi_hibook_props,
};
static const struct property_entry chuwi_vi8_props[] = {
PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
@ -979,6 +1015,16 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
},
},
{
/* Chuwi HiBook (CWI514) */
.driver_data = (void *)&chuwi_hibook_data,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
/* Above matches are too generic, add bios-date match */
DMI_MATCH(DMI_BIOS_DATE, "05/07/2016"),
},
},
{
/* Chuwi Vi8 (CWI506) */
.driver_data = (void *)&chuwi_vi8_data,