1. 07 Nov, 2016 2 commits
    • Shiva Kerdel's avatar
      Staging: speakup: Remove unnecessary space after cast · d290effe
      Shiva Kerdel authored
      The affected files have been modified to remove redundant spaces after
      casts to solve checkpatch.pl checks.
      Signed-off-by: default avatarShiva Kerdel <shiva@exdev.nl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d290effe
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-for-4.10b' of... · 7970b9e6
      Greg Kroah-Hartman authored
      Merge tag 'iio-for-4.10b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-testing
      
      Jonathan writes:
      
      Second round of new device support, cleanups and fixes for IIO in the 4.10 cycle
      
      This includes two branch merges for elements that may also go via MFD.
      
      New device support
      * cros_ec
        - new driver to support these Chrome OS contiguous sensors which are behind
          the Chrome OS embedded controller.  Requires a few minor MFD and chrome
          platform changes.  One follow up fix deals with some dependency issues in
          Kconfig.
      * mpu-3050
        - new driver and device tree bindings for this venerable device.
      * st_accel
        - support for the lng2dm an
      
      Driver features
      * ad7192
        - Add DVdd regulator handling
      * ad9832
        - Add DVDD regulator handling
      * at91
        - Suspend and resume support
      * si7020
        - Device tree bindings
      * ti-am335x
        - DMA support - uses dma to accelerate short bursts of read back rather
        than full blown DMA buffer support.  Greatly improved performance.
        Includes an MFD addition to give access to the address needed for DMA.
      * tsl2583
        - Device tree bindings
      
      Cleanups and minor fixes
      * ad7192
        - Fix regulator naming to match datasheet
        - Handle regulator errors correctly (so as to not break deferred probing)
        - Rename reg variable to reflect which regulator it is
      * ad5933
        - Fix regulator naming to match datasheet
        - Handle regulator errors correctly (so as to not break deferred probing)
      * ad7746
        - Fix a missing return value (fallout from previous patch set)
      * ad7780
        - Fix regulator naming to match datasheet
        - Handle regulator errors correctly (so as to not break deferred probing)
      * ad9832
        - Fix regulator naming to match datasheet
        - Handle regulator errors correctly (so as to not break deferred probing)
        - Rename reg regulator to reflect which one it is
      * ad9834
        - Fix regulator naming to match datasheet
        - Handle regulator errors correctly (so as to not break deferred probing)
      * hts221
        - Remove a duplicated include
      * maxim thermocouple
        - Handle a wrong storage side in read function.  Prevent any problems that
        might be introduced by additions to this driver in future.
      * tsl2583 - big set from Brian Masney to drive this towards a staging
        graduation.
        - Convert to iio_chan_spec and read_raw / write_raw (in a couple of steps)
        - Improved error handling in various functions
        - Drop redundant power_state custom sysfs attribute.
        - Use IIO_*_ATTR* macros for remaining attributes.
        - Return an error code to userspace on invalid parameters being writen to
          sysfs files.
        - Add locking to various attribute accesses to remove possible races.
        - Add defines for various magic numbers.
        - Use smbus_read_byte_data instead of a write_byte followed by read_byte.
        - Query only relevant registers in probe.
        - Tidy up ordering of code comments.
        - Remove a pointless power off sequence in taos_chip_on.
        - Don't bother shutting down the chip when updating the lux table.
        The table is held entirely in the driver and doesn't effect the chip at all.
        - Drop a redundant i2c call in taos_als_calibrate where the same register
        is read twice in a row.
      7970b9e6
  2. 06 Nov, 2016 6 commits
    • Brian Masney's avatar
      staging: iio: tsl2583: remove redudant i2c call in taos_als_calibrate() · c2b0d2cf
      Brian Masney authored
      taos_als_calibrate() queries the control register to determine if the
      unit is powered on and has the ADC enabled. It then queries the same
      register a second time to determine if the ADC reading is valid. This
      patch removes the redundant i2c_smbus_read_byte_data() call.
      
      Verified that the driver still functions correctly using a TSL2581
      hooked up to a Raspberry Pi 2.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      c2b0d2cf
    • Brian Masney's avatar
      staging: iio: tsl2583: don't shutdown chip when updating the lux table · 0561155f
      Brian Masney authored
      in_illuminance_lux_table_store() shuts down the chip, updates the
      contents of the lux table, and then turns the chip back on. The values
      in lux table are not used by the chip and are only used internally by
      the driver. It is not necessary to change the power state on the chip.
      This patch removes the calls to taos_chip_off() and taos_chip_on()
      in in_illuminance_lux_table_store().
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      0561155f
    • Brian Masney's avatar
      staging: iio: tsl2583: remove redundant power off sequence in taos_chip_on() · babe4447
      Brian Masney authored
      taos_chip_on() explicitly turns the sensor power on and then writes the
      8 registers that are stored in taos_config. The first register in
      taos_config is the CONTROL register and the configuration is set to
      turn the power off. The existing state sequence in taos_chip_on() is:
      
      - Turn device power on
      - Turn device power off (via taos_config)
      - Configure other 7 registers (via taos_config)
      - Turn device power on, enable ADC
      
      This patch changes the code so that the device is not powered off via
      taos_config.
      
      Verified that the driver still functions correctly using a TSL2581
      hooked up to a Raspberry Pi 2.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      babe4447
    • Brian Masney's avatar
      staging: iio: tsl2583: fixed ordering of comments · 4a0f3614
      Brian Masney authored
      in taos_defaults()
      
      The comments in taos_defaults() appear after the line of code
      that they apply to. This patch moves the comments so that they appear
      before the code. Some of the comments were updated to be more
      informative.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      4a0f3614
    • Brian Masney's avatar
      staging: iio: tsl2583: removed unused code from device probing · 6bd0cb2b
      Brian Masney authored
      taos_probe() queries the all of the sensor's registers and loads all of
      the values into a buffer stored on the stack. Only the chip ID register
      was actually used. Change the probe function to just query the chip ID
      register on the device.
      
      Verified that the driver still functions correctly using a TSL2581
      hooked up to a Raspberry Pi 2.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      6bd0cb2b
    • Brian Masney's avatar
      staging: iio: tsl2583: i2c_smbus_write_byte() / i2c_smbus_read_byte() migration · 6ba5dee9
      Brian Masney authored
      There were several places where the driver would first call
      i2c_smbus_write_byte() to select the register on the device, and then
      call i2c_smbus_read_byte() to get the contents of that register. The
      code would look roughly like:
      
      /* Select register */
      i2c_smbus_write_byte(client, REGISTER);
      
      /* Read the the last register that was written to */
      int data = i2c_smbus_read_byte(client);
      
      Rewrite this to use i2c_smbus_read_byte_data() to combine the two
      calls into one:
      
      int data = i2c_smbus_read_byte_data(chip->client, REGISTER);
      
      Verified that the driver still functions correctly using a TSL2581
      hooked up to a Raspberry Pi 2.
      
      This fixes the following warnings that were found by the
      kbuild test robot that were introduced by commit 8ba355cce3c6 ("staging:
      iio: tsl2583: check for error code from i2c_smbus_read_byte()").
      
      drivers/staging/iio/light/tsl2583.c:365:5-12: WARNING: Unsigned
      expression compared with zero: reg_val < 0
      
      drivers/staging/iio/light/tsl2583.c:388:5-12: WARNING: Unsigned
      expression compared with zero: reg_val < 0
      
      This also removes the need for the taos_i2c_read() function since all
      callers were only calling the function with a length of 1.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      6ba5dee9
  3. 05 Nov, 2016 11 commits
  4. 01 Nov, 2016 17 commits
  5. 30 Oct, 2016 4 commits