Skip to content

Commit bee4251

Browse files
committed
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()
2 parents 8f1b7ba + 6f6aab1 commit bee4251

File tree

7 files changed

+77
-15
lines changed

7 files changed

+77
-15
lines changed

drivers/platform/x86/amd-pmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#define AMD_CPU_ID_YC 0x14B5
7272

7373
#define PMC_MSG_DELAY_MIN_US 100
74-
#define RESPONSE_REGISTER_LOOP_MAX 200
74+
#define RESPONSE_REGISTER_LOOP_MAX 20000
7575

7676
#define SOC_SUBSYSTEM_IP_MAX 12
7777
#define DELAY_MIN_US 2000

drivers/platform/x86/dell/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ config DELL_WMI
166166

167167
config DELL_WMI_PRIVACY
168168
bool "Dell WMI Hardware Privacy Support"
169-
depends on DELL_WMI
170-
depends on LEDS_TRIGGER_AUDIO
169+
depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
171170
help
172171
This option adds integration with the "Dell Hardware Privacy"
173172
feature of Dell laptops to the dell-wmi driver.

drivers/platform/x86/gigabyte-wmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
144144
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE"),
145145
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 AORUS ELITE V2"),
146146
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550 GAMING X V2"),
147+
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550I AORUS PRO AX"),
147148
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M AORUS PRO-P"),
148149
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M DS3H"),
149150
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z390 I AORUS PRO WIFI-CF"),

drivers/platform/x86/intel/hid.c

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,30 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = {
118118
{ }
119119
};
120120

121+
/*
122+
* Some devices, even non convertible ones, can send incorrect SW_TABLET_MODE
123+
* reports. Accept such reports only from devices in this list.
124+
*/
125+
static const struct dmi_system_id dmi_auto_add_switch[] = {
126+
{
127+
.matches = {
128+
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "31" /* Convertible */),
129+
},
130+
},
131+
{
132+
.matches = {
133+
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */),
134+
},
135+
},
136+
{} /* Array terminator */
137+
};
138+
121139
struct intel_hid_priv {
122140
struct input_dev *input_dev;
123141
struct input_dev *array;
124142
struct input_dev *switches;
125143
bool wakeup_mode;
126-
bool dual_accel;
144+
bool auto_add_switch;
127145
};
128146

