1. 26 3月, 2009 4 次提交
    • J
      HID: hid_reset_resume() needs to be defined only when CONFIG_PM is set · ae2f0074
      Jiri Kosina 提交于
      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: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ae2f0074
    • O
      HID: fix USB HID devices after STD with autosuspend · 378a0ede
      Oliver Neukum 提交于
      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: NOliver Neukum <oneukum@suse.de>
      Tested-by: NLaurent Riffard <laurent.riffard@free.fr>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      378a0ede
    • J
      HID: do not try to compile PM code with CONFIG_PM unset · 0f6f1407
      Jiri Kosina 提交于
      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: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      0f6f1407
    • O
      HID: autosuspend support for USB HID · 0361a28d
      Oliver Neukum 提交于
      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: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      0361a28d
  2. 24 3月, 2009 6 次提交
  3. 23 3月, 2009 11 次提交
  4. 22 3月, 2009 2 次提交
  5. 21 3月, 2009 2 次提交
  6. 20 3月, 2009 11 次提交
  7. 19 3月, 2009 4 次提交