From: Thomas Reitmayr <treitmayr@devbase.at>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [rft]suspend/resume support for yealink
Date: Wed, 09 Jul 2008 22:33:52 +0200 [thread overview]
Message-ID: <1215635632.6742.5.camel@localhost> (raw)
In-Reply-To: <1215109674.6680.17.camel@localhost>
Hi Oliver,
I just wanted to make sure my little patch on top of yours did not get
missed in all the other stuff going on. Does it look ok to you (and
possibly others) to be added?
Regards,
-Thomas
Am Donnerstag, den 03.07.2008, 20:27 +0200 schrieb Thomas Reitmayr:
> Hi Oliver,
> your patch did improve things, however I had to add the submission of
> the control URB to get the update/scan cycle going (same as in
> usb_resume). As yealink_set_ringtone uses synchronous USB submissions it
> won't invoke the callback function. Also apart from restoring the
> ringtone, I forced an update of the remaining device data (display,
> LED, ...). Otherwise if during suspend the device is unplugged and
> plugged in again, the driver does not know about the changes on the
> display (for example) and the driver's data and the data stored in the
> device are out of sync.
> My test went all well with these additions.
>
> The patch below builds on your latest patch.
> Regards,
> -Thomas
>
> Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
>
> ---
>
> --- linux-2.6.26-rc8/drivers/input/misc/yealink.old.c 2008-07-03 20:10:36.000000000 +0200
> +++ linux-2.6.26-rc8/drivers/input/misc/yealink.c 2008-07-03 20:10:26.000000000 +0200
> @@ -903,10 +903,18 @@ static int usb_reset_resume(struct usb_i
> {
> struct yealink_dev *yld = usb_get_intfdata(intf);
> int rv = 0;
> + int i;
>
> down_read(&sysfs_rwsema);
> if (!yld->open)
> goto skip_io;
> +
> + /* force updates to device */
> + for (i = 0; i<sizeof(yld->master); i++)
> + yld->copy.b[i] = ~yld->master.b[i];
> + yld->key_code = -1; /* no keys pressed */
> +
> + /* restore the ringtone */
> if (yld->old_ringtone)
> rv = yealink_set_ringtone(yld,
> yld->old_ringtone,
> @@ -916,6 +924,10 @@ static int usb_reset_resume(struct usb_i
> default_ringtone,
> sizeof(default_ringtone));
>
> + /* restart updates and key scan */
> + if (rv == 0)
> + rv = usb_submit_urb(yld->urb_ctl, GFP_NOIO);
> +
> skip_io:
> up_read(&sysfs_rwsema);
>
> --
>
>
>
> Am Mittwoch, den 02.07.2008, 16:26 +0200 schrieb Oliver Neukum:
> > Am Montag 30 Juni 2008 23:47:08 schrieb Thomas Reitmayr:
> > > * Suspend to RAM:
> > > The device suspends properly, I hear the audio subsystem turning off
> > > while the display keeps its current state.
> > > Apparently the USB root hub gets reset during suspend/resume according
> > > to the kernel log. Then after resume the input events are generated
> >
> > This patch may help.
> >
> > Regards
> > Oliver
> >
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2008-07-09 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 14:08 [rft]suspend/resume support for yealink Oliver Neukum
2008-06-30 21:39 ` Alfred E. Heggestad
[not found] ` <200806301608.03788.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-06-30 21:47 ` Thomas Reitmayr
2008-07-01 6:04 ` Oliver Neukum
2008-07-02 14:26 ` Oliver Neukum
[not found] ` <200807021626.50883.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-07-03 18:27 ` Thomas Reitmayr
2008-07-09 20:33 ` Thomas Reitmayr [this message]
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=1215635632.6742.5.camel@localhost \
--to=treitmayr@devbase.at \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.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).