129147
#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)
452470
* Some convertible have unreliable VGBS return which could cause incorrect
453471
* SW_TABLET_MODE report, in these cases we enable support when receiving
454472
* the first event instead of during driver setup.
455-
*
456-
* See dual_accel_detect.h for more info on the dual_accel check.
457473
*/
458-
if (!priv->switches && !priv->dual_accel && (event == 0xcc || event == 0xcd)) {
474+
if (!priv->switches && priv->auto_add_switch && (event == 0xcc || event == 0xcd)) {
459475
dev_info(&device->dev, "switch event received, enable switches supports\n");
460476
err = intel_hid_switches_setup(device);
461477
if (err)
@@ -596,7 +612,8 @@ static int intel_hid_probe(struct platform_device *device)
596612
return -ENOMEM;
597613
dev_set_drvdata(&device->dev, priv);
598614

599-
priv->dual_accel = dual_accel_detect();
615+
/* See dual_accel_detect.h for more info on the dual_accel check. */
616+
priv->auto_add_switch = dmi_check_system(dmi_auto_add_switch) && !dual_accel_detect();
600617

601618
err = intel_hid_input_setup(device);
602619
if (err) {

drivers/platform/x86/intel/punit_ipc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* which provide mailbox interface for power management usage.
99
*/
1010

11-
#include <linux/acpi.h>
1211
#include <linux/bitops.h>
1312
#include <linux/delay.h>
1413
#include <linux/device.h>
@@ -319,7 +318,7 @@ static struct platform_driver intel_punit_ipc_driver = {
319318
.remove = intel_punit_ipc_remove,
320319
.driver = {
321320
.name = "intel_punit_ipc",
322-
.acpi_match_table = ACPI_PTR(punit_ipc_acpi_ids),
321+
.acpi_match_table = punit_ipc_acpi_ids,
323322
},
324323
};
325324

drivers/platform/x86/lg-laptop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ static int acpi_add(struct acpi_device *device)
655655
goto out_platform_registered;
656656
}
657657
product = dmi_get_system_info(DMI_PRODUCT_NAME);
658-
if (strlen(product) > 4)
658+
if (product && strlen(product) > 4)
659659
switch (product[4]) {
660660
case '5':
661661
case '6':

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,26 @@ static const struct ts_dmi_data chuwi_hi10_air_data = {
100100
};
101101

102102
static const struct property_entry chuwi_hi10_plus_props[] = {
103-
PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
104-
PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
105-
PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
106-
PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
103+
PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
104+
PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
105+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1908),
106+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
107107
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
108108
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
109109
PROPERTY_ENTRY_BOOL("silead,home-button"),
110110
{ }
111111
};
112112

113113
static const struct ts_dmi_data chuwi_hi10_plus_data = {
114+
.embedded_fw = {
115+
.name = "silead/gsl1680-chuwi-hi10plus.fw",
116+
.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
117+
.length = 34056,
118+
.sha256 = { 0xfd, 0x0a, 0x08, 0x08, 0x3c, 0xa6, 0x34, 0x4e,
119+
0x2c, 0x49, 0x9c, 0xcd, 0x7d, 0x44, 0x9d, 0x38,
120+
0x10, 0x68, 0xb5, 0xbd, 0xb7, 0x2a, 0x63, 0xb5,
121+
0x67, 0x0b, 0x96, 0xbd, 0x89, 0x67, 0x85, 0x09 },
122+
},
114123
.acpi_name = "MSSL0017:00",
115124
.properties = chuwi_hi10_plus_props,
116125
};
@@ -141,6 +150,33 @@ static const struct ts_dmi_data chuwi_hi10_pro_data = {
141150
.properties = chuwi_hi10_pro_props,
142151
};
143152

153+
static const struct property_entry chuwi_hibook_props[] = {
154+
PROPERTY_ENTRY_U32("touchscreen-min-x", 30),
155+
PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
156+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1892),
157+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1276),
158+
PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
159+
PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
160+
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hibook.fw"),
161+
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
162+
PROPERTY_ENTRY_BOOL("silead,home-button"),
163+
{ }
164+
};
165+
166+
static const struct ts_dmi_data chuwi_hibook_data = {
167+
.embedded_fw = {
168+
.name = "silead/gsl1680-chuwi-hibook.fw",
169+
.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
170+
.length = 40392,
171+
.sha256 = { 0xf7, 0xc0, 0xe8, 0x5a, 0x6c, 0xf2, 0xeb, 0x8d,
172+
0x12, 0xc4, 0x45, 0xbf, 0x55, 0x13, 0x4c, 0x1a,
173+
0x13, 0x04, 0x31, 0x08, 0x65, 0x73, 0xf7, 0xa8,
174+
0x1b, 0x7d, 0x59, 0xc9, 0xe6, 0x97, 0xf7, 0x38 },
175+
},
176+
.acpi_name = "MSSL0017:00",
177+
.properties = chuwi_hibook_props,
178+
};
179+
144180
static const struct property_entry chuwi_vi8_props[] = {
145181
PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
146182
PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
@@ -979,6 +1015,16 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
9791015
DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
9801016
},
9811017
},
1018+
{
1019+
/* Chuwi HiBook (CWI514) */
1020+
.driver_data = (void *)&chuwi_hibook_data,
1021+
.matches = {
1022+
DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1023+
DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1024+
/* Above matches are too generic, add bios-date match */
1025+
DMI_MATCH(DMI_BIOS_DATE, "05/07/2016"),
1026+
},
1027+
},
9821028
{
9831029
/* Chuwi Vi8 (CWI506) */
9841030
.driver_data = (void *)&chuwi_vi8_data,

0 commit comments

Comments
 (0)