mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rick L. Vinyard, Jr." <rvinyard@cs.nmsu.edu>
To: "Jiri Kosina" <jkosina@suse.cz>
Cc: "Linux" <linux-kernel@vger.kernel.org>,
	"Linux USB" <linux-usb@vger.kernel.org>
Subject: Re: usbhid driver: replacing resume or using a post resume function
Date: Wed, 27 Jan 2010 07:57:48 -0700	[thread overview]
Message-ID: <fd35fcc83b1a4ae5dd4daba3cf596c5d.squirrel@intranet.cs.nmsu.edu> (raw)
In-Reply-To: <alpine.LRH.2.00.1001270018570.15694@twin.jikos.cz>

Jiri Kosina wrote:
> On Tue, 26 Jan 2010, Rick L. Vinyard, Jr. wrote:
>
>> I was looking for an example of a hid driver that needs to customize
>> resume or provides a post resume function, but couldn't find one.
>>
>> I would like to implement some post resume code. In particular, the g13
>> on
>> resume loses the backlight color, LCD image and LED state. On resume, it
>> needs feature reports sent to re-establish these settings.
>>
>> However, I couldn't find a way to either provide a post resume function
>> or
>> replace resume with a call to hid_resume() followed by the feature
>> reports.
>>
>> Any suggestions?
>
> Current HID / USBHID code doesn't allow for that. But implementing that
> should be pretty straightforward, you can define callbacks in the
> hid_device struct and then redirect to them instead of the default ones,
> when they are initialized.

Sounds good. I was actually thinking of doing a post_reset() and
post_resume().

I think the most common case would be for something like the G13 to
re-establish settings, which from the few devices I'm familiar with would
need to restart the hid subsystem first and then re-establish through
feature reports, et. al. after the hid_resume().

Also, that means that usbhid's hid_resume() doesn't need to be exposed in
the API, or even need to be usb specific.

>
> If you submit this patch together (but separately) with your Logitech G13
> driver, there shouldn't be any obstacle merging it.
>

Sounds good.

Thanks,

Rick


  reply	other threads:[~2010-01-27 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 16:50 Rick L. Vinyard, Jr.
2010-01-26 23:21 ` Jiri Kosina
2010-01-27 14:57   ` Rick L. Vinyard, Jr. [this message]
2010-01-27 15:35     ` Oliver Neukum
2010-01-27 15:41       ` Rick L. Vinyard, Jr.

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=fd35fcc83b1a4ae5dd4daba3cf596c5d.squirrel@intranet.cs.nmsu.edu \
    --to=rvinyard@cs.nmsu.edu \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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

all inboxes | Powered by JetHome®