How to match hid device to our hid driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there anyone know how to match hid device to hid driver which is
written by ourself.

the problem is that my hid device always match with default hid driver
generic-usb.

I don't know how to match my hid device with my hid driver.

And I have set the same vendor ID and product ID with hid device but
the device still don't match with my hid driver.

I don't know if there is a priority issue that generic-usb hid driver
is match first.

So my hid driver module will not be matched.

Please see the following:

static bool hid_match_one_id(struct hid_device *hdev,
                const struct hid_device_id *id)
{
        return id->bus == hdev->bus &&
                (id->vendor == HID_ANY_ID || id->vendor == hdev->vendor) &&
                (id->product == HID_ANY_ID || id->product == hdev->product);

}

I confused that in the source code that every hid device is matched
with generic-usb but when my hid driver is also matched. Linux kernel
only matched a device with one driver.

so my problem is that when the two are both matched, how to let the
device

match to our specific driver and not matched to default generic-usb
driver?

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux