16 Nov, 2018

1 commit

  • Before this commit sensor_hub_input_attr_get_raw_value() failed to take
    the signedness of 16 and 8 bit values into account, returning e.g.
    65436 instead of -100 for the z-axis reading of an accelerometer.

    This commit adds a new is_signed parameter to the function and makes all
    callers pass the appropriate value for this.

    While at it, this commit also fixes up some neighboring lines where
    statements were needlessly split over 2 lines to improve readability.

    Signed-off-by: Hans de Goede
    Acked-by: Srinivas Pandruvada
    Acked-by: Benjamin Tissoires
    Cc:
    Signed-off-by: Jonathan Cameron

    Hans de Goede
     

12 Feb, 2018

1 commit

  • This is the mindless scripted replacement of kernel use of POLL*
    variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
    L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
    for f in $L; do sed -i "-es/^\([^\"]*\)\(\\)/\\1E\\2/" $f; done
    done

    with de-mangling cleanups yet to come.

    NOTE! On almost all architectures, the EPOLL* constants have the same
    values as the POLL* constants do. But they keyword here is "almost".
    For various bad reasons they aren't the same, and epoll() doesn't
    actually work quite correctly in some cases due to this on Sparc et al.

    The next patch from Al will sort out the final differences, and we
    should be all done.

    Scripted-by: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

29 Nov, 2017

1 commit


05 Sep, 2017

1 commit


15 Aug, 2017

1 commit

  • platform_device_id are not supposed to change at runtime. All functions
    working with platform_device_id provided by
    work with const platform_device_id. So mark the non-const structs as
    const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Jiri Kosina

    Arvind Yadav
     

03 Aug, 2017

1 commit


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