lkml.org 
[lkml]   [2007]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] hid: add two led codes to hid input mapping
From
Date
On Mon, 2007-04-02 at 09:06 -0400, Dmitry Torokhov wrote:
> It may be a HID-class device but it is definetly not an input device
> and it would be wrong to present it to userspace as a device having 2
> LEDs on it - it would be a lie. If we did that then some application
> might mistake the device for something else and decide to switch that
> LED off thus turning your KVM off. A random application should not be
> aware how a random vendor decided to interpret the specs.

Okay, I did a little more exploration of the total device (I was
focusing on the PC control of switching up until now.)

This HID interface has two aspects:

One is the PC control over switching. This is represented by a single
report, with 3 fields, each with a single on/off usage. It can switch
KVM only, audio only, or both. This is the one that overloads the HID
LED usages, and is (as you say) not properly an input device.

The other one appears to have something to do with the case where you've
switched only audio. It's a single input report with four fields that
map to the key usages volume up, volume down, mute (I think), and
eject.

So, I think the "right" thing to is to allow it to be driven as both a
hiddev and an evdev (which is what the HID_QUIRK_HIDDEV does for this
device.)

Then, the switch controls would be accessed only through hiddev, while
the key events, if they're ever actually generated, would still be
received by the evdev driver.

On a side note, I'm not sure why those input key events are there. The
basic idea of the device is that you can switch KVM control back and
forth, while keeping audio on a single computer (e.g., to listen to
music), and at first I thought those key events were to feed audio
controls through from the computer with KVM focus to the one with audio
focus, so that if you're working on either computer you can adjust the
volume, etc. However, the computer that does not have KVM focus will
never receive these events, since switching KVM focus effectively
disconnects the device completely from the computer.


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2007-04-02 15:37    [W:0.069 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site