Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75ec558f authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "HID: Adding new vendor id for QVR support"

parents 189d5468 e18c0477
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2249,6 +2249,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
#endif
#if IS_ENABLED(CONFIG_HID_QVR)
	{ HID_USB_DEVICE(USB_VENDOR_ID_QVR5, USB_DEVICE_ID_QVR5) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_QVR32A, USB_DEVICE_ID_QVR32A) },
#endif
#if IS_ENABLED(CONFIG_HID_RETRODE)
	{ HID_USB_DEVICE(USB_VENDOR_ID_FUTURE_TECHNOLOGY, USB_DEVICE_ID_RETRODE2) },
+2 −0
Original line number Diff line number Diff line
@@ -1177,6 +1177,8 @@
#define USB_DEVICE_ID_UGTIZER_TABLET_GP0610	0x0053

#define USB_VENDOR_ID_QVR5	0x045e
#define USB_VENDOR_ID_QVR32A	0x04b4
#define USB_DEVICE_ID_QVR5	0x0659
#define USB_DEVICE_ID_QVR32A	0x00c3

#endif
+12 −13
Original line number Diff line number Diff line
@@ -304,7 +304,6 @@ static int qvr_external_sensor_probe(struct hid_device *hdev,
		pr_err("%s: hid_hw_start failed", __func__);
		goto err_free;
	}
	if (hdev->vendor == USB_VENDOR_ID_QVR5) {
	hid_buf = kzalloc(255, GFP_ATOMIC);
	if (hid_buf == NULL)
		return -ENOMEM;
@@ -315,7 +314,6 @@ static int qvr_external_sensor_probe(struct hid_device *hdev,
		HID_FEATURE_REPORT,
		HID_REQ_SET_REPORT);
	kfree(hid_buf);
	}

	qvr_device = &hdev->dev;

@@ -333,7 +331,7 @@ static int qvr_external_sensor_raw_event(struct hid_device *hid,
	static int val;
	int ret = -1;

	if ((hid->vendor == USB_VENDOR_ID_QVR5) && (vaddr != NULL)) {
	if (vaddr != NULL && report->id == 0x1) {
		ret = qvr_send_package_wrap(data/*hid_value*/, size, hid);
		if (ret == 0) {
			val = 1 ^ val;
@@ -352,6 +350,7 @@ static void qvr_external_sensor_device_remove(struct hid_device *hdev)

static struct hid_device_id qvr_external_sensor_table[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_QVR5, USB_DEVICE_ID_QVR5) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_QVR32A, USB_DEVICE_ID_QVR32A) },
	{ }
};
MODULE_DEVICE_TABLE(hid, qvr_external_sensor_table);
+0 −2
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@
#ifndef HID_QVR_H_FILE
#define HID_QVR_H_FILE

#define USB_VENDOR_ID_QVR5	0x045e
#define USB_DEVICE_ID_QVR5	0x0659
#define QVR_EXTERNAL_SENSOR_REPORT_ID 0x1

struct external_imu_format {
+1 −0
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ static const struct hid_blacklist {
	{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT },
	{ USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI, HID_QUIRK_MULTI_INPUT },
	{ USB_VENDOR_ID_QVR5, USB_DEVICE_ID_QVR5, HID_QUIRK_HIDINPUT_FORCE },
	{ USB_VENDOR_ID_QVR32A, USB_DEVICE_ID_QVR32A, HID_QUIRK_HIDINPUT_FORCE },

	{ 0, 0 }
};