Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-30 Thread Alan Stern
On Mon, 30 Oct 2006, Oliver Neukum wrote: > Am Montag, 30. Oktober 2006 16:32 schrieb Alan Stern: > > in its release() routine.  The driver doesn't need to maintain its own > > counter; that purpose is served by intf->pm_usage_cnt. > > It doesn't need to maintain a counter for this purpose. My >

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-30 Thread Oliver Neukum
Am Montag, 30. Oktober 2006 16:32 schrieb Alan Stern: > in its release() routine.  The driver doesn't need to maintain its own > counter; that purpose is served by intf->pm_usage_cnt. It doesn't need to maintain a counter for this purpose. My point is that the driver is likely to need to maintain

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-30 Thread Alan Stern
On Mon, 30 Oct 2006, Oliver Neukum wrote: > > Take a look at usb-skeleton.c to see how they can be used. They are well > > suited to the drivers which present a simple character-device interface to > > userspace. > > It seems to me that those drivers use: > > if (desc->counter++) { > ... > } >

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Oliver Neukum
Am Montag, 30. Oktober 2006 03:21 schrieb Alan Stern: > On Sun, 29 Oct 2006, Oliver Neukum wrote: > > > Am Sonntag, 29. Oktober 2006 16:21 schrieben Sie: > > > If you're only going to disable autopm on open and enable on close then > > > you could have used usb_autopm_get_interface() and > > > >

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Alan Stern
On Sun, 29 Oct 2006, Oliver Neukum wrote: > Am Sonntag, 29. Oktober 2006 16:21 schrieben Sie: > > If you're only going to disable autopm on open and enable on close then > > you could have used usb_autopm_get_interface() and > > Upon further thought, I fail to see the need for these interfaces. >

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Alan Stern
On Sun, 29 Oct 2006, Oliver Neukum wrote: > Hi, > > this patch makes hid devices do simple open/close powersave. > This is helpful only in a minority of cases, but it works. Powersave > with timeouts will need this as a foundation. > Alan, I've made use of your suggestion and put the macros into

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Oliver Neukum
Am Sonntag, 29. Oktober 2006 16:21 schrieben Sie: > If you're only going to disable autopm on open and enable on close then > you could have used usb_autopm_get_interface() and Upon further thought, I fail to see the need for these interfaces. They do something that is simpler done within a driver

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Alan Stern
On Sun, 29 Oct 2006, Oliver Neukum wrote: > > The usb_autpm_enable/disable things should go in a separate patch. Since > > you find them useful, I'll add them into the usb_autopm_set_interface > > patch and submit that on its own. It might be a good idea to make them > > static inlines rather

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Oliver Neukum
Am Sonntag, 29. Oktober 2006 16:21 schrieb Alan Stern: > P.S.: Did you ever figure out why ksuspend_usbd was using 97% of your CPU > time? Quite a coincidence. Yes, I've figured it out. My fault. Regards Oliver

Re: [linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Oliver Neukum
Am Sonntag, 29. Oktober 2006 16:21 schrieb Alan Stern: > On Sun, 29 Oct 2006, Oliver Neukum wrote: > > > Hi, > > > > this patch makes hid devices do simple open/close powersave. > > This is helpful only in a minority of cases, but it works. Powersave > > with timeouts will need this as a foundati

[linux-usb-devel] basic non timeout based powersave for hid

2006-10-29 Thread Oliver Neukum
Hi, this patch makes hid devices do simple open/close powersave. This is helpful only in a minority of cases, but it works. Powersave with timeouts will need this as a foundation. Alan, I've made use of your suggestion and put the macros into usb.h so they can be commonly used. Regards