Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit ad2fd53

Browse files
committed
Merge tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Hans de Goede: "Nothing special to report just various small fixes: - thinkpad_acpi: Fix profile (performance/bal/low-power) regression on T490 - misc other small fixes / hw-id additions" * tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/mellanox: fix potential race in mlxbf-tmfifo driver platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i platform/x86: touchscreen_dmi: Add upside-down quirk for GDIX1002 ts on the Juno Tablet platform/x86: thinkpad_acpi: Add profile force ability platform/x86: thinkpad_acpi: Fix platform profiles on T490 platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct platform/x86/intel-uncore-freq: Return error on write frequency platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield
2 parents 16a8829 + 3d43f9f commit ad2fd53

File tree

6 files changed

+76
-8
lines changed

6 files changed

+76
-8
lines changed

drivers/platform/mellanox/mlxbf-tmfifo.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ static void mlxbf_tmfifo_rxtx(struct mlxbf_tmfifo_vring *vring, bool is_rx)
784784
fifo = vring->fifo;
785785

786786
/* Return if vdev is not ready. */
787-
if (!fifo->vdev[devid])
787+
if (!fifo || !fifo->vdev[devid])
788788
return;
789789

790790
/* Return if another vring is running. */
@@ -980,9 +980,13 @@ static int mlxbf_tmfifo_virtio_find_vqs(struct virtio_device *vdev,
980980

981981
vq->num_max = vring->num;
982982

983+
vq->priv = vring;
984+
985+
/* Make vq update visible before using it. */
986+
virtio_mb(false);
987+
983988
vqs[i] = vq;
984989
vring->vq = vq;
985-
vq->priv = vring;
986990
}
987991

988992
return 0;
@@ -1302,6 +1306,9 @@ static int mlxbf_tmfifo_probe(struct platform_device *pdev)
13021306

13031307
mod_timer(&fifo->timer, jiffies + MLXBF_TMFIFO_TIMER_INTERVAL);
13041308

1309+
/* Make all updates visible before setting the 'is_ready' flag. */
1310+
virtio_mb(false);
1311+
13051312
fifo->is_ready = true;
13061313
return 0;
13071314

drivers/platform/x86/hp/hp-wmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ struct bios_rfkill2_state {
211211
static const struct key_entry hp_wmi_keymap[] = {
212212
{ KE_KEY, 0x02, { KEY_BRIGHTNESSUP } },
213213
{ KE_KEY, 0x03, { KEY_BRIGHTNESSDOWN } },
214+
{ KE_KEY, 0x270, { KEY_MICMUTE } },
214215
{ KE_KEY, 0x20e6, { KEY_PROG1 } },
215216
{ KE_KEY, 0x20e8, { KEY_MEDIA } },
216217
{ KE_KEY, 0x2142, { KEY_MEDIA } },

drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,18 @@ static ssize_t store_min_max_freq_khz(struct uncore_data *data,
4444
int min_max)
4545
{
4646
unsigned int input;
47+
int ret;
4748

4849
if (kstrtouint(buf, 10, &input))
4950
return -EINVAL;
5051

5152
mutex_lock(&uncore_lock);
52-
uncore_write(data, input, min_max);
53+
ret = uncore_write(data, input, min_max);
5354
mutex_unlock(&uncore_lock);
5455

56+
if (ret)
57+
return ret;
58+
5559
return count;
5660
}
5761

drivers/platform/x86/intel_scu_pcidrv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static int intel_scu_pci_probe(struct pci_dev *pdev,
3434

3535
static const struct pci_device_id pci_ids[] = {
3636
{ PCI_VDEVICE(INTEL, 0x080e) },
37+
{ PCI_VDEVICE(INTEL, 0x082a) },
3738
{ PCI_VDEVICE(INTEL, 0x08ea) },
3839
{ PCI_VDEVICE(INTEL, 0x0a94) },
3940
{ PCI_VDEVICE(INTEL, 0x11a0) },

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10318,6 +10318,7 @@ static atomic_t dytc_ignore_event = ATOMIC_INIT(0);
1031810318
static DEFINE_MUTEX(dytc_mutex);
1031910319
static int dytc_capabilities;
1032010320
static bool dytc_mmc_get_available;
10321+
static int profile_force;
1032110322

1032210323
static int convert_dytc_to_profile(int funcmode, int dytcmode,
1032310324
enum platform_profile_option *profile)
@@ -10580,6 +10581,21 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
1058010581
if (err)
1058110582
return err;
1058210583

10584+
/* Check if user wants to override the profile selection */
10585+
if (profile_force) {
10586+
switch (profile_force) {
10587+
case -1:
10588+
dytc_capabilities = 0;
10589+
break;
10590+
case 1:
10591+
dytc_capabilities = BIT(DYTC_FC_MMC);
10592+
break;
10593+
case 2:
10594+
dytc_capabilities = BIT(DYTC_FC_PSC);
10595+
break;
10596+
}
10597+
pr_debug("Profile selection forced: 0x%x\n", dytc_capabilities);
10598+
}
1058310599
if (dytc_capabilities & BIT(DYTC_FC_MMC)) { /* MMC MODE */
1058410600
pr_debug("MMC is supported\n");
1058510601
/*
@@ -10593,11 +10609,6 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
1059310609
dytc_mmc_get_available = true;
1059410610
}
1059510611
} else if (dytc_capabilities & BIT(DYTC_FC_PSC)) { /* PSC MODE */
10596-
/* Support for this only works on AMD platforms */
10597-
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) {
10598-
dbg_printk(TPACPI_DBG_INIT, "PSC not support on Intel platforms\n");
10599-
return -ENODEV;
10600-
}
1060110612
pr_debug("PSC is supported\n");
1060210613
} else {
1060310614
dbg_printk(TPACPI_DBG_INIT, "No DYTC support available\n");
@@ -11646,6 +11657,9 @@ MODULE_PARM_DESC(uwb_state,
1164611657
"Initial state of the emulated UWB switch");
1164711658
#endif
1164811659

11660+
module_param(profile_force, int, 0444);
11661+
MODULE_PARM_DESC(profile_force, "Force profile mode. -1=off, 1=MMC, 2=PSC");
11662+
1164911663
static void thinkpad_acpi_module_exit(void)
1165011664
{
1165111665
struct ibm_struct *ibm, *itmp;

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,22 @@ static const struct ts_dmi_data dexp_ursus_7w_data = {
336336
.properties = dexp_ursus_7w_props,
337337
};
338338

339+
static const struct property_entry dexp_ursus_kx210i_props[] = {
340+
PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
341+
PROPERTY_ENTRY_U32("touchscreen-min-y", 2),
342+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
343+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1137),
344+
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-dexp-ursus-kx210i.fw"),
345+
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
346+
PROPERTY_ENTRY_BOOL("silead,home-button"),
347+
{ }
348+
};
349+
350+
static const struct ts_dmi_data dexp_ursus_kx210i_data = {
351+
.acpi_name = "MSSL1680:00",
352+
.properties = dexp_ursus_kx210i_props,
353+
};
354+
339355
static const struct property_entry digma_citi_e200_props[] = {
340356
PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
341357
PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
@@ -378,6 +394,11 @@ static const struct ts_dmi_data gdix1001_01_upside_down_data = {
378394
.properties = gdix1001_upside_down_props,
379395
};
380396

397+
static const struct ts_dmi_data gdix1002_00_upside_down_data = {
398+
.acpi_name = "GDIX1002:00",
399+
.properties = gdix1001_upside_down_props,
400+
};
401+
381402
static const struct property_entry gp_electronic_t701_props[] = {
382403
PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
383404
PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
@@ -1185,6 +1206,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
11851206
DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
11861207
},
11871208
},
1209+
{
1210+
/* DEXP Ursus KX210i */
1211+
.driver_data = (void *)&dexp_ursus_kx210i_data,
1212+
.matches = {
1213+
DMI_MATCH(DMI_SYS_VENDOR, "INSYDE Corp."),
1214+
DMI_MATCH(DMI_PRODUCT_NAME, "S107I"),
1215+
},
1216+
},
11881217
{
11891218
/* Digma Citi E200 */
11901219
.driver_data = (void *)&digma_citi_e200_data,
@@ -1295,6 +1324,18 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
12951324
DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
12961325
},
12971326
},
1327+
{
1328+
/* Juno Tablet */
1329+
.driver_data = (void *)&gdix1002_00_upside_down_data,
1330+
.matches = {
1331+
DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
1332+
/* Both product- and board-name being "Default string" is somewhat rare */
1333+
DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
1334+
DMI_MATCH(DMI_BOARD_NAME, "Default string"),
1335+
/* Above matches are too generic, add partial bios-version match */
1336+
DMI_MATCH(DMI_BIOS_VERSION, "JP2V1."),
1337+
},
1338+
},
12981339
{
12991340
/* Mediacom WinPad 7.0 W700 (same hw as Wintron surftab 7") */
13001341
.driver_data = (void *)&trekstor_surftab_wintron70_data,

0 commit comments

Comments
 (0)