1. 19 4月, 2010 1 次提交
    • B
      HID: add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE · b5e5a37e
      Bastien Nocera 提交于
      Add two quirks to make it possible for usbhid module options to
      override whether a device is ignored (HID_QUIRK_NO_IGNORE) and
      whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE).
      
      Passing HID_QUIRK_NO_IGNORE for your device means that it will
      not be ignored by the HID layer, even if present in a blacklist.
      
      HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that
      device, making it accessible from user-space.
      
      Tested with an Apple IR Receiver, switching it from using appleir
      to using lirc's macmini driver.
      Signed-off-by: NBastien Nocera <hadess@hadess.net>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      b5e5a37e
  2. 03 4月, 2010 1 次提交
  3. 17 2月, 2010 1 次提交
  4. 12 2月, 2010 1 次提交
  5. 03 2月, 2010 2 次提交
  6. 12 1月, 2010 1 次提交
    • M
      HID: make USB device id constant · d67dec5b
      Márton Németh 提交于
      The id_table field of the struct usb_device_id is constant in <linux/usb.h>
      so it is worth to make the initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NMárton Németh <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d67dec5b
  7. 12 12月, 2009 1 次提交
  8. 05 11月, 2009 1 次提交
    • J
      HID: fixup quirk for NCR devices · 5b915d9e
      Jiri Kosina 提交于
      NCR devices are terminally broken by design -- they claim themselves to contain
      proper input applications in their HID report descriptor, but behave very badly
      if treated in standard way.
      
      According to NCR developers, the devices get confused when queried for reports
      in a standard way, rendering them unusable.
      
      NCR is shipping application called "RPSL" that can be used to drive these
      devices through hiddev, under the assumption that in-kernel driver doesn't
      perform initial report query.
      If it does, neither in-kernel nor hiddev-based driver can operate with these
      devices any more.
      
      Introduce a quirk that skips the report query for all NCR devices. The previous
      NOGET quirk was wrong and had been introduced because I misunderstood the nature
      of brokenness of these devices.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5b915d9e
  9. 14 10月, 2009 2 次提交
  10. 17 9月, 2009 1 次提交
  11. 18 8月, 2009 1 次提交
  12. 23 7月, 2009 1 次提交
  13. 13 7月, 2009 1 次提交
  14. 12 6月, 2009 1 次提交
    • J
      HID: use debugfs for report dumping descriptor · a635f9dd
      Jiri Kosina 提交于
      It is a little bit inconvenient for people who have some non-standard
      HID hardware (usually violating the HID specification) to have to
      recompile kernel with CONFIG_HID_DEBUG to be able to see kernel's perspective
      of the HID report descriptor and observe the parsed events. Plus the messages
      are then mixed up inconveniently with the rest of the dmesg stuff.
      
      This patch implements /sys/kernel/debug/hid/<device>/rdesc file, which
      represents the kernel's view of report descriptor (both the raw report
      descriptor data and parsed contents).
      
      With all the device-specific debug data being available through debugfs, there
      is no need for keeping CONFIG_HID_DEBUG, as the 'debug' parameter to the
      hid module will now only output only driver-specific debugging options, which has
      absolutely minimal memory footprint, just a few error messages and one global
      flag (hid_debug).
      
      We use the current set of output formatting functions. The ones that need to be
      used both for one-shot rdesc seq_file and also for continuous flow of data
      (individual reports, as being sent by the device) distinguish according to the
      passed seq_file parameter, and if it is NULL, it still output to kernel ringbuffer,
      otherwise the corresponding seq_file is used for output.
      
      The format of the output is preserved.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a635f9dd
  15. 04 6月, 2009 1 次提交
  16. 11 5月, 2009 1 次提交
  17. 29 4月, 2009 1 次提交
  18. 30 3月, 2009 1 次提交
    • J
      HID: bring back possibility to specify vid/pid ignore on module load · 6f4303fb
      Jiri Kosina 提交于
      When hid quirks were converted to specialized driver, the HID_QUIRK_IGNORE
      has been moved completely, as the hid_ignore_list[] has been moved into the
      generic code.
      
      However userspace already got used to the possibility that modprobing
      usbhid with
      
      	'quirks=vid:pid:0x4'
      
      makes the device ignored by usbhid driver. So keep this quirk flag in place
      for backwards compatibility.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6f4303fb
  19. 26 3月, 2009 5 次提交
  20. 08 1月, 2009 1 次提交
    • A
      USB: change interface to usb_lock_device_for_reset() · 011b15df
      Alan Stern 提交于
      This patch (as1161) changes the interface to
      usb_lock_device_for_reset().  The existing interface is apparently not
      very clear, judging from the fact that several of its callers don't
      use it correctly.  The new interface always returns 0 for success and
      it always requires the caller to unlock the device afterward.
      
      The new routine will not return immediately if it is called while the
      driver's probe method is running.  Instead it will wait until the
      probe is over and the device has been unlocked.  This shouldn't cause
      any problems; I don't know of any cases where drivers call
      usb_lock_device_for_reset() during probe.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      011b15df
  21. 04 1月, 2009 4 次提交
  22. 23 11月, 2008 1 次提交
  23. 14 11月, 2008 1 次提交
  24. 13 11月, 2008 1 次提交
    • J
      HID: fix start/stop cycle in usbhid driver · e3e14de5
      Jiri Slaby 提交于
      `stop' left out usbhid->urb* pointers and so the next `start' thought
      it needs to allocate nothing and used the memory pointers previously
      pointed to. This led to memory corruption and device malfunction.
      
      Also don't forget to clear disconnect flag on start which was left set
      by the previous `stop'.
      
      This fixes
      
      	echo DEVICE > /sys/bus/hid/drivers/DRIVER/unbind
      	echo DEVICE > /sys/bus/hid/drivers/DRIVER/bind
      
      failures.
      Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      e3e14de5
  25. 27 10月, 2008 2 次提交
  26. 22 10月, 2008 1 次提交
  27. 18 10月, 2008 1 次提交
  28. 15 10月, 2008 3 次提交