Skip to content

Commit 961af9d

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - a fix for Synaptics touchpads in RMI4 mode failing to suspend/resume properly because I2C client devices are now being suspended and resumed asynchronously which changed the ordering - a change to make sure we do not set right and middle buttons capabilities on touchpads that are "buttonpads" (i.e. do not have separate physical buttons) - a change to zinitix touchscreen driver adding more compatible strings/IDs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: psmouse - set up dependency between PS/2 and SMBus companions Input: zinitix - add new compatible strings Input: clear BTN_RIGHT/MIDDLE on buttonpads
2 parents 70d2bec + 7b1f781 commit 961af9d

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

drivers/input/input.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,12 @@ int input_register_device(struct input_dev *dev)
22852285
/* KEY_RESERVED is not supposed to be transmitted to userspace. */
22862286
__clear_bit(KEY_RESERVED, dev->keybit);
22872287

2288+
/* Buttonpads should not map BTN_RIGHT and/or BTN_MIDDLE. */
2289+
if (test_bit(INPUT_PROP_BUTTONPAD, dev->propbit)) {
2290+
__clear_bit(BTN_RIGHT, dev->keybit);
2291+
__clear_bit(BTN_MIDDLE, dev->keybit);
2292+
}
2293+
22882294
/* Make sure that bitmasks not mentioned in dev->evbit are clean. */
22892295
input_cleanse_bitmasks(dev);
22902296

drivers/input/mouse/psmouse-smbus.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ static void psmouse_smbus_detach_i2c_client(struct i2c_client *client)
7575
"Marking SMBus companion %s as gone\n",
7676
dev_name(&smbdev->client->dev));
7777
smbdev->dead = true;
78+
device_link_remove(&smbdev->client->dev,
79+
&smbdev->psmouse->ps2dev.serio->dev);
7880
serio_rescan(smbdev->psmouse->ps2dev.serio);
7981
} else {
8082
list_del(&smbdev->node);
@@ -174,6 +176,8 @@ static void psmouse_smbus_disconnect(struct psmouse *psmouse)
174176
kfree(smbdev);
175177
} else {
176178
smbdev->dead = true;
179+
device_link_remove(&smbdev->client->dev,
180+
&psmouse->ps2dev.serio->dev);
177181
psmouse_dbg(smbdev->psmouse,
178182
"posting removal request for SMBus companion %s\n",
179183
dev_name(&smbdev->client->dev));
@@ -270,6 +274,12 @@ int psmouse_smbus_init(struct psmouse *psmouse,
270274

271275
if (smbdev->client) {
272276
/* We have our companion device */
277+
if (!device_link_add(&smbdev->client->dev,
278+
&psmouse->ps2dev.serio->dev,
279+
DL_FLAG_STATELESS))
280+
psmouse_warn(psmouse,
281+
"failed to set up link with iSMBus companion %s\n",
282+
dev_name(&smbdev->client->dev));
273283
return 0;
274284
}
275285

drivers/input/touchscreen/zinitix.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,20 @@ static SIMPLE_DEV_PM_OPS(zinitix_pm_ops, zinitix_suspend, zinitix_resume);
571571

572572
#ifdef CONFIG_OF
573573
static const struct of_device_id zinitix_of_match[] = {
574+
{ .compatible = "zinitix,bt402" },
575+
{ .compatible = "zinitix,bt403" },
576+
{ .compatible = "zinitix,bt404" },
577+
{ .compatible = "zinitix,bt412" },
578+
{ .compatible = "zinitix,bt413" },
579+
{ .compatible = "zinitix,bt431" },
580+
{ .compatible = "zinitix,bt432" },
581+
{ .compatible = "zinitix,bt531" },
574582
{ .compatible = "zinitix,bt532" },
583+
{ .compatible = "zinitix,bt538" },
575584
{ .compatible = "zinitix,bt541" },
585+
{ .compatible = "zinitix,bt548" },
586+
{ .compatible = "zinitix,bt554" },
587+
{ .compatible = "zinitix,at100" },
576588
{ }
577589
};
578590
MODULE_DEVICE_TABLE(of, zinitix_of_match);

0 commit comments

Comments
 (0)