* usbhid driver: replacing resume or using a post resume function
@ 2010-01-26 16:50 Rick L. Vinyard, Jr.
2010-01-26 23:21 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Rick L. Vinyard, Jr. @ 2010-01-26 16:50 UTC (permalink / raw)
To: Linux, Linux USB
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?
---
Rick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usbhid driver: replacing resume or using a post resume function
2010-01-26 16:50 usbhid driver: replacing resume or using a post resume function Rick L. Vinyard, Jr.
@ 2010-01-26 23:21 ` Jiri Kosina
2010-01-27 14:57 ` Rick L. Vinyard, Jr.
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2010-01-26 23:21 UTC (permalink / raw)
To: Rick L. Vinyard, Jr.; +Cc: Linux, Linux USB
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.
If you submit this patch together (but separately) with your Logitech G13
driver, there shouldn't be any obstacle merging it.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usbhid driver: replacing resume or using a post resume function
2010-01-26 23:21 ` Jiri Kosina
@ 2010-01-27 14:57 ` Rick L. Vinyard, Jr.
2010-01-27 15:35 ` Oliver Neukum
0 siblings, 1 reply; 5+ messages in thread
From: Rick L. Vinyard, Jr. @ 2010-01-27 14:57 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Linux, Linux USB
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usbhid driver: replacing resume or using a post resume function
2010-01-27 14:57 ` Rick L. Vinyard, Jr.
@ 2010-01-27 15:35 ` Oliver Neukum
2010-01-27 15:41 ` Rick L. Vinyard, Jr.
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2010-01-27 15:35 UTC (permalink / raw)
To: Rick L. Vinyard, Jr.; +Cc: Jiri Kosina, Linux, Linux USB
Am Mittwoch, 27. Januar 2010 15:57:48 schrieb Rick L. Vinyard, Jr.:
> 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 do do this please document that you may use only GFP_NOIO
and GFP_ATOMIC in that context.
Regards
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usbhid driver: replacing resume or using a post resume function
2010-01-27 15:35 ` Oliver Neukum
@ 2010-01-27 15:41 ` Rick L. Vinyard, Jr.
0 siblings, 0 replies; 5+ messages in thread
From: Rick L. Vinyard, Jr. @ 2010-01-27 15:41 UTC (permalink / raw)
To: Oliver Neukum; +Cc: Jiri Kosina, Linux, Linux USB
Oliver Neukum wrote:
> Am Mittwoch, 27. Januar 2010 15:57:48 schrieb Rick L. Vinyard, Jr.:
>> 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 do do this please document that you may use only GFP_NOIO
> and GFP_ATOMIC in that context.
>
> Regards
> Oliver
>
Will do.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-27 15:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-26 16:50 usbhid driver: replacing resume or using a post resume function Rick L. Vinyard, Jr.
2010-01-26 23:21 ` Jiri Kosina
2010-01-27 14:57 ` Rick L. Vinyard, Jr.
2010-01-27 15:35 ` Oliver Neukum
2010-01-27 15:41 ` Rick L. Vinyard, Jr.
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®