Skip to content

Commit 87895a6

Browse files
committed
Merge tag 'platform-drivers-x86-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Hans de Goede: - a use-after-free bugfix - Kconfig fixes for randconfig builds - allow setting touchscreen_dmi quirks from the cmdline for debugging - touchscreen_dmi quirks for two new laptop/tablet models * tag 'platform-drivers-x86-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: touchscreen_dmi: Add info for the EZpad 6s Pro platform/x86: touchscreen_dmi: Add info for GlobalSpace SolT IVW 11.6" tablet platform/x86: touchscreen_dmi: Add support for setting touchscreen properties from cmdline platform/x86: thinkpad_acpi: Select INPUT_SPARSEKMAP in Kconfig platform/x86: x86-android-tablets: Add "select LEDS_CLASS" platform/x86: ISST: fix use-after-free in tpmi_sst_dev_remove()
2 parents c6cc979 + 3050052 commit 87895a6

File tree

5 files changed

+138
-4
lines changed

5 files changed

+138
-4
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,28 @@
19211921
Format:
19221922
<bus_id>,<clkrate>
19231923

1924+
i2c_touchscreen_props= [HW,ACPI,X86]
1925+
Set device-properties for ACPI-enumerated I2C-attached
1926+
touchscreen, to e.g. fix coordinates of upside-down
1927+
mounted touchscreens. If you need this option please
1928+
submit a drivers/platform/x86/touchscreen_dmi.c patch
1929+
adding a DMI quirk for this.
1930+
1931+
Format:
1932+
<ACPI_HW_ID>:<prop_name>=<val>[:prop_name=val][:...]
1933+
Where <val> is one of:
1934+
Omit "=<val>" entirely Set a boolean device-property
1935+
Unsigned number Set a u32 device-property
1936+
Anything else Set a string device-property
1937+
1938+
Examples (split over multiple lines):
1939+
i2c_touchscreen_props=GDIX1001:touchscreen-inverted-x:
1940+
touchscreen-inverted-y
1941+
1942+
i2c_touchscreen_props=MSSL1680:touchscreen-size-x=1920:
1943+
touchscreen-size-y=1080:touchscreen-inverted-y:
1944+
firmware-name=gsl1680-vendor-model.fw:silead,home-button
1945+
19241946
i8042.debug [HW] Toggle i8042 debug mode
19251947
i8042.unmask_kbd_data
19261948
[HW] Enable printing of interrupt data from the KBD port

drivers/platform/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ config THINKPAD_ACPI
515515
select NVRAM
516516
select NEW_LEDS
517517
select LEDS_CLASS
518+
select INPUT_SPARSEKMAP
518519
help
519520
This is a driver for the IBM and Lenovo ThinkPad laptops. It adds
520521
support for Fn-Fx key combinations, Bluetooth control, video

drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,8 +1610,8 @@ void tpmi_sst_dev_remove(struct auxiliary_device *auxdev)
16101610
tpmi_sst->partition_mask_current &= ~BIT(plat_info->partition);
16111611
/* Free the package instance when the all partitions are removed */
16121612
if (!tpmi_sst->partition_mask_current) {
1613-
kfree(tpmi_sst);
16141613
isst_common.sst_inst[tpmi_sst->package_id] = NULL;
1614+
kfree(tpmi_sst);
16151615
}
16161616
mutex_unlock(&isst_tpmi_dev_lock);
16171617
}

drivers/platform/x86/touchscreen_dmi.c

Lines changed: 112 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
*/
1010

1111
#include <linux/acpi.h>
12+
#include <linux/ctype.h>
1213
#include <linux/device.h>
1314
#include <linux/dmi.h>
1415
#include <linux/efi_embedded_fw.h>
1516
#include <linux/i2c.h>
17+
#include <linux/init.h>
18+
#include <linux/kstrtox.h>
1619
#include <linux/notifier.h>
1720
#include <linux/property.h>
1821
#include <linux/string.h>
@@ -897,6 +900,22 @@ static const struct ts_dmi_data schneider_sct101ctm_data = {
897900
.properties = schneider_sct101ctm_props,
898901
};
899902

903+
static const struct property_entry globalspace_solt_ivw116_props[] = {
904+
PROPERTY_ENTRY_U32("touchscreen-min-x", 7),
905+
PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
906+
PROPERTY_ENTRY_U32("touchscreen-size-x", 1723),
907+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1077),
908+
PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-globalspace-solt-ivw116.fw"),
909+
PROPERTY_ENTRY_U32("silead,max-fingers", 10),
910+
PROPERTY_ENTRY_BOOL("silead,home-button"),
911+
{ }
912+
};
913+
914+
static const struct ts_dmi_data globalspace_solt_ivw116_data = {
915+
.acpi_name = "MSSL1680:00",
916+
.properties = globalspace_solt_ivw116_props,
917+
};
918+
900919
static const struct property_entry techbite_arc_11_6_props[] = {
901920
PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
902921
PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
@@ -1385,6 +1404,17 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
13851404
DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
13861405
},
13871406
},
1407+
{
1408+
/* Jumper EZpad 6s Pro */
1409+
.driver_data = (void *)&jumper_ezpad_6_pro_b_data,
1410+
.matches = {
1411+
DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1412+
DMI_MATCH(DMI_PRODUCT_NAME, "Ezpad"),
1413+
/* Above matches are too generic, add bios match */
1414+
DMI_MATCH(DMI_BIOS_VERSION, "E.WSA116_8.E1.042.bin"),
1415+
DMI_MATCH(DMI_BIOS_DATE, "01/08/2020"),
1416+
},
1417+
},
13881418
{
13891419
/* Jumper EZpad 6 m4 */
13901420
.driver_data = (void *)&jumper_ezpad_6_m4_data,
@@ -1624,6 +1654,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
16241654
DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
16251655
},
16261656
},
1657+
{
1658+
/* GlobalSpace SoLT IVW 11.6" */
1659+
.driver_data = (void *)&globalspace_solt_ivw116_data,
1660+
.matches = {
1661+
DMI_MATCH(DMI_SYS_VENDOR, "Globalspace Tech Pvt Ltd"),
1662+
DMI_MATCH(DMI_PRODUCT_NAME, "SolTIVW"),
1663+
DMI_MATCH(DMI_PRODUCT_SKU, "PN20170413488"),
1664+
},
1665+
},
16271666
{
16281667
/* Techbite Arc 11.6 */
16291668
.driver_data = (void *)&techbite_arc_11_6_data,
@@ -1817,7 +1856,7 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
18171856
{ }
18181857
};
18191858

1820-
static const struct ts_dmi_data *ts_data;
1859+
static struct ts_dmi_data *ts_data;
18211860

18221861
static void ts_dmi_add_props(struct i2c_client *client)
18231862
{
@@ -1852,20 +1891,90 @@ static int ts_dmi_notifier_call(struct notifier_block *nb,
18521891
return 0;
18531892
}
18541893

1894+
#define MAX_CMDLINE_PROPS 16
1895+
1896+
static struct property_entry ts_cmdline_props[MAX_CMDLINE_PROPS + 1];
1897+
1898+
static struct ts_dmi_data ts_cmdline_data = {
1899+
.properties = ts_cmdline_props,
1900+
};
1901+
1902+
static int __init ts_parse_props(char *str)
1903+
{
1904+
/* Save the original str to show it on syntax errors */
1905+
char orig_str[256];
1906+
char *name, *value;
1907+
u32 u32val;
1908+
int i, ret;
1909+
1910+
strscpy(orig_str, str, sizeof(orig_str));
1911+
1912+
/*
1913+
* str is part of the static_command_line from init/main.c and poking
1914+
* holes in that by writing 0 to it is allowed, as is taking long
1915+
* lasting references to it.
1916+
*/
1917+
ts_cmdline_data.acpi_name = strsep(&str, ":");
1918+
1919+
for (i = 0; i < MAX_CMDLINE_PROPS; i++) {
1920+
name = strsep(&str, ":");
1921+
if (!name || !name[0])
1922+
break;
1923+
1924+
/* Replace '=' with 0 and make value point past '=' or NULL */
1925+
value = name;
1926+
strsep(&value, "=");
1927+
if (!value) {
1928+
ts_cmdline_props[i] = PROPERTY_ENTRY_BOOL(name);
1929+
} else if (isdigit(value[0])) {
1930+
ret = kstrtou32(value, 0, &u32val);
1931+
if (ret)
1932+
goto syntax_error;
1933+
1934+
ts_cmdline_props[i] = PROPERTY_ENTRY_U32(name, u32val);
1935+
} else {
1936+
ts_cmdline_props[i] = PROPERTY_ENTRY_STRING(name, value);
1937+
}
1938+
}
1939+
1940+
if (!i || str)
1941+
goto syntax_error;
1942+
1943+
ts_data = &ts_cmdline_data;
1944+
return 1;
1945+
1946+
syntax_error:
1947+
pr_err("Invalid '%s' value for 'i2c_touchscreen_props='\n", orig_str);
1948+
return 1; /* "i2c_touchscreen_props=" is still a known parameter */
1949+
}
1950+
__setup("i2c_touchscreen_props=", ts_parse_props);
1951+
18551952
static struct notifier_block ts_dmi_notifier = {
18561953
.notifier_call = ts_dmi_notifier_call,
18571954
};
18581955

18591956
static int __init ts_dmi_init(void)
18601957
{
18611958
const struct dmi_system_id *dmi_id;
1959+
struct ts_dmi_data *ts_data_dmi;
18621960
int error;
18631961

18641962
dmi_id = dmi_first_match(touchscreen_dmi_table);
1865-
if (!dmi_id)
1963+
ts_data_dmi = dmi_id ? dmi_id->driver_data : NULL;
1964+
1965+
if (ts_data) {
1966+
/*
1967+
* Kernel cmdline provided data takes precedence, copy over
1968+
* DMI efi_embedded_fw info if available.
1969+
*/
1970+
if (ts_data_dmi)
1971+
ts_data->embedded_fw = ts_data_dmi->embedded_fw;
1972+
} else if (ts_data_dmi) {
1973+
ts_data = ts_data_dmi;
1974+
} else {
18661975
return 0; /* Not an error */
1976+
}
18671977

1868-
ts_data = dmi_id->driver_data;
18691978
/* Some dmi table entries only provide an efi_embedded_fw_desc */
18701979
if (!ts_data->properties)
18711980
return 0;

drivers/platform/x86/x86-android-tablets/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
config X86_ANDROID_TABLETS
77
tristate "X86 Android tablet support"
88
depends on I2C && SPI && SERIAL_DEV_BUS && ACPI && EFI && GPIOLIB && PMIC_OPREGION
9+
select NEW_LEDS
10+
select LEDS_CLASS
911
help
1012
X86 tablets which ship with Android as (part of) the factory image
1113
typically have various problems with their DSDTs. The factory kernels

0 commit comments

Comments
 (0)