Skip to content

Commit fe24a97

Browse files
committed
Merge tag 'input-for-v6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - a fix for 8042 to stop leaking platform device on unload - a fix for Goodix touchscreens on devices like Nanote UMPC-01 where we need to reset controller to load config from firmware - a workaround for Acer Switch to avoid interrupt storm from home and power buttons - a workaround for more ASUS ZenBook models to detect keyboard controller - a fix for iforce driver to properly handle communication errors - touchpad on HP Laptop 15-da3001TU switched to RMI mode * tag 'input-for-v6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - fix leaking of platform device on module removal Input: i8042 - apply probe defer to more ASUS ZenBook models Input: soc_button_array - add Acer Switch V 10 to dmi_use_low_level_irq[] Input: soc_button_array - add use_low_level_irq module parameter Input: iforce - invert valid length check when fetching device IDs Input: goodix - try resetting the controller when no config is set dt-bindings: input: touchscreen: Add compatible for Goodix GT7986U chip Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode
2 parents bf5003a + 81cd7e8 commit fe24a97

File tree

7 files changed

+37
-14
lines changed

7 files changed

+37
-14
lines changed

Documentation/devicetree/bindings/input/goodix,gt7375p.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ description:
1616

1717
properties:
1818
compatible:
19-
items:
19+
oneOf:
2020
- const: goodix,gt7375p
21+
- items:
22+
- const: goodix,gt7986u
23+
- const: goodix,gt7375p
2124

2225
reg:
2326
enum:

drivers/input/joystick/iforce/iforce-main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,22 +273,22 @@ int iforce_init_device(struct device *parent, u16 bustype,
273273
* Get device info.
274274
*/
275275

276-
if (!iforce_get_id_packet(iforce, 'M', buf, &len) || len < 3)
276+
if (!iforce_get_id_packet(iforce, 'M', buf, &len) && len >= 3)
277277
input_dev->id.vendor = get_unaligned_le16(buf + 1);
278278
else
279279
dev_warn(&iforce->dev->dev, "Device does not respond to id packet M\n");
280280

281-
if (!iforce_get_id_packet(iforce, 'P', buf, &len) || len < 3)
281+
if (!iforce_get_id_packet(iforce, 'P', buf, &len) && len >= 3)
282282
input_dev->id.product = get_unaligned_le16(buf + 1);
283283
else
284284
dev_warn(&iforce->dev->dev, "Device does not respond to id packet P\n");
285285

286-
if (!iforce_get_id_packet(iforce, 'B', buf, &len) || len < 3)
286+
if (!iforce_get_id_packet(iforce, 'B', buf, &len) && len >= 3)
287287
iforce->device_memory.end = get_unaligned_le16(buf + 1);
288288
else
289289
dev_warn(&iforce->dev->dev, "Device does not respond to id packet B\n");
290290

291-
if (!iforce_get_id_packet(iforce, 'N', buf, &len) || len < 2)
291+
if (!iforce_get_id_packet(iforce, 'N', buf, &len) && len >= 2)
292292
ff_effects = buf[1];
293293
else
294294
dev_warn(&iforce->dev->dev, "Device does not respond to id packet N\n");

drivers/input/misc/soc_button_array.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include <linux/gpio.h>
1919
#include <linux/platform_device.h>
2020

21+
static bool use_low_level_irq;
22+
module_param(use_low_level_irq, bool, 0444);
23+
MODULE_PARM_DESC(use_low_level_irq, "Use low-level triggered IRQ instead of edge triggered");
24+
2125
struct soc_button_info {
2226
const char *name;
2327
int acpi_index;
@@ -73,6 +77,13 @@ static const struct dmi_system_id dmi_use_low_level_irq[] = {
7377
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
7478
},
7579
},
80+
{
81+
/* Acer Switch V 10 SW5-017, same issue as Acer Switch 10 SW5-012. */
82+
.matches = {
83+
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
84+
DMI_MATCH(DMI_PRODUCT_NAME, "SW5-017"),
85+
},
86+
},
7687
{
7788
/*
7889
* Acer One S1003. _LID method messes with power-button GPIO
@@ -164,7 +175,8 @@ soc_button_device_create(struct platform_device *pdev,
164175
}
165176

166177
/* See dmi_use_low_level_irq[] comment */
167-
if (!autorepeat && dmi_check_system(dmi_use_low_level_irq)) {
178+
if (!autorepeat && (use_low_level_irq ||
179+
dmi_check_system(dmi_use_low_level_irq))) {
168180
irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
169181
gpio_keys[n_buttons].irq = irq;
170182
gpio_keys[n_buttons].gpio = -ENOENT;

drivers/input/mouse/synaptics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ static const char * const smbus_pnp_ids[] = {
192192
"SYN3221", /* HP 15-ay000 */
193193
"SYN323d", /* HP Spectre X360 13-w013dx */
194194
"SYN3257", /* HP Envy 13-ad105ng */
195+
"SYN3286", /* HP Laptop 15-da3001TU */
195196
NULL
196197
};
197198

drivers/input/serio/i8042-acpipnpio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,18 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
115115
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_NEVER)
116116
},
117117
{
118-
/* ASUS ZenBook UX425UA */
118+
/* ASUS ZenBook UX425UA/QA */
119119
.matches = {
120120
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
121-
DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425UA"),
121+
DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425"),
122122
},
123123
.driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
124124
},
125125
{
126-
/* ASUS ZenBook UM325UA */
126+
/* ASUS ZenBook UM325UA/QA */
127127
.matches = {
128128
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
129-
DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325UA_UM325UA"),
129+
DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325"),
130130
},
131131
.driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
132132
},

drivers/input/serio/i8042.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,8 +1543,6 @@ static int i8042_probe(struct platform_device *dev)
15431543
{
15441544
int error;
15451545

1546-
i8042_platform_device = dev;
1547-
15481546
if (i8042_reset == I8042_RESET_ALWAYS) {
15491547
error = i8042_controller_selftest();
15501548
if (error)
@@ -1582,7 +1580,6 @@ static int i8042_probe(struct platform_device *dev)
15821580
i8042_free_aux_ports(); /* in case KBD failed but AUX not */
15831581
i8042_free_irqs();
15841582
i8042_controller_reset(false);
1585-
i8042_platform_device = NULL;
15861583

15871584
return error;
15881585
}
@@ -1592,7 +1589,6 @@ static int i8042_remove(struct platform_device *dev)
15921589
i8042_unregister_ports();
15931590
i8042_free_irqs();
15941591
i8042_controller_reset(false);
1595-
i8042_platform_device = NULL;
15961592

15971593
return 0;
15981594
}

drivers/input/touchscreen/goodix.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,13 +1158,24 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
11581158
input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
11591159
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
11601160

1161+
retry_read_config:
11611162
/* Read configuration and apply touchscreen parameters */
11621163
goodix_read_config(ts);
11631164

11641165
/* Try overriding touchscreen parameters via device properties */
11651166
touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
11661167

11671168
if (!ts->prop.max_x || !ts->prop.max_y || !ts->max_touch_num) {
1169+
if (!ts->reset_controller_at_probe &&
1170+
ts->irq_pin_access_method != IRQ_PIN_ACCESS_NONE) {
1171+
dev_info(&ts->client->dev, "Config not set, resetting controller\n");
1172+
/* Retry after a controller reset */
1173+
ts->reset_controller_at_probe = true;
1174+
error = goodix_reset(ts);
1175+
if (error)
1176+
return error;
1177+
goto retry_read_config;
1178+
}
11681179
dev_err(&ts->client->dev,
11691180
"Invalid config (%d, %d, %d), using defaults\n",
11701181
ts->prop.max_x, ts->prop.max_y, ts->max_touch_num);

0 commit comments

Comments
 (0)