LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dan Engel <dan@sourceharvest.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hid: add two led codes to hid input mapping
Date: Mon, 02 Apr 2007 09:33:48 -0400	[thread overview]
Message-ID: <1175520828.12355.84.camel@monica.engel.home> (raw)
In-Reply-To: <d120d5000704020606y620df4bfu1cf3728070f02a38@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]

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.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-04-02 13:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-01  2:56 Dan Engel
2007-04-01  9:01 ` Jiri Kosina
2007-04-01 14:57   ` Dmitry Torokhov
2007-04-01 17:43     ` Jiri Kosina
2007-04-02  3:28       ` Dan Engel
2007-04-02  4:04         ` Dmitry Torokhov
2007-04-02 10:14           ` Dan Engel
2007-04-02 13:06             ` Dmitry Torokhov
2007-04-02 13:33               ` Dan Engel [this message]
2007-04-02 13:46                 ` Dmitry Torokhov

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=1175520828.12355.84.camel@monica.engel.home \
    --to=dan@sourceharvest.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] hid: add two led codes to hid input mapping' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).