1. 29 1月, 2017 2 次提交
    • F
      iio: adc: stm32: add support for triggered buffer mode · da9b9485
      Fabrice Gasnier 提交于
      STM32 ADC conversions can be launched using hardware triggers.
      It can be used to start conversion sequences (group of channels).
      Selected channels are select via sequence registers.
      Trigger source is selected via 'extsel' (external trigger mux).
      Trigger polarity is set to rising edge by default.
      Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      da9b9485
    • A
      iio: distance: srf08: add IIO driver for us ranger · 78f83902
      Andreas Klinger 提交于
      This is the IIO driver for devantech srf08 ultrasonic ranger which can be
      used to measure the distances to an object.
      
      The sensor supports I2C with some registers.
      
      Supported Features include:
       - read the distance in ranging mode in centimeters
       - output of the driver is directly the read value
       - together with the scale the driver delivers the distance in meters
       - only the first echo of the nearest object is delivered
       - set sensitivity as analog value in the range of 0-31  means setting
         gain register on device
       - set range registers; userspace enters max. range in millimeters in
         43 mm steps
      
      Features not supported by this driver:
       - ranging mode in inches or in microseconds
       - ANN mode
       - change I2C address through this driver
       - light sensor
      
      The driver was added in the directory "proximity" of the iio subsystem and
      the menu in den config is now called "Proximity and distance sensors"
      Signed-off-by: NAndreas Klinger <ak@it-klinger.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      78f83902
  2. 28 1月, 2017 8 次提交
  3. 26 1月, 2017 1 次提交
    • B
      iio: Add STM32 timer trigger driver · 93fbe91b
      Benjamin Gaignard 提交于
      Timers IPs can be used to generate triggers for other IPs like
      DAC or ADC.
      Each trigger may result of timer internals signals like counter enable,
      reset or edge, this configuration could be done through "master_mode"
      device attribute.
      
      Since triggers could be used by DAC or ADC their names are defined
      in include/ nux/iio/timer/stm32-timer-trigger.h and is_stm32_iio_timer_trigger
      function could be used to check if the trigger is valid or not.
      
      "trgo" trigger have a "sampling_frequency" attribute which allow to configure
      timer sampling frequency.
      
      version 8:
      - change kernel version from 4.10 to 4.11 in ABI documentation
      
      version 7:
      - remove all iio_device related code
      - move driver into trigger directory
      
      version 5:
      - simplify tables of triggers
      - only create an IIO device when needed
      
      version 4:
      - get triggers configuration from "reg" in DT
      - add tables of triggers
      - sampling frequency is enable/disable when writing in trigger
        sampling_frequency attribute
      - no more use of interruptions
      
      version 3:
      - change compatible to "st,stm32-timer-trigger"
      - fix attributes access right
      - use string instead of int for master_mode and slave_mode
      - document device attributes in sysfs-bus-iio-timer-stm32
      
      version 2:
      - keep only one compatible
      - use st,input-triggers-names and st,output-triggers-names
        to know which triggers are accepted and/or create by the device
      Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@st.com>
      Acked-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      93fbe91b
  4. 23 1月, 2017 2 次提交
    • L
      iio: accel: fix Kconfig warning · ed8959f4
      Linus Walleij 提交于
      commit 76222772
      "iio: accel: st_accel: handle deprecated bindings"
      attempted to be smart and let users use the old I2C
      driver and the new SPI driver, or the old SPI driver and
      the new I2C driver in combination for the LIS3LV02,
      and put the restrictions on the I2C and SPI subdrivers
      not not be combined with the old subdrivers.
      
      This doesn't work since the IIO ST accel top-level
      component selects the I2C and SPI subdrivers, resulting
      in the following Kconfig noise:
      
      warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_I2C_3AXIS
      which has unmet direct dependencies (IIO && !SENSORS_LIS3_I2C
      && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_I2C)
      warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_SPI_3AXIS
      which has unmet direct dependencies (IIO && !SENSORS_LIS3_SPI
      && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_SPI)
      (...)
      
      This fixes the issue by putting the dependencies directly
      in the top-level component instead, so that it never gets
      to select its unselectable subcomponent.
      
      Fixes: 76222772 ("iio: accel: st_accel: handle deprecated bindings")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ed8959f4
    • A
      iio: trigger: free trigger resource correctly · 10e840df
      Alison Schofield 提交于
      These stand-alone trigger drivers were using iio_trigger_put()
      where they should have been using iio_trigger_free().  The
      iio_trigger_put() adds a module_put which is bad since they
      never did a module_get.
      
      In the sysfs driver, module_get/put's are used as triggers are
      added & removed. This extra module_put() occurs on an error path
      in the probe routine (probably rare).
      
      In the bfin-timer & interrupt trigger drivers, the module resources
      are not explicitly managed, so it's doing a put on something that
      was never get'd.  It occurs on the probe error path and on the
      remove path (not so rare).
      
      Tested with the sysfs trigger driver.
      The bfin & interrupt drivers were build tested & inspected only.
      Signed-off-by: NAlison Schofield <amsfield22@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      10e840df
  5. 22 1月, 2017 10 次提交
  6. 21 1月, 2017 6 次提交
  7. 15 1月, 2017 2 次提交
  8. 14 1月, 2017 4 次提交
  9. 11 1月, 2017 5 次提交