linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Hn Chen <hn.chen@weidahitech.com>
Cc: "benjamin.tissoires@redhat.com" <benjamin.tissoires@redhat.com>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: RE: [PATCH] HID: i2c-hid: add retry in set power for fixing weida's issue
Date: Mon, 7 Nov 2016 12:59:04 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.1611071255020.29400@cbobk.fhfr.pm> (raw)
In-Reply-To: <22498D53301C4D4A8FFA8F02C7C3C7C06DDE5462@mail02.WHT.local>

On Mon, 7 Nov 2016, Hn Chen wrote:

> Since I don't have any experience to add a quirk, may I have a sample 
> code for reference ? It should be a HID quirk, right ?

Generic HID quirk might be over-stretching it, as i2c_hid_set_power() is 
being called from various places, so generalizing this requirement out 
into HID core wouldn't be clean either.

You can special-case this behavior by looking at wVendorID / wProductID / 
wVersionID from the report descriptor, can't you?

There is not a quirk mechanism for i2c-hid yet. If things start exploding 
like in usb-hid space, we'd definitely want to have a generic quirk 
mechanism one day. But if this has been a single case over the existence 
of the hid-over-i2c, I wouldn't bother (yet).

-- 
Jiri Kosina
SUSE Labs


  reply	other threads:[~2016-11-07 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 10:38 [PATCH] HID: i2c-hid: add retry in set power for fixing weida's issue hn.chen
2016-11-07 10:48 ` Jiri Kosina
2016-11-07 11:02   ` Hn Chen
2016-11-07 11:59     ` Jiri Kosina [this message]
2016-11-07 13:35       ` Hn Chen
2016-11-07 10:52 ` Hn Chen

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=alpine.LNX.2.00.1611071255020.29400@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hn.chen@weidahitech.com \
    --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;
as well as URLs for NNTP newsgroup(s).