1. 25 Mar, 2009 4 commits
    • Jiri Kosina's avatar
      HID: hid_reset_resume() needs to be defined only when CONFIG_PM is set · ae2f0074
      Jiri Kosina authored
      There is no point of having hid_reset_resume() when CONFIG_PM is
      not set, and even the corresponding .reset_resume pointer in hid_driver
      struct is properly ifdefed.
      
      Move the definition into the ifdef CONFIG_PM part of the source to avoid
      
      drivers/hid/usbhid/hid-core.c:1337: warning: 'hid_reset_resume' defined but not used
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      ae2f0074
    • Oliver Neukum's avatar
      HID: fix USB HID devices after STD with autosuspend · 378a0ede
      Oliver Neukum authored
      This patch fixes a bug caused by reset_resume not changing the internal
      status flags for a device that is resumed via reset_resume. To do so the
      reset handlers, which correctly assume that a device is awake, can no longer
      do all the work of reset_resume handling.
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
      Tested-by: default avatarLaurent Riffard <laurent.riffard@free.fr>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      378a0ede
    • Jiri Kosina's avatar
      HID: do not try to compile PM code with CONFIG_PM unset · 0f6f1407
      Jiri Kosina authored
      Fixes this build breakage in case when CONFIG_PM is not set
      
      drivers/hid/usbhid/hid-core.c: In function 'hid_suspend':
      drivers/hid/usbhid/hid-core.c:1220: error: 'struct usb_device' has no member named 'auto_pm'
      drivers/hid/usbhid/hid-core.c:1245: error: 'struct usb_device' has no member named 'auto_pm'
      drivers/hid/usbhid/hid-core.c:1258: error: 'struct usb_device' has no member named 'auto_pm'
      
      by throwing both the hid_suspend() and hid_resume() away completely
      in such case, as they won't be used anyway.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      0f6f1407
    • Oliver Neukum's avatar
      HID: autosuspend support for USB HID · 0361a28d
      Oliver Neukum authored
      This uses the USB busy mechanism for aggessive autosuspend of USB
      HID devices. It autosuspends all opened devices supporting remote wakeup
      after a timeout unless
      
      - output is being done to the device
      - a key is being held down (remote wakeup isn't triggered upon key release)
      - LED(s) are lit
      - hiddev is opened
      
      As in the current driver closed devices will be autosuspended even if they
      don't support remote wakeup.
      
      The patch is quite large because output to devices is done in hard interrupt
      context meaning a lot a queuing and locking had to be touched. The LED stuff
      has been solved by means of a simple counter. Additions to the generic HID code
      could be avoided. In addition it now covers hidraw. It contains an embryonic
      version of an API to let the generic HID code tell the lower levels which
      capabilities with respect to power management are needed.
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      0361a28d
  2. 23 Mar, 2009 11 commits
  3. 22 Mar, 2009 6 commits
  4. 21 Mar, 2009 2 commits
  5. 20 Mar, 2009 5 commits
  6. 19 Mar, 2009 12 commits