mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
for-linus-2024042501
-----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEoEVH9lhNrxiMPSyI7MXwXhnZSjYFAmYqD6wTHGJlbnRpc3NA a2VybmVsLm9yZwAKCRDsxfBeGdlKNh5/D/9V724F8Kvfzi8Z88ESqUVgJ2aK7WRQ WGBlKi/nUYqMU2fj5P0SfvIdLbswmEgVuk4aRBRYZWMygIzpSHEem5odRRngeriD lmEQqqzgTGbXGH7wok3H/IjU2/Ml0a7GyH6exvhnIg0yI6LAKX4DecN6zXLXRoRT 4REhLD5fWLx+sfhE0Rg/iur0uS8yYRnEML540eZPBNRDm9JQxqR44SjYnIl7YLLz ozQX2QqHg2R/ynYDVYyDBuzI7v9kU8ttR4RICPujJWURNAoa4rzHC5+54Pcpw3z1 pe3hhw5xfb75KVW634HbBCePUSFFw/NIrhON+YbgHDc/ZyBoKzXOlUXfdzDQQn23 Vl/jZlGil8cM7FKACHJGDeECxMvK1lOtkreZHG43Ye6AHX3zfaItrFXQ2a3LxStc HorH0mNCzKqWhr0H3qmc9s1W6K7vDX5eM+SrTe2KrKdmoyPiHdbANdHRZSJpG3yB 1u+cdSKnNjl74xeDydR0RuqreojWG7sKw/m6ORXzYz7DxDuhcVY2qypG+KtUPhzl x19vuIrd4isagoaoe2V/jJUZfRzm+WZUeOzAyoqHDlcuPoXdcyLwEW3/5nltVUWO 21mtg8W/FZ19rTI963nxtq8V1PuYvOMKW4EocVWG2q9OWWvcJhN2keW9UX9QnHh1 F/mP6LyLeWtshA== =Lkxn -----END PGP SIGNATURE----- Merge tag 'for-linus-2024042501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Benjamin Tissoires: - A couple of i2c-hid fixes (Kenny Levinsen & Nam Cao) - A config issue with mcp-2221 when CONFIG_IIO is not enabled (Abdelrahman Morsy) - A dev_err fix in intel-ish-hid (Zhang Lixu) - A couple of mouse fixes for both nintendo and Logitech-dj (Nuno Pereira and Yaraslau Furman) - I'm changing my main kernel email address as it's way simpler for me than the Red Hat one (Benjamin Tissoires) * tag 'for-linus-2024042501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: mcp-2221: cancel delayed_work only when CONFIG_IIO is enabled HID: logitech-dj: allow mice to use all types of reports HID: i2c-hid: Revert to await reset ACK before reading report descriptor HID: nintendo: Fix N64 controller being identified as mouse MAINTAINERS: update Benjamin's email address HID: intel-ish-hid: ipc: Fix dev_err usage with uninitialized dev->devc HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up
This commit is contained in:
commit
f9e023299b
2
.mailmap
2
.mailmap
@ -98,6 +98,8 @@ Ben Widawsky <bwidawsk@kernel.org> <ben@bwidawsk.net>
|
|||||||
Ben Widawsky <bwidawsk@kernel.org> <ben.widawsky@intel.com>
|
Ben Widawsky <bwidawsk@kernel.org> <ben.widawsky@intel.com>
|
||||||
Ben Widawsky <bwidawsk@kernel.org> <benjamin.widawsky@intel.com>
|
Ben Widawsky <bwidawsk@kernel.org> <benjamin.widawsky@intel.com>
|
||||||
Benjamin Poirier <benjamin.poirier@gmail.com> <bpoirier@suse.de>
|
Benjamin Poirier <benjamin.poirier@gmail.com> <bpoirier@suse.de>
|
||||||
|
Benjamin Tissoires <bentiss@kernel.org> <benjamin.tissoires@gmail.com>
|
||||||
|
Benjamin Tissoires <bentiss@kernel.org> <benjamin.tissoires@redhat.com>
|
||||||
Bjorn Andersson <andersson@kernel.org> <bjorn@kryo.se>
|
Bjorn Andersson <andersson@kernel.org> <bjorn@kryo.se>
|
||||||
Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@linaro.org>
|
Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@linaro.org>
|
||||||
Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@sonymobile.com>
|
Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@sonymobile.com>
|
||||||
|
@ -9576,7 +9576,7 @@ F: kernel/power/
|
|||||||
|
|
||||||
HID CORE LAYER
|
HID CORE LAYER
|
||||||
M: Jiri Kosina <jikos@kernel.org>
|
M: Jiri Kosina <jikos@kernel.org>
|
||||||
M: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
M: Benjamin Tissoires <bentiss@kernel.org>
|
||||||
L: linux-input@vger.kernel.org
|
L: linux-input@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
|
||||||
@ -22839,7 +22839,7 @@ F: drivers/usb/host/ehci*
|
|||||||
|
|
||||||
USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
|
USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
|
||||||
M: Jiri Kosina <jikos@kernel.org>
|
M: Jiri Kosina <jikos@kernel.org>
|
||||||
M: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
M: Benjamin Tissoires <bentiss@kernel.org>
|
||||||
L: linux-usb@vger.kernel.org
|
L: linux-usb@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
|
||||||
|
@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case REPORT_TYPE_MOUSE:
|
case REPORT_TYPE_MOUSE:
|
||||||
workitem->reports_supported |= STD_MOUSE | HIDPP;
|
workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
|
||||||
if (djrcv_dev->type == recvr_type_mouse_only)
|
|
||||||
workitem->reports_supported |= MULTIMEDIA;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -944,9 +944,11 @@ static void mcp2221_hid_unregister(void *ptr)
|
|||||||
/* This is needed to be sure hid_hw_stop() isn't called twice by the subsystem */
|
/* This is needed to be sure hid_hw_stop() isn't called twice by the subsystem */
|
||||||
static void mcp2221_remove(struct hid_device *hdev)
|
static void mcp2221_remove(struct hid_device *hdev)
|
||||||
{
|
{
|
||||||
|
#if IS_REACHABLE(CONFIG_IIO)
|
||||||
struct mcp2221 *mcp = hid_get_drvdata(hdev);
|
struct mcp2221 *mcp = hid_get_drvdata(hdev);
|
||||||
|
|
||||||
cancel_delayed_work_sync(&mcp->init_work);
|
cancel_delayed_work_sync(&mcp->init_work);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if IS_REACHABLE(CONFIG_IIO)
|
#if IS_REACHABLE(CONFIG_IIO)
|
||||||
|
@ -481,10 +481,10 @@ static const struct joycon_ctlr_button_mapping n64con_button_mappings[] = {
|
|||||||
{ BTN_TR, JC_BTN_R, },
|
{ BTN_TR, JC_BTN_R, },
|
||||||
{ BTN_TR2, JC_BTN_LSTICK, }, /* ZR */
|
{ BTN_TR2, JC_BTN_LSTICK, }, /* ZR */
|
||||||
{ BTN_START, JC_BTN_PLUS, },
|
{ BTN_START, JC_BTN_PLUS, },
|
||||||
{ BTN_FORWARD, JC_BTN_Y, }, /* C UP */
|
{ BTN_SELECT, JC_BTN_Y, }, /* C UP */
|
||||||
{ BTN_BACK, JC_BTN_ZR, }, /* C DOWN */
|
{ BTN_X, JC_BTN_ZR, }, /* C DOWN */
|
||||||
{ BTN_LEFT, JC_BTN_X, }, /* C LEFT */
|
{ BTN_Y, JC_BTN_X, }, /* C LEFT */
|
||||||
{ BTN_RIGHT, JC_BTN_MINUS, }, /* C RIGHT */
|
{ BTN_C, JC_BTN_MINUS, }, /* C RIGHT */
|
||||||
{ BTN_MODE, JC_BTN_HOME, },
|
{ BTN_MODE, JC_BTN_HOME, },
|
||||||
{ BTN_Z, JC_BTN_CAP, },
|
{ BTN_Z, JC_BTN_CAP, },
|
||||||
{ /* sentinel */ },
|
{ /* sentinel */ },
|
||||||
|
@ -64,7 +64,6 @@
|
|||||||
/* flags */
|
/* flags */
|
||||||
#define I2C_HID_STARTED 0
|
#define I2C_HID_STARTED 0
|
||||||
#define I2C_HID_RESET_PENDING 1
|
#define I2C_HID_RESET_PENDING 1
|
||||||
#define I2C_HID_READ_PENDING 2
|
|
||||||
|
|
||||||
#define I2C_HID_PWR_ON 0x00
|
#define I2C_HID_PWR_ON 0x00
|
||||||
#define I2C_HID_PWR_SLEEP 0x01
|
#define I2C_HID_PWR_SLEEP 0x01
|
||||||
@ -190,15 +189,10 @@ static int i2c_hid_xfer(struct i2c_hid *ihid,
|
|||||||
msgs[n].len = recv_len;
|
msgs[n].len = recv_len;
|
||||||
msgs[n].buf = recv_buf;
|
msgs[n].buf = recv_buf;
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
set_bit(I2C_HID_READ_PENDING, &ihid->flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = i2c_transfer(client->adapter, msgs, n);
|
ret = i2c_transfer(client->adapter, msgs, n);
|
||||||
|
|
||||||
if (recv_len)
|
|
||||||
clear_bit(I2C_HID_READ_PENDING, &ihid->flags);
|
|
||||||
|
|
||||||
if (ret != n)
|
if (ret != n)
|
||||||
return ret < 0 ? ret : -EIO;
|
return ret < 0 ? ret : -EIO;
|
||||||
|
|
||||||
@ -556,9 +550,6 @@ static irqreturn_t i2c_hid_irq(int irq, void *dev_id)
|
|||||||
{
|
{
|
||||||
struct i2c_hid *ihid = dev_id;
|
struct i2c_hid *ihid = dev_id;
|
||||||
|
|
||||||
if (test_bit(I2C_HID_READ_PENDING, &ihid->flags))
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
|
|
||||||
i2c_hid_get_input(ihid);
|
i2c_hid_get_input(ihid);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
@ -735,12 +726,15 @@ static int i2c_hid_parse(struct hid_device *hid)
|
|||||||
mutex_lock(&ihid->reset_lock);
|
mutex_lock(&ihid->reset_lock);
|
||||||
do {
|
do {
|
||||||
ret = i2c_hid_start_hwreset(ihid);
|
ret = i2c_hid_start_hwreset(ihid);
|
||||||
if (ret)
|
if (ret == 0)
|
||||||
|
ret = i2c_hid_finish_hwreset(ihid);
|
||||||
|
else
|
||||||
msleep(1000);
|
msleep(1000);
|
||||||
} while (tries-- > 0 && ret);
|
} while (tries-- > 0 && ret);
|
||||||
|
mutex_unlock(&ihid->reset_lock);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
goto abort_reset;
|
return ret;
|
||||||
|
|
||||||
use_override = i2c_hid_get_dmi_hid_report_desc_override(client->name,
|
use_override = i2c_hid_get_dmi_hid_report_desc_override(client->name,
|
||||||
&rsize);
|
&rsize);
|
||||||
@ -750,11 +744,8 @@ static int i2c_hid_parse(struct hid_device *hid)
|
|||||||
i2c_hid_dbg(ihid, "Using a HID report descriptor override\n");
|
i2c_hid_dbg(ihid, "Using a HID report descriptor override\n");
|
||||||
} else {
|
} else {
|
||||||
rdesc = kzalloc(rsize, GFP_KERNEL);
|
rdesc = kzalloc(rsize, GFP_KERNEL);
|
||||||
|
if (!rdesc)
|
||||||
if (!rdesc) {
|
return -ENOMEM;
|
||||||
ret = -ENOMEM;
|
|
||||||
goto abort_reset;
|
|
||||||
}
|
|
||||||
|
|
||||||
i2c_hid_dbg(ihid, "asking HID report descriptor\n");
|
i2c_hid_dbg(ihid, "asking HID report descriptor\n");
|
||||||
|
|
||||||
@ -763,23 +754,10 @@ static int i2c_hid_parse(struct hid_device *hid)
|
|||||||
rdesc, rsize);
|
rdesc, rsize);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
hid_err(hid, "reading report descriptor failed\n");
|
hid_err(hid, "reading report descriptor failed\n");
|
||||||
goto abort_reset;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Windows directly reads the report-descriptor after sending reset
|
|
||||||
* and then waits for resets completion afterwards. Some touchpads
|
|
||||||
* actually wait for the report-descriptor to be read before signalling
|
|
||||||
* reset completion.
|
|
||||||
*/
|
|
||||||
ret = i2c_hid_finish_hwreset(ihid);
|
|
||||||
abort_reset:
|
|
||||||
clear_bit(I2C_HID_RESET_PENDING, &ihid->flags);
|
|
||||||
mutex_unlock(&ihid->reset_lock);
|
|
||||||
if (ret)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
i2c_hid_dbg(ihid, "Report Descriptor: %*ph\n", rsize, rdesc);
|
i2c_hid_dbg(ihid, "Report Descriptor: %*ph\n", rsize, rdesc);
|
||||||
|
|
||||||
ret = hid_parse_report(hid, rdesc, rsize);
|
ret = hid_parse_report(hid, rdesc, rsize);
|
||||||
|
@ -948,6 +948,7 @@ struct ishtp_device *ish_dev_init(struct pci_dev *pdev)
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
dev->devc = &pdev->dev;
|
||||||
ishtp_device_init(dev);
|
ishtp_device_init(dev);
|
||||||
|
|
||||||
init_waitqueue_head(&dev->wait_hw_ready);
|
init_waitqueue_head(&dev->wait_hw_ready);
|
||||||
@ -983,7 +984,6 @@ struct ishtp_device *ish_dev_init(struct pci_dev *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dev->ops = &ish_hw_ops;
|
dev->ops = &ish_hw_ops;
|
||||||
dev->devc = &pdev->dev;
|
|
||||||
dev->mtu = IPC_PAYLOAD_SIZE - sizeof(struct ishtp_msg_hdr);
|
dev->mtu = IPC_PAYLOAD_SIZE - sizeof(struct ishtp_msg_hdr);
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user