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
     

18 Feb, 2018

1 commit


17 Feb, 2018

1 commit

  • The old code was based on a DHT11 datasheet which specifies a measurement
    range of 20%-90% RH. Turns out the sensor actually reports values outside
    this range, so we should support it as far as possible.

    Reported-by: Edward Attfield
    Signed-off-by: Harald Geyer
    Signed-off-by: Jonathan Cameron

    Harald Geyer
     

31 Jan, 2018

4 commits


08 Jan, 2018

1 commit


14 Nov, 2017

1 commit

  • Pull staging and IIO updates from Greg KH:
    "Here is the "big" staging and IIO driver update for 4.15-rc1.

    Lots and lots of little changes, almost all minor code cleanups as the
    Outreachy application process happened during this development cycle.
    Also happened was a lot of IIO driver activity, and the typec USB code
    moving out of staging to drivers/usb (same commits are in the USB tree
    on a persistent branch to not cause merge issues.)

    Overall, it's a wash, I think we added a few hundred more lines than
    removed, but really only a few thousand were modified at all.

    All of these have been in linux-next for a while. There might be a
    merge issue with Al's vfs tree in the pi433 driver (take his changes,
    they are always better), and the media tree with some of the odd
    atomisp cleanups (take the media tree's version)"

    * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
    staging: lustre: add SPDX identifiers to all lustre files
    staging: greybus: Remove redundant license text
    staging: greybus: add SPDX identifiers to all greybus driver files
    staging: ccree: simplify ioread/iowrite
    staging: ccree: simplify registers access
    staging: ccree: simplify error handling logic
    staging: ccree: remove dead code
    staging: ccree: handle limiting of DMA masks
    staging: ccree: copy IV to DMAable memory
    staging: fbtft: remove redundant initialization of buf
    staging: sm750fb: Fix parameter mistake in poke32
    staging: wilc1000: Fix bssid buffer offset in Txq
    staging: fbtft: fb_ssd1331: fix mirrored display
    staging: android: Fix checkpatch.pl error
    staging: greybus: loopback: convert loopback to use generic async operations
    staging: greybus: operation: add private data with get/set accessors
    staging: greybus: loopback: Fix iteration count on async path
    staging: greybus: loopback: Hold per-connection mutex across operations
    staging: greybus/loopback: use ktime_get() for time intervals
    staging: fsl-dpaa2/eth: Extra headroom in RX buffers
    ...

    Linus Torvalds
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

23 Aug, 2017

1 commit


26 Jul, 2017

2 commits


23 Jul, 2017

6 commits


01 Jul, 2017

3 commits


14 May, 2017

1 commit


02 Apr, 2017

1 commit


01 Apr, 2017

1 commit

  • Check for attribute_group structures that are only stored in the
    attrs filed of iio_info structure. As the attrs field of iio_info
    structures is constant, so these attribute_group structures can also be
    declared constant.
    Done using coccinelle:

    @r1 disable optional_qualifier @
    identifier i;
    position p;
    @@
    static struct attribute_group i@p = {...};

    @ok1@
    identifier r1.i;
    position p;
    struct iio_info x;
    @@
    x.attrs=&i@p;

    @bad@
    position p!={r1.p,ok1.p};
    identifier r1.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    static
    +const
    struct attribute_group i={...};

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    +const
    struct attribute_group i;

    File size before:
    text data bss dec hex filename
    3459 488 0 3947 f6b drivers/iio/humidity/hdc100x.o

    File size after:
    text data bss dec hex filename
    3507 424 0 3931 f5b drivers/iio/humidity/hdc100x.o

    Signed-off-by: simran singhal
    Signed-off-by: Jonathan Cameron

    simran singhal
     

26 Mar, 2017

1 commit

  • Environmental humidity sensor is a hid defined sensor,
    it shows raw humidity measurement of air.

    More information can be found in:
    http://www.usb.org/developers/hidpage/HUTRR39b.pdf

    According to IIO ABI definition, humidityrelative data output unit is
    milli percent. Add the unit convert from percent to milli percent.

    Signed-off-by: Song Hongyan
    Signed-off-by: Jonathan Cameron

    Song Hongyan
     

06 Feb, 2017

1 commit


22 Jan, 2017

1 commit

  • The DHT22 (AM2302) datasheet specifies that the LOW start pulse should not
    exceed 20ms. However, observations with an oscilloscope of an RPi Model 2B
    (rev 1.1) communicating with a DHT22 sensor showed that the driver was
    consistently sending start pulses longer than 20ms:

    Kernel 4.7.10-v7+ (n=132):
    Minimum pulse length: 20.20ms
    Maximum: 29.84ms
    Mean: 24.96ms
    StDev: 2.82ms
    Sensor response rate: 100%
    Read success rate: 76%

    On kernel 4.8, the start pulse was so long that the sensor would not even
    respond 97% of the time:

    Kernel 4.8.16-v7+ (n=100):
    Minimum pulse length: 30.4ms
    Maximum: 74.4ms
    Mean: 39.3ms
    StDev: 10.2ms
    Sensor response rate: 3%
    Read success rate: 3%

    The driver would return ETIMEDOUT and write log messages like this:

    [ 51.430987] dht11 dht11@0: Only 1 signal edges detected
    [ 66.311019] dht11 dht11@0: Only 0 signal edges detected

    Replacing msleep(18) with usleep_range(18000, 20000) made the pulse length
    sane again and restored responsiveness:

    Kernel 4.8.16-v7+ with usleep_range (n=123):
    Minimum pulse length: 18.16ms
    Maximum: 20.20ms
    Mean: 19.85ms
    StDev: 0.51ms
    Sensor response rate: 100%
    Read success rate: 84%

    Cc: stable@vger.kernel.org
    Signed-off-by: John Brooks
    Reviewed-by: Harald Geyer
    Signed-off-by: Jonathan Cameron

    John Brooks
     

03 Dec, 2016

1 commit


02 Nov, 2016

2 commits


24 Oct, 2016

2 commits


05 Sep, 2016

1 commit


16 Aug, 2016

2 commits

  • hdc100x supports Texas Instruments HDC1000 and HDC1008 relative
    humidity and temperature sensors. Add these product names to
    Kconfig.

    Signed-off-by: Alison Schofield
    Cc: Daniel Baluta
    Signed-off-by: Jonathan Cameron

    Alison Schofield
     
  • Replace the i2c_smbus_read_byte commmands used to retrieve the sensor
    data with an i2c_master_recv command.

    The smbus read byte method fails because the device does not expect a
    stop condition after sending the first byte. When we issue the second
    read, we are getting the first byte again. Net effect is that of the 14
    bits used for the measurement, the 8 most significant bits are correct,
    the lower 6 are not.

    None of the smbus read protocols follow the pattern this device requires
    (S Addr Rd [A] Data [A] Data NA P), hence the switch to an i2c receive
    transaction.

    Applicable from original introduction of this driver, but will require
    backporting due to churn in the code.

    Signed-off-by: Alison Schofield
    Cc: Daniel Baluta
    Cc:
    Signed-off-by: Jonathan Cameron

    Alison Schofield
     

15 Aug, 2016

2 commits


20 Jun, 2016

1 commit


03 Jun, 2016

1 commit