Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] HID: kye: fix inverted Manticore open/close condition
@ 2026-09-11 10:54 Oscar Priego Verdugo
  0 siblings, 0 replies; only message in thread
From: Oscar Priego Verdugo @ 2026-09-11 10:54 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: linux-input, linux-kernel, Oscar Priego Verdugo

The Manticore workaround is intended to open each HID interface once and
immediately close it, which is required for the keyboard to become fully
functional.

hid_hw_open() returns zero on success, so the current condition is
inverted: successful opens are left outstanding, while hid_hw_close() is
called after a failed open.

Negate the condition so the interface is closed only after a successful
open. This restores the sequence intended by the original workaround while
preserving its best-effort behavior when opening fails.

Fixes: 8a396321e210 ("HID: kye: fix unresponsive keyboard")
Signed-off-by: Oscar Priego Verdugo <oscar.priegov@gmail.com>
---
 drivers/hid/hid-kye.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index bd96bfa7af70..ed1588e2bfb3 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -594,7 +594,7 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
 		 * The manticore keyboard needs to have all the interfaces
 		 * opened at least once to be fully functional.
 		 */
-		if (hid_hw_open(hdev))
+		if (!hid_hw_open(hdev))
 			hid_hw_close(hdev);
 		break;
 	case USB_DEVICE_ID_KYE_EASYPEN_M406:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 10:54 [PATCH] HID: kye: fix inverted Manticore open/close condition Oscar Priego Verdugo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox