linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * Re: suspend
           [not found]   ` <e79639220804030153q46fa82c7jb79bedbe88b30df7@mail.gmail.com>
           [not found]     ` <e79639220804030153q46fa82c7jb79bedbe88b30df7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
    @ 2008-04-03 10:58     ` Oliver Neukum
      2008-04-03 14:14       ` suspend Stefan Schweizer
      1 sibling, 1 reply; 16+ messages in thread
    From: Oliver Neukum @ 2008-04-03 10:58 UTC (permalink / raw)
      To: Stefan Schweizer; +Cc: linux-usb, linux-input
    
    Am Donnerstag, 3. April 2008 10:53:53 schrieb Stefan Schweizer:
    > >  On second thought, this should be fixed by usb persist if the appletouch
    > >  driver supported reset_resume. Would you be willing to test a kernel patch
    > >  that implements reset_resume in the appletouch driver?
    > 
    > Sure, I would love to have this fixed :-)
    
    Hi,
    
    here I have another test request. This patch on top of the earlier patch
    implements autosuspend for the appletouch driver. Can you try it? You
    also need to activate it as described in Documentation/usb/power-management.txt
    
    	Regards
    		Oliver
    
    ---
    
    --- linux-2.6.25-rc7-work/drivers/input/mouse/appletouch.c.alt	2008-04-03 12:46:06.000000000 +0200
    +++ linux-2.6.25-rc7-work/drivers/input/mouse/appletouch.c	2008-04-03 12:46:24.000000000 +0200
    @@ -572,16 +572,26 @@ exit:
     static int atp_open(struct input_dev *input)
     {
     	struct atp *dev = input_get_drvdata(input);
    +	int rv;
     
     	mutex_lock(&dev->lock);
    -	if (usb_submit_urb(dev->urb, GFP_KERNEL)) {
    -		mutex_unlock(&dev->lock);
    -		return -EIO;
    -	}
    +
    +	rv = usb_autopm_get_interface(dev->intf);
    +	if ( rv < 0)
    +		goto err_out;
    +
    +	rv = usb_submit_urb(dev->urb, GFP_KERNEL);
    +	if (rv < 0)
    +		goto err_put;
     
     	dev->open = 1;
    +	dev->intf->needs_remote_wakeup = 1;
    +
    +err_put:
    +	usb_autopm_put_interface(dev->intf);
    +err_out:
     	mutex_unlock(&dev->lock);
    -	return 0;
    +	return rv;
     }
     
     static void atp_close(struct input_dev *input)
    @@ -592,6 +602,7 @@ static void atp_close(struct input_dev *
     	usb_kill_urb(dev->urb);
     	cancel_work_sync(&dev->work);
     	dev->open = 0;
    +	dev->intf->needs_remote_wakeup = 0;
     	mutex_unlock(&dev->lock);
     }
     
    
    
    ^ permalink raw reply	[flat|nested] 16+ messages in thread

  • end of thread, other threads:[~2008-04-05 14:13 UTC | newest]
    
    Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <dd18b0c30804012331oc548416k113e492d7dc9c189@mail.gmail.com>
         [not found] ` <200804031029.26635.oliver@neukum.org>
         [not found]   ` <e79639220804030153q46fa82c7jb79bedbe88b30df7@mail.gmail.com>
         [not found]     ` <e79639220804030153q46fa82c7jb79bedbe88b30df7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
    2008-04-03 10:31       ` suspend Oliver Neukum
         [not found]         ` <200804031231.19193.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
    2008-04-03 15:44           ` suspend Stefan Schweizer
    2008-04-03 20:42             ` suspend Oliver Neukum
         [not found]               ` <200804032242.36493.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
    2008-04-03 21:41                 ` suspend Alan Stern
    2008-04-03 22:06                   ` suspend Stefan Schweizer
    2008-04-04  8:59                     ` suspend Oliver Neukum
    2008-04-04  9:20                       ` suspend Stefan Schweizer
         [not found]                         ` <e79639220804040220g560e94b4l418724ff1653780d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
    2008-04-04 11:36                           ` suspend Oliver Neukum
    2008-04-04 22:40                             ` suspend Stefan Schweizer
    2008-04-05  8:00                               ` suspend Oliver Neukum
    2008-04-05  9:15                                 ` suspend Stefan Schweizer
         [not found]                                   ` <e79639220804050215j42829de7iab99b51e85683a53-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
    2008-04-05  9:12                                     ` suspend Oliver Neukum
    2008-04-05 14:13                                 ` suspend Alan Stern
    2008-04-03 10:58     ` suspend Oliver Neukum
    2008-04-03 14:14       ` suspend Stefan Schweizer
    2008-04-03 21:07         ` suspend Oliver Neukum
    

    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).