I have a USB headset device which when attached gets detected under /sys/devices/virtual subtree. Basically, I want to use the hidrawX node but due to the wrong subsystem type I am unable to configure my headset properly.
I am (have to) using kernel v22.214.171.124 (pretty old).
Devices get detected as under virtual subsystem if there is no physical device attached or the bus to which device is connected unable to enumerate the device properly.
Could somebody throw some light why device is detected virtual despite attached on USB port?
I have tried the kernel v2.6.32 and it correctly detects the device under USB subsystem/tree. And, hidrawX paths are correct. I cannot use this kernel version. Is there any bus related enumeration change that is different in the higher kernel versions?
[UPDATE] Using the following patch in the file
+++ linux/drivers/hid/hidraw.c @ 329 - dev->dev = device_create_drvdata(hidraw_class, NULL, + dev->dev = device_create_drvdata(hidraw_class, hid->dev, MKDEV(hidraw_major, minor), NULL, "%s%d", "hidraw", minor);
Hidraw nodes are getting created under the correct parent nodes and appearing in /sysfs. This patch just solves the problem of nodes under the correct parent node and some minor changes are required to make the hidraw functionality work on the aforementioned kernel version.