1. 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
  2. 17 2月, 2014 1 次提交
    • S
      HID: hid-sensor-hub: Add selector api · e02cee48
      Srinivas Pandruvada 提交于
      In some report descriptors, they leave holes in the selectors. In
      this case if we use hardcoded selector values, this will result
      in invalid values. For example, if there is selectors defined for
      Power State from OFF to D0 to D3. We can't use indexes of these states
      if some states are not implemented or not present in the report decriptors.
      In this case, we need to get the indexes from report descriptors.
      
      One API is added to get the index of a selector. This API will
      search for usage id in the field usage list and return the index.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      e02cee48
  3. 03 12月, 2013 1 次提交
  4. 03 11月, 2013 1 次提交
  5. 01 10月, 2013 1 次提交
  6. 26 8月, 2013 1 次提交
  7. 06 1月, 2013 2 次提交
  8. 07 9月, 2012 1 次提交