Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Feb 20, 2022
2 parents 70d2bec + 7b1f781 commit 961af9d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2285,6 +2285,12 @@ int input_register_device(struct input_dev *dev)
/* KEY_RESERVED is not supposed to be transmitted to userspace. */
__clear_bit(KEY_RESERVED, dev->keybit);

/* Buttonpads should not map BTN_RIGHT and/or BTN_MIDDLE. */
if (test_bit(INPUT_PROP_BUTTONPAD, dev->propbit)) {
__clear_bit(BTN_RIGHT, dev->keybit);
__clear_bit(BTN_MIDDLE, dev->keybit);
}

/* Make sure that bitmasks not mentioned in dev->evbit are clean. */
input_cleanse_bitmasks(dev);

Expand Down
10 changes: 10 additions & 0 deletions drivers/input/mouse/psmouse-smbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ static void psmouse_smbus_detach_i2c_client(struct i2c_client *client)
"Marking SMBus companion %s as gone\n",
dev_name(&smbdev->client->dev));
smbdev->dead = true;
device_link_remove(&smbdev->client->dev,
&smbdev->psmouse->ps2dev.serio->dev);
serio_rescan(smbdev->psmouse->ps2dev.serio);
} else {
list_del(&smbdev->node);
Expand Down Expand Up @@ -174,6 +176,8 @@ static void psmouse_smbus_disconnect(struct psmouse *psmouse)
kfree(smbdev);
} else {
smbdev->dead = true;
device_link_remove(&smbdev->client->dev,
&psmouse->ps2dev.serio->dev);
psmouse_dbg(smbdev->psmouse,
"posting removal request for SMBus companion %s\n",
dev_name(&smbdev->client->dev));
Expand Down Expand Up @@ -270,6 +274,12 @@ int psmouse_smbus_init(struct psmouse *psmouse,

if (smbdev->client) {
/* We have our companion device */
if (!device_link_add(&smbdev->client->dev,
&psmouse->ps2dev.serio->dev,
DL_FLAG_STATELESS))
psmouse_warn(psmouse,
"failed to set up link with iSMBus companion %s\n",
dev_name(&smbdev->client->dev));
return 0;
}

Expand Down
12 changes: 12 additions & 0 deletions drivers/input/touchscreen/zinitix.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,20 @@ static SIMPLE_DEV_PM_OPS(zinitix_pm_ops, zinitix_suspend, zinitix_resume);

#ifdef CONFIG_OF
static const struct of_device_id zinitix_of_match[] = {
{ .compatible = "zinitix,bt402" },
{ .compatible = "zinitix,bt403" },
{ .compatible = "zinitix,bt404" },
{ .compatible = "zinitix,bt412" },
{ .compatible = "zinitix,bt413" },
{ .compatible = "zinitix,bt431" },
{ .compatible = "zinitix,bt432" },
{ .compatible = "zinitix,bt531" },
{ .compatible = "zinitix,bt532" },
{ .compatible = "zinitix,bt538" },
{ .compatible = "zinitix,bt541" },
{ .compatible = "zinitix,bt548" },
{ .compatible = "zinitix,bt554" },
{ .compatible = "zinitix,at100" },
{ }
};
MODULE_DEVICE_TABLE(of, zinitix_of_match);
Expand Down

0 comments on commit 961af9d

Please sign in to comment.