Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-08 Thread Alan Stern
On Thu, 8 Feb 2007, Oliver Neukum wrote: > > Taken to its logical conclusion, your argument says that the inactivity > > delay shouldn't be set at the USB layer at all -- it should be set at the > > input layer and propagated up somehow. > > Indeed. Now we could again debate whether autosuspend b

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-08 Thread Oliver Neukum
> > We go to considerable lengths to present interfaces as devices. Each > > interface would be its own input device to user space. We should not > > make it important which logical devices are grouped together physically. > > Taken to its logical conclusion, your argument says that the inactivit

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-08 Thread Alan Stern
On Thu, 8 Feb 2007, Oliver Neukum wrote: > > 1) reduces to 2) with x = 0. So let's concentrate on 2). The "when idle" > > part is solved by adding the USB_DF_DEVICE_BUSY flag, leaving only the > > "delay = x" part. You want this delay to be per-interface, and you want > > it to be settable by

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-08 Thread Oliver Neukum
Am Donnerstag, 8. Februar 2007 17:00 schrieb Alan Stern: > First of all, note that 3) above isn't a problem. If a driver doesn't > have supports_autosuspend set, or if it calls usb_autopm_get_interface(), > then the device won't be autosuspended at all. So we can eliminate this > case; it's a

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-08 Thread Alan Stern
On Wed, 7 Feb 2007, Oliver Neukum wrote: > > Since we suspend entire devices, and not single interfaces, any value > > coming from userspace will have to refer to the entire device. So are you > > No, user space can set values for each interface. > > User space can know which value would be the

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-07 Thread Oliver Neukum
Am Mittwoch, 7. Februar 2007 22:44 schrieb Alan Stern: > On Wed, 7 Feb 2007, Oliver Neukum wrote: > > > Am Mittwoch, 7. Februar 2007 18:40 schrieb Alan Stern: > > > On Wed, 7 Feb 2007, Oliver Neukum wrote: > > > > > > So the answer would not be the largest delay, but the largest delay > > > > cur

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-07 Thread Alan Stern
On Wed, 7 Feb 2007, Oliver Neukum wrote: > Am Mittwoch, 7. Februar 2007 18:40 schrieb Alan Stern: > > On Wed, 7 Feb 2007, Oliver Neukum wrote: > > > > So the answer would not be the largest delay, but the largest delay > > > currently requested to be active. > > > > We haven't yet defined how a

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-07 Thread Oliver Neukum
Am Mittwoch, 7. Februar 2007 18:40 schrieb Alan Stern: > On Wed, 7 Feb 2007, Oliver Neukum wrote: > > So the answer would not be the largest delay, but the largest delay > > currently requested to be active. > > We haven't yet defined how a driver can request an interface delay to be > active or

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-07 Thread Alan Stern
On Wed, 7 Feb 2007, Oliver Neukum wrote: > > Okay, I'll do it. There will also be a per-device delay variable, whose > > value will be settable via sysfs. > > > > The question then becomes, with all those different delay values, what > > delay should the timer actually use? The simplest answe

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-07 Thread Oliver Neukum
Am Dienstag, 6. Februar 2007 18:39 schrieb Alan Stern: > On Tue, 6 Feb 2007, Oliver Neukum wrote: > > > > With this infrastructure in place, all you have to do is > > > > > > set_bit(USB_DF_DEVICE_BUSY, &hid_to_usb_dev(hid)->dflags); > > > > > > whenever an event occurs. No messing around wit

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-06 Thread Alan Stern
On Tue, 6 Feb 2007, Oliver Neukum wrote: > > With this infrastructure in place, all you have to do is > > > > set_bit(USB_DF_DEVICE_BUSY, &hid_to_usb_dev(hid)->dflags); > > > > whenever an event occurs. No messing around with extra timers. > > If you make USB_AUTOSUSPEND_DELAY a per interf

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-06 Thread Oliver Neukum
Am Dienstag, 6. Februar 2007 16:54 schrieb Alan Stern: > On Tue, 6 Feb 2007, Oliver Neukum wrote: > > > Hi, > > > > this fixes the issue with output in the hid driver. I can now get keyboards > > to sleep. It is still not perfect, but an important step. Comments? > > > > Regards > >

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-06 Thread Oliver Neukum
Am Dienstag, 6. Februar 2007 16:15 schrieb Jiri Kosina: > On Tue, 6 Feb 2007, Oliver Neukum wrote: > > > this fixes the issue with output in the hid driver. I can now get > > keyboards to sleep. It is still not perfect, but an important step. > > Comments? > > Hi Oliver, > > I am going to look

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-06 Thread Alan Stern
On Tue, 6 Feb 2007, Oliver Neukum wrote: > Hi, > > this fixes the issue with output in the hid driver. I can now get keyboards > to sleep. It is still not perfect, but an important step. Comments? > > Regards > Oliver > > PS: against vanilla 2.6.20 I'd really prefer to see

Re: [linux-usb-devel] hid powersave by autosuspend #2

2007-02-06 Thread Jiri Kosina
On Tue, 6 Feb 2007, Oliver Neukum wrote: > this fixes the issue with output in the hid driver. I can now get > keyboards to sleep. It is still not perfect, but an important step. > Comments? Hi Oliver, I am going to look at it more thoroughly soon, just a quick note - when I plug in the USB k

[linux-usb-devel] hid powersave by autosuspend #2

2007-02-06 Thread Oliver Neukum
Hi, this fixes the issue with output in the hid driver. I can now get keyboards to sleep. It is still not perfect, but an important step. Comments? Regards Oliver PS: against vanilla 2.6.20 --- linux-2.6.20/include/linux/hid.h2007-02-06 14:14:56.0 +0100