1. 22 Sep, 2018 2 commits
    • David Lechner's avatar
      iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage · e2540da8
      David Lechner authored
      This changes how the SPI message for the triggered buffer is setup in
      the TI ADS7950 A/DC driver. By using the SPI_CS_WORD flag, we can read
      multiple samples in a single SPI transfer. If the SPI controller
      supports DMA transfers, we can see a significant reduction in CPU usage.
      
      For example, on an ARM9 system running at 456MHz reading just 4 channels
      at 100Hz: before this change, top shows the CPU usage of the IRQ thread
      of this driver to be ~7.7%. After this change, the CPU usage drops to
      ~3.8%.
      
      The use of big-endian for the raw data was cargo culted from another
      driver when this driver was originally written. It used an SPI word size
      of 8 bits and big-endian byte ordering to effectively emulate 16 bit
      words.
      
      Now, in order to inject a CS toggle between each word, we need to use
      the correct word size, otherwise we would get a CS toggle half way
      through each word 16-bit. The SPI subsystem uses CPU byte ordering for
      multi-byte words. So, the data we get back from the SPI is going to be
      CPU endian now no matter what. Converting that to big endian will just
      add overhead on little endian systems so we opt to change the raw data
      format from big endian to CPU endian.
      
      There is a small risk that this could break some lazy userspace programs
      that use the raw data without checking the data format. We can address
      this if/when it actually comes up.
      Signed-off-by: default avatarDavid Lechner <david@lechnology.com>
      Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      e2540da8
    • Jonathan Cameron's avatar
      Merge tag 'spi-cs-word' into togreg · 7a5f0b3a
      Jonathan Cameron authored
      spi: Provide SPI_CS_WORD
      
      This provides a SPI operation mode which changes chip select after every
      word, used by some devices such as ADCs and DACs.
      7a5f0b3a
  2. 17 Sep, 2018 2 commits
  3. 16 Sep, 2018 2 commits
  4. 14 Sep, 2018 7 commits
    • Thomas Petazzoni's avatar
      MAINTAINERS: remove myself as staging FBTFT maintainer · 6029b7ac
      Thomas Petazzoni authored
      Even though I did introduce the fbtft code in staging a while ago to
      stop seeing this being developed out-of-tree, I don't intend to
      maintain it, and I don't use it actively. So be honest and remove
      myself from the MAINTAINERS file for this subsystem.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6029b7ac
    • Igor Stoppa's avatar
      staging: octeon-hcd: remove unnecessary unlikely() · 009e451c
      Igor Stoppa authored
      WARN_ON() already contains an unlikely(), so it's not necessary to
      wrap it into another.
      Signed-off-by: default avatarIgor Stoppa <igor.stoppa@huawei.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: devel@driverdev.osuosl.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      009e451c
    • zhong jiang's avatar
      staging: remove unneeded static set .owner field in platform_driver · faeeeea8
      zhong jiang authored
      platform_driver_register will set the .owner field. So it is safe
      to remove the redundant assignment.
      
      The issue is detected with the help of Coccinelle.
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Acked-by: default avatarVaibhav Agarwal <vaibhav.sr@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      faeeeea8
    • Colin Ian King's avatar
      staging: wilc1000: fix null checks on wilc · b4a01d8f
      Colin Ian King authored
      Currently the pointer wilc is being null checked several times
      and yet not checked for the final workqueue flush and destroy
      (which can lead to a null pointer dereference if wilc is null);
      these missing null checks were overlooked in an earlier core
      refactoring commit.
      
      Clean up the code by checking wilc at the start and bailing out
      early if it is null allowing the subsequent null checks to be
      removed, this also fixes the potential null pointer deferences
      on the workqueue flush and destroy calls.
      
      Detected by CoverityScan, CID#1473305 ("Dereference after null check")
      
      Fixes: b3ee105c ("staging: wilc1000: refactor code to move initilization in wilc_netdev_init()")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b4a01d8f
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-for-4.20a' of... · 4b55dce8
      Greg Kroah-Hartman authored
      Merge tag 'iio-for-4.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
      
      Jonathan writes:
      
      1st round of IIO new device support, features and cleanups in the 4.20 cycle.
      
      There is a merge commit in here to pull in regmap support for repeatedly
      reading the same register (to read out FIFOs).  Used by the adxl372 driver.
      This will find uses elsewhere once we tidy up various drivers that are
      effectively doing this and relying on not enabling regcache.
      
      New device support
      * Analog devices ADXL372 accelerometer
        - new driver for this accelerometer including fifo and and interrupt support.
          Follow up patches enforce trigger validation, add sampling frequency
          control and filter bandwidth control.  A later series added i2c support
          to the existing SPI support.
      * ST lsm6dsx
        - rework and add support fo the LSM6DSO 6 axis mems sensor.
      * Linear LTC 1660 DAC
        - new driver supporting the LTC 1660 and LTC 1665 SPI DACs.
      * Microchip mcp3911 ADC.
        - new driver for this integrated analog front end and ADC.
      * Qualcomm SPMI PMIC5 adc driver
        - using the spmi framework, new driver and bindings for this ADC.
          Follow up patch adds some missing channels.
      
      Features
      * ad5758
        - support hard reset using a gpio (if provided).
      * mpu6050
        - Regulator support
      * qcom-spmi-adc5
        - Sanity check the channel numbers provided by DT to make sure the
          driver actually knows about them.
      * sc27xx
        - give raw data for channel 20 as it's used on all known boards for
          the headset which needs a custom converstion function.  If it turns
          out someone builds a board where this isn't true we will deal with it
          when it happens.
        - add ADC scale calibration.
      * tsl2772
        - support device tree binding to set the proximity led settings.
        - regulator supprot.
        - binding for apds9930 - trivial addition as register compatible with tsl2772.
      
      Cleanups / Minor fixes
      
      * adxl345
        - supress a static checker warning but explicitly checking if the id
          object is null.
      * bh1750
        - avoid CONFIG_PM_SLEEP checks.
        - SPDX.
      * bme680
        - spelling mistake
        - use clamp rather than open coding.
        - white space and other similar fixes.
        - rename MSK to MASK for clarifty and use GENMASK to specify them.
        - use the FIELD_GET macro rather than a very odd accessor of dividing by
          16 to get the shift.
        - rework to share handing for oversampling of the various channels in a
          unified way.
        - check explicitly for val2 in write_raw function to ensure it is 0.
        - drop some field defines that don't add anything.
      * dpot-adc
        - SPDX
      * envelope detector
        - SPDX
      * isl29501
        - fix an ancient compiler warning mostly because it results in much
          nicer code.
      * max30102
        - mark switch fall throughs.
      * max44000
        - drop an unused variable.
      * max512
        - avoid CONFIG_PM_SLEEP checks.
      * max5481
        - use of_device_get_match_data rather than open coding it.
      * max5821
        - avoid CONFIG_PM_SLEEP checks.
      * max9611
        - explicity cast an enum to an integer to make it totally clear that
          this is intended.
      * mcp4018
        - fix an inconsistent MODULE_LICENSE.
        - use of_device_get_match_data rather than open coding it.
      * mcp4531
        - use of_device_get_match_data rather than open coding it.
        - SPDX
      * mcp4725
        - avoid CONFIG_PM_SLEEP checks.
      * mcp4922
        - Fix error handling and prevent writing a negative to when setting the
          output voltage.
      * ms5611
        - drop deprecated compatible strings without manufacturer from being
          explicitly listed.  They are handled anyway.
        - SPDX
      * multiplexer
        - SPDX
      * qcom-vadc
        - fix inconsistent documentation for reg.
      * ti-dac5571
        - provide and of_match_table.
      
      * treewide
        - update Michael Hennerich's email address.
        - Use %pOFn rather than device_node.name.
      * documentation.
        - tidy up a wrong kernel version for the introduction of the
          position_relative ABI.
      4b55dce8
    • Chengguang Xu's avatar
      staging: erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION · 064ee3c0
      Chengguang Xu authored
      It's a little bit strange when fault_injection related
      option fail with -EINVAL which was already disabled
      from config, so surround all fault_injection related option
      parsing code using CONFIG_EROFS_FAULT_INJECTION. Meanwhile,
      slightly change warning message to keep consistency with
      option POSIX_ACL and FS_XATTR.
      Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      064ee3c0
    • Thomas Weißschuh's avatar
      staging: erofs: use explicit unsigned int type · 7dd68b14
      Thomas Weißschuh authored
      Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'"
      detected by checkpatch.pl.
      Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Reviewed-by: default avatarGao Xiang <gaoxiang25@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7dd68b14
  5. 11 Sep, 2018 4 commits
  6. 10 Sep, 2018 23 commits