05 Nov, 2016

1 commit

  • User is unable to access to input-X-yyy and feature-X-yyy where
    X is a hex value and more than 9 (e.g. input-a-yyy, feature-b-yyy) in HID
    sensor custom sysfs interface.
    This is because when creating the attribute, the attribute index is
    written to using %x (hex). However, when reading and writing values into
    the attribute, the attribute index is scanned using %d (decimal). Hence,
    user is unable to access to attributes with index in hex values
    (e.g. 'a', 'b', 'c') but able to access to attributes with index in
    decimal values (e.g. 1, 2, 3,..).
    This fix will change input-%d-%x-%s and feature-%d-%x-%s to input-%x-%x-%s
    and feature-%x-%x-%s in show_values() and store_values() accordingly.

    Signed-off-by: Ooi, Joyce
    Reviewed-by: Benjamin Tissoires
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Ooi, Joyce
     

11 Apr, 2015

1 commit

  • HID Sensor Spec defines two usage ids for custom sensors

    HID_USAGE_SENSOR_TYPE_OTHER_CUSTOM (0x09, 0xE1)
    HID_USAGE_SENSOR_TYPE_OTHER_GENERIC(0x09, 0xE2)

    In addition the standard also defines usage ids for custom fields.
    The purpose of these sensors is to extend the functionality or provide a way to
    obfuscate the data being communicated by a sensor. Without knowing the mapping
    between the data and its encapsulated form, it is difficult for an driver to
    determine what data is being communicated by the sensor. This allows some
    differentiating use cases, where vendor can provide applications. Since these
    can't be represented by standard sensor interfaces like IIO, we present these
    as fields with

    - type (input/output)
    - units
    - min/max
    - get/set value

    In addition an dev interface to transfer report events. Details about this
    interface is described in /Documentation/hid/hid-sensor.txt. Manufacturers
    should not use these ids for any standard sensors, otherwise the the
    product/vendor id can be added to black list.

    Signed-off-by: Srinivas Pandruvada
    Reviewed-by: Jonathan Cameron
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada