1. 15 10月, 2008 1 次提交
    • J
      HID: make a bus from hid code · 85cdaf52
      Jiri Slaby 提交于
      Make a bus from hid core. This is the first step for converting all the
      quirks and separate almost-drivers into real drivers attached to this bus.
      
      It's implemented to change behaviour in very tiny manner, so that no driver
      needs to be changed this time.
      
      Also add generic drivers for both usb and bt into usbhid or hidp
      respectively which will bind all non-blacklisted device. Those blacklisted
      will be either grabbed by special drivers or by nobody if they are broken at
      the very rude base.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      85cdaf52
  2. 23 7月, 2008 1 次提交
  3. 29 4月, 2008 1 次提交
  4. 22 4月, 2008 4 次提交
    • A
      HID: make hid_input_field and usbhid_modify_dquirk static · abdff0f7
      Adrian Bunk 提交于
      This patch makes the following needlessly global functions static:
      - hid-core.c:hid_input_field()
      - usbhid/hid-quirks.c:usbhid_modify_dquirk()
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      abdff0f7
    • J
      HID: pass numbered reports properly to hidraw · b54ec3c1
      Jiri Kosina 提交于
      The numbered reports need to be passed properly to hidraw (i.e. with the first
      data field indicating the report number), otherwise userspace has no idea
      about the identification of the report.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      b54ec3c1
    • J
      HID: fix sparse warnings · 282bfd4c
      Jiri Slaby 提交于
      Fix these sparse warnings:
      .../hid/hid-core.c:100:15: warning: incorrect type in assignment (different signedness)
      .../hid/hid-core.c:100:15:    expected signed int [usertype] *value
      .../hid/hid-core.c:100:15:    got unsigned int *<noident>
              by unsigned -> s32
      
      .../hid/hid-input-quirks.c:336:10: warning: Using plain integer as NULL pointer
              by 0 -> NULL
      
      .../hid/usbhid/hid-core.c:786:46: warning: incorrect type in argument 3 (different signedness)
      .../hid/usbhid/hid-core.c:786:46:    expected int *max
      .../hid/usbhid/hid-core.c:786:46:    got unsigned int *<noident>
      .../hid/usbhid/hid-core.c:787:47: warning: incorrect type in argument 3 (different signedness)
      .../hid/usbhid/hid-core.c:787:47:    expected int *max
      .../hid/usbhid/hid-core.c:787:47:    got unsigned int *<noident>
      .../hid/usbhid/hid-core.c:788:48: warning: incorrect type in argument 3 (different signedness)
      .../hid/usbhid/hid-core.c:788:48:    expected int *max
      .../hid/usbhid/hid-core.c:788:48:    got unsigned int *<noident>
              by int -> unsigned int
      Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      282bfd4c
    • A
      HID: only dump report traffic with debug level 2 · 377e10fb
      Anssi Hannula 提交于
      Currently using debug=1 with hid module prints out all sent and received
      reports to the kernel log, while in many cases we only want to see the
      report descriptors and hid-input mappings that are printed when a device
      is probed.
      
      Add new level debug=2, and only dump the report traffic with that level.
      Signed-off-by: NAnssi Hannula <anssi.hannula@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      377e10fb
  5. 18 3月, 2008 1 次提交
  6. 28 1月, 2008 1 次提交
    • J
      HID: remove redundant WARN_ON()s in order not to scare users · c4124c9b
      Jiri Kosina 提交于
      The WARN_ON() in implement() and extract() spit out stacktraces and
      a lot of other information that might make users think that there is
      something seriously wrong with the system. WARN_ON() should not be
      deliberately triggerable by userspace application, which these can be.
      Usually this WARN_ON() triggers when hid2hci utility is sending the
      data that don't correspond to the device's report descriptor.
      
      Convert these messages to more friendly printk().
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c4124c9b
  7. 14 10月, 2007 1 次提交
    • J
      HID: add hidraw interface · 86166b7b
      Jiri Kosina 提交于
      hidraw is an interface that is going to obsolete hiddev one
      day.
      
      Many userland applications are using libusb instead of using
      kernel-provided hiddev interface. This is caused by various
      reasons - the HID parser in kernel doesn't handle all the
      HID hardware on the planet properly, some devices might require
      its own specific quirks/drivers, etc.
      
      hiddev interface tries to do its best to parse all the received
      reports properly, and presents only parsed usages into userspace.
      This is however often not enough, and that's the reason why
      many userland applications just don't use hiddev at all, and
      rather use libusb to read raw USB events and process them on
      their own.
      
      Another drawback of hiddev is that it is USB-specific.
      
      hidraw interface provides userspace readers with really raw HID
      reports, no matter what the low-level transport layer is (USB/BT),
      and gives the userland applications all the freedom to process
      the HID reports in a way they wish to.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      86166b7b
  8. 09 7月, 2007 1 次提交
    • J
      HID: make debugging output runtime-configurable · 58037eb9
      Jiri Kosina 提交于
      There have been many reports recently about broken HID devices, the
      diagnosis of which required users to recompile their kernels in order
      to be able to provide debugging output needed for coding a quirk for
      a particular device.
      
      This patch makes CONFIG_HID_DEBUG default y if !EMBEDDED and makes it
      possible to control debugging output produced by HID code by supplying
      'debug=1' module parameter.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      58037eb9
  9. 09 5月, 2007 1 次提交
  10. 16 4月, 2007 1 次提交
  11. 11 4月, 2007 1 次提交
    • S
      HID: introduce proper zeroing of unused bits in output reports · 46386b58
      Simon Budig 提交于
      Some HID devices are looking on the unused bits in the HID reports they
      receive. This is violating the specification, but we want to make those
      devices work. Well-behaving devices are unaffected, as they don't care
      about the unused bits.
      
      If bitsused % 8 is 0 all bits in data[] get used and we don't need to
      clear anything. Otherwise (bitsused % 8) bits of the last byte get used.
      By shifting 1 for (bitsused % 8) bits and subtracting 1 we create a mask
      consisting of (bitsused % 8) ones and remaining zeroes. By ANDing we
      clear the upper unused bits.
      Signed-off-by: NSimon Budig <simon@budig.de>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      46386b58
  12. 05 4月, 2007 1 次提交
  13. 15 3月, 2007 1 次提交
  14. 12 3月, 2007 2 次提交
    • J
      HID: zeroing of bytes in output fields is bogus · d108d4fe
      Jiri Kosina 提交于
      This patch removes bogus zeroing of unused bits in output reports,
      introduced in Simon's patch in commit d4ae650a.
      According to the specification, any sane device should not care
      about values of unused bits.
      
      What is worse, the zeroing is done in a way which is broken and
      might clear certain bits in output reports which are actually
      _used_ - a device that has multiple fields with one value of
      the size 1 bit each might serve as an example of why this is
      bogus - the second call of hid_output_report() would clear the
      first bit of report, which has already been set up previously.
      
      This patch will break LEDs on SpaceNavigator, because this device
      is broken and takes into account the bits which it shouldn't touch.
      The quirk for this particular device will be provided in a separate
      patch.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d108d4fe
    • J
      HID: allocate hid_parser in a proper way · 47a80edb
      Jiri Kosina 提交于
      hid_parser is non-trivially large structure, so it should be allocated
      using vmalloc() to avoid unsuccessful allocations when memory fragmentation
      is too high.
      This structue has a very short life, it's destroyed as soon as the report
      descriptor has been completely parsed.
      
      This should be considered a temporary solution, until the hid_parser is
      rewritten to consume less memory during report descriptor parsing.
      Acked-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      47a80edb
  15. 01 3月, 2007 2 次提交
  16. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  17. 05 2月, 2007 2 次提交
  18. 26 1月, 2007 1 次提交
  19. 22 1月, 2007 2 次提交
    • J
      HID: compilation fix when DEBUG_DATA is defined · e54dea69
      Jiri Kosina 提交于
      hid/hid-core.c references 'len' variable when DEBUG_DATA is defined,
      but the actual name of the variable is 'size'. Fix it.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      e54dea69
    • S
      HID: proper LED-mapping for SpaceNavigator · d4ae650a
      Simon Budig 提交于
      This change introduces a mapping for LED indicators between the HID
      specification and the Linux input subsystem. The previous code properly
      mapped the LEDs relevant for Keyboards, but garbeled the remaining ones.
      With this change all LED enums from the input system get mapped to more
      or less equivalent LED numbers from the HID specification.
      
      This patch also ensures that the unused bits in a HID report to the
      device are zeroed out. This makes the 3Dconnexion SpaceNavigator fully
      usable with the linux input system.
      Signed-off-by: NSimon Budig <simon@budig.de>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d4ae650a
  20. 09 1月, 2007 1 次提交
  21. 08 1月, 2007 2 次提交
  22. 09 12月, 2006 4 次提交