1. 02 6月, 2014 1 次提交
  2. 28 5月, 2014 1 次提交
  3. 04 4月, 2014 1 次提交
  4. 25 3月, 2014 1 次提交
    • S
      HID: hid-sensor-hub: fix sleeping function called from invalid context · f74346a0
      Srinivas Pandruvada 提交于
      Fix issue with the sleeping calling hid_hw_request under spinlock.
      When i2c is used as HID transport, this is calling kmalloc, which
      can sleep. So remove call to this function while under spinlock.
       [ 1067.021961] Call Trace:
       [ 1067.021970]  [<ffffffff8192f5f2>] dump_stack+0x4d/0x6f
       [ 1067.021976]  [<ffffffff811109f2>] __might_sleep+0xd2/0xf0
       [ 1067.021981]  [<ffffffff811ea15b>] __kmalloc+0xeb/0x200
       [ 1067.021989]  [<ffffffff816e0cb3>] ? hid_alloc_report_buf+0x23/0x30
       [ 1067.021993]  [<ffffffff816e0cb3>] hid_alloc_report_buf+0x23/0x30
       [ 1067.021997]  [<ffffffff816f4cb7>] i2c_hid_request+0x57/0x110
       [ 1067.022006]  [<ffffffffa02bc61c>] sensor_hub_input_attr_get_raw_value+0xbc/0x100 [hid_sensor_hub]
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f74346a0
  5. 18 2月, 2014 1 次提交
    • S
      HID: hid-sensor-hub: Processing for duplicate physical ids · ca2ed12f
      Srinivas Pandruvada 提交于
      In HID sensor hub, HID physical ids are used to represent different sensors.
      For example physical id of 0x73 in usage page = 0x20, represents an
      accelerometer. The HID sensor hub driver uses this physical ids to create
      platform devices using MFD. There is 1:1 correspondence between an phy id and a
      client driver.
      
      But in some cases these physical ids are reused. There is a phy id 0xe1, which
      specifies a custom sensor, which can exist multiple times to represent various
      custom sensors. In this case there can be multiple instances of client MFD
      drivers, processing specific custom sensor. In this case when client driver
      looks for report id or a field index, it should still get the report id
      specific to its own type. This is also true for reports, they should be
      directed towards correct instance.  This change introduce a way to parse and
      tie physical devices to their correct instance.
      
      Summary of changes:
      - To get physical ids, use collections. If a collection of type=physical
        exist then use usage id as in the name of platform device name
      - As part of the platform data, we assign a hdsev instance, which has
        start and end of collection indexes. Using these indexes attributes
        can be tied to correct MFD client instances
      - When a report is received, call callback with correct hsdev instance.
        In this way using its private data stored as part of its registry, it
        can distinguish different sensors even when they have same physical and
        logical ids.
      
        This patch is co-authored with Archana Patni <archna.patni@intel.com>.
      Reported-by: NArchana Patni <archana.patni@intel.com>
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NArchana Patni <archana.patni@intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ca2ed12f
  6. 17 2月, 2014 2 次提交
  7. 17 1月, 2014 1 次提交
    • S
      HID: hid-sensor-hub: Fix buggy report descriptors · 875e36f8
      Srinivas Pandruvada 提交于
      This addresses regression caused by commit id "751d17e2"
       iio: hid-sensors: Fix power and report state.
      This commit removed a quirk, to change the enumeration base
      to 1 from 0 based on an CONFIG paramter. There was objection to
      add more changes under this quirk, instead suggested to add an
      HID quirk. But there is no easy way to add HID qurik as the
      reports are not properly using collection class.
      
      The solution was to use logical minimum, which is a correct way.
      There were changes done in firmware to address this.
      
      Unfortunately some devices, still use old FW and can't be upgraded
      to newer version on Linux devices as there is no FW upgrade tool
      available for Linux devices. So we need to fix report descriptors,
      for such devices. This will not have any impact, if the FW uses
      logical 1 as minimum.
      
      In this patch we look for usage id for "power and report state", and
      modify logical minimum value to 1.
      
      Background on enum:
      In the original HID sensor hub firmwares all Named array enums were
      to 0-based. But the most recent hub implemented as 1-based,
      because of the implementation by one of the major OS vendor.
      Using logical minimum for the field as the base of enum. So we add
      logical minimum to the selector values before setting those fields.
      Some sensor hub FWs already changed logical minimum from 0 to 1
      to reflect this and hope every other vendor will follow.
      There is no easy way to add a common HID quirk for NAry elements,
      even if the standard specifies these field as NAry, the collection
      used to describe selectors is still just "logical".
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      875e36f8
  8. 09 12月, 2013 1 次提交
    • S
      HID: hid-sensor-hub: fix duplicate sysfs entry error · d81cae80
      Srinivas Pandruvada 提交于
      Fix kernel warning and failure to register sensor hub devices with MFD.  Now
      many devices has in-built sensor hubs. So by default this HID hub, is properly
      parsed and register individual sensors as platform device using MFD framework.
      But if a second sensor hub is attached via USB, which has same sensors, it will
      result in kernel warning and failure to register MFD cell as the platform
      device sysfs file name will be same as created by in-built sensor hubs. This
      patch sets MFD cell id to PLATFORM_DEVID_AUTO. In this way there will never be
      duplicate sysfs file names.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d81cae80
  9. 03 12月, 2013 1 次提交
  10. 30 10月, 2013 1 次提交
    • S
      HID: hid-sensor-hub: fix report size · d4b1bba7
      Srinivas Pandruvada 提交于
      Most of the hid sensor field size is reported in report_size field
      in the report descriptor. For rotation fusion sensor the quaternion
      data is 16 byte field, the report size was set to 4 and report
      count field is set to 4. So the total size is 16 bytes. But the current
      driver has a bug and not taking account for report count field. This
      causes user space to see only 4 bytes of data sent via IIO interface.
      The number of bytes in a field needs to take account of report_count
      field. Need to multiply report_size and report_count to get total
      number of bytes.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d4b1bba7
  11. 01 10月, 2013 1 次提交
  12. 04 9月, 2013 4 次提交
  13. 26 8月, 2013 1 次提交
  14. 25 2月, 2013 2 次提交
  15. 18 2月, 2013 2 次提交
  16. 03 1月, 2013 1 次提交
  17. 12 12月, 2012 1 次提交
  18. 21 11月, 2012 1 次提交
  19. 22 9月, 2012 2 次提交
  20. 19 9月, 2012 3 次提交
  21. 07 9月, 2012 1 次提交