From: "Henrik Rydberg" <rydberg@euromail.se>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: Jiri Kosina <jkosina@suse.cz>, linux-input@vger.kernel.org
Subject: Re: [PATCH 1/3] HID: Add HID_CLAIMED_OTHER for non-generic drivers
Date: Mon, 16 Jul 2012 21:35:02 +0200 [thread overview]
Message-ID: <20120716193502.GA617@polaris.bitmath.org> (raw)
In-Reply-To: <CANq1E4Q2AoA7JP9rL39gEkyMCy+-a3vcysn_kWOdB8Z4okAf+A@mail.gmail.com>
On Mon, Jul 16, 2012 at 09:08:47PM +0200, David Herrmann wrote:
> Hi Henrik
>
> On Mon, Jul 16, 2012 at 8:45 PM, Henrik Rydberg <rydberg@euromail.se> wrote:
> > Hi David,
> >
> > Perhaps one should make hid-core warn instead of bailing out instead?
> > Something may need to be done to make sure everything works smoothly,
> > but really, why would hid-core mind keeping a device on the bus with a
> > non-standard io driver?
>
> No, I think bailing out is the correct thing to do. If we emit a
> warning but leave the device on the bus, the device will have no
> driver loaded and idling in background. Hence, dropping the device is
> the best solution for 99% of the devices.
If the driver that picks up the device (wiimote for instance) decides
it does not want to use any of the io drivers (HID_CONNECT*) by
calling hid_hw_start(hdev, 0), in what way is that different from
calling it with, say, hid_hw_start(hdev, HID_CONNECT_TO_OTHER)? (The
latter would be an equivalent (but cleaner) way of setting your
HID_CLAIMED_OTHER flag).
To catch possible mistakes, one could check for the presence of
raw_event() instead, for instance.
What I am getting at is that we really do not need to create any more
backdoors into the hid core - on the contrary, we can most likely
easily remove some of them instead.
> However, devices that explicitly do not require the generic drivers
> (like picolcd and wiimote) should be able to stay on the bus. We could
> of course put them out of the HID subsystem as they have very little
> in common with the other HID drivers, but that wouldn't make the
> situation any better. It would mean writing transport-level drivers
> for picolcd and wiimote which are exactly the same as USBHID and HIDP.
> Hence, I think allowing non-standard drivers on the BUS is ok as long
> as they explicitly request it.
Yes, the question is only what that request looks like. The simpler
the better, don't you agree?
Thanks,
Henrik
next prev parent reply other threads:[~2012-07-16 19:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 18:45 [PATCH 1/3] HID: Add HID_CLAIMED_OTHER for non-generic drivers Henrik Rydberg
2012-07-16 19:08 ` David Herrmann
2012-07-16 19:35 ` Henrik Rydberg [this message]
2012-07-16 19:47 ` David Herrmann
2012-07-16 20:59 ` Henrik Rydberg
2012-07-16 21:06 ` David Herrmann
2012-07-16 21:14 ` Henrik Rydberg
-- strict thread matches above, loose matches on Subject: below --
2012-07-15 18:21 [PATCH 0/3] HID: Add HID_CLAIMED_OTHER device flag David Herrmann
2012-07-15 18:21 ` [PATCH 1/3] HID: Add HID_CLAIMED_OTHER for non-generic drivers David Herrmann
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=20120716193502.GA617@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=dh.herrmann@googlemail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox