All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 218646] New: Problem with search driver or this is guide how search driver.
Date: Tue, 26 Mar 2024 20:33:16 +0000	[thread overview]
Message-ID: <bug-218646-208809@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=218646

            Bug ID: 218646
           Summary: Problem with search driver or this is guide how search
                    driver.
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: USB
          Assignee: drivers_usb@kernel-bugs.kernel.org
          Reporter: swojskichlopak@wp.pl
        Regression: No

I noticed that USB drivers are in 
https://github.com/torvalds/linux/blob/master/drivers/hid/

And there is Kconfig which I can read.

This is a very useful file. 
Bravo you, congratulations and thank you very much.
I wish you lots of free coffee :D

Because I can check there
- Is the hardware supported 
( " Ctrl + F " in Firefox to search hardware )
- which driver supports my hardware.
And then I can try check if driver exist in my system.
The name driver will be in lower case with "_" or "-" .
For files I recommend using " - " because it is more popular.

Char " - " is 2D in hex

printf "%x\n" "'-"
2d

I mention it because are many signs.

Coming back to the driver, 
this is an example.
In Kconfig file I can find that PS4 is supported 
for example by " HID_PLAYSTATION "
then I can search this driver inside system

$ find /lib/modules/$(uname -r) -type f -name '*.ko' | grep -i "playstation"
/lib/modules/5.15.0-91-generic/kernel/drivers/hid/hid-playstation.ko

And hid-playstation.ko this is the driver.

Problem I see with HyperX hardware.
Is not in HID so I can not find in Kconfig file.

Quote from wiki:
The HID standard was adopted primarily to enable innovation in PC input devices
and to simplify the process of installing such devices. Prior to the
introduction of the HID concept, devices usually conformed to strictly defined
protocols for mouse, keyboards and joysticks

I download source code of linux,
then unpack
and I tried search HyperX driver and info.

$ grep -ri hyperx
sound/usb/quirks.c:     DEVICE_FLG(0x0951, 0x16ad, /* Kingston HyperX */
drivers/input/joystick/xpad.c:  { 0x03f0, 0x038D, "HyperX Clutch", 0,
XTYPE_XBOX360 },                  /* wired */
drivers/input/joystick/xpad.c:  { 0x03f0, 0x048D, "HyperX Clutch", 0,
XTYPE_XBOX360 },                  /* wireless */
drivers/input/joystick/xpad.c:  { 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0,
XTYPE_XBOXONE },
drivers/input/joystick/xpad.c:  { 0x03f0, 0x07A0, "HyperX Clutch Gladiate RGB",
0, XTYPE_XBOXONE },
drivers/input/joystick/xpad.c:  { 0x03f0, 0x08B6, "HyperX Clutch Gladiate", 0,
XTYPE_XBOXONE },         /* v2 */
drivers/input/joystick/xpad.c:  { 0x03f0, 0x09B4, "HyperX Clutch Tanto", 0,
XTYPE_XBOXONE },
drivers/input/joystick/xpad.c:  XPAD_XBOX360_VENDOR(0x03f0),            /* HP
HyperX Xbox 360 controllers */
drivers/input/joystick/xpad.c:  XPAD_XBOXONE_VENDOR(0x03f0),            /* HP
HyperX Xbox One controllers */

I suspect that the first one is the headphone driver.
The second with joystick in path is driver for controller.

I can also try search in my system.

$ find /lib/modules/$(uname -r) -type f -name '*.ko' | grep -i "quirks\|xpad"
/lib/modules/5.15.0-91-generic/kernel/drivers/input/joystick/psxpad-spi.ko
/lib/modules/5.15.0-91-generic/kernel/drivers/input/joystick/xpad.ko

Conclusions:
- I can find the driver in the system
quirks driver not exist in my system because is added from 5.16 kernel.
I know this from 
https://github.com/torvalds/linux/blob/master/sound/usb/quirks.c
--> History link to the right  --> oldest patch --> 
--> below description 
--> I can expand the link "  6.9-rc1 ... v5.7-rc1 "
and I can see that the oldest kernel containing this file is 5.16
Such knowledge is very helpful.

Can you share any tips about drivers?
Maybe you know some interesting guides how to solve problems with drivers?
What linux distro do you recommend for testing the latest linux drivers?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2024-03-26 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 20:33 bugzilla-daemon [this message]
2024-03-26 21:45 ` [Bug 218646] Problem with search driver or this is guide how search driver bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-218646-208809@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.