HID: V2: UC-Logic driver rewrite and a little more

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

 



Hi everyone, Benjamin,

It took me a while (I can only afford a couple hours per week on this), but
I finally split my original patchset into finer commits. If this is too fine,
please feel free to squash them. Hope it makes more sense this way and is
easier to review.

Benjamin, I agree that just repeating switch statements to branch for
e.g. models can work better. However, I think it works well with simple
one-two level switch statements only. In this case just branching by e.g.
VID:PID pairs won't be enough.

The worst offenders are Huion tablets which *all* use the same VID:PID pair,
while they use two major initialization and report protocols, with various
quirks within. Those could only be distinguished using several different
methods. I would have to have extra flags for those anyway, and mixing them
with switch statements would be the worst of both worlds. So I decided to use
just one: have a description of tablet quirks and only one switch statement on
initialization/discovery.

I took a look at what you're doing with uhid and testing, and it looks good.
However, since for UC-Logic (Huion especially) reporting protocols are
discovered outside the HID protocol (by requesting various USB strings), there
would be no way for the driver to determine which protocol the uhid device
would use. For now I just fail initialization if the underlying device is
anything but a USB device.

I'll think about this a little more, though. Maybe I can fallback to choosing
one (most complex) protocol for uhid devices and test that, or maybe I can
pass the selection within the HID protocol somehow. Hmm... Simulating a USB
string request with get report requests perhaps for uhid devices? Or maybe I
can just limit myself to testing simpler, non-Huion devices only.

It's great news that hid-generic now deals with unbinding/rebinding smoothly!
I'm not adding entries to hid_have_special_driver anymore in my patches, and I
added three patches removing the existing UC-Logic/KYE/Waltop entries, after a
bit of testing.

Should I move the quirk setting to hid-kye.c/hid-waltop.c too?

Please write if you'd like me to change anything else.

Thank you!
Nick




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux