1. 28 9月, 2016 2 次提交
  2. 25 9月, 2016 1 次提交
  3. 18 9月, 2016 1 次提交
    • J
      iio: adc: men_z188_adc: constify iio_info structures · 52ceb773
      Julia Lawall 提交于
      Check for iio_info structures that are only stored in the info field of a
      iio_dev structure.  This field is declared const, so iio_info structures
      that have this property can be declared as const also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct iio_info i@p = { ... };
      
      @ok@
      identifier r.i;
      struct iio_dev e;
      position p;
      @@
      e.info = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct iio_info e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct iio_info i = { ... };
      // </smpl>
      
      The result of size on this file before the change is:
         text	      data     bss     dec         hex	  filename
         1529	       312       0    1841         731
         drivers/iio/adc/men_z188_adc.o
      
      and after the change it is:
         text	     data        bss	    dec	    hex	filename
         1689       168          0       1857     741
         drivers/iio/adc/men_z188_adc.o
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      52ceb773
  4. 06 9月, 2016 2 次提交
  5. 04 9月, 2016 1 次提交
    • W
      iio: stx104: Add IIO support for the ADC channels · 4075a283
      William Breathitt Gray 提交于
      The Apex Embedded Systems STX104 features 16 channels of single-ended (8
      channels of true differential) 16-bit analog input. Differential input
      configuration may be selected via a physical jumper on the device.
      Similarly, input polarity (unipolar/bipolar) is configured via a
      physical jumper on the device.
      
      Input gain selection is available to the user via software, thus
      allowing eight possible input ranges: +-10V, +-5V, +-2.5V, +-1.25V,
      0 to 10V, 0 to 5V, 0 to 2.5V, and 0 to 1.25V. Four input gain
      configurations are supported: x1, x2, x4, and x8.
      
      This ADC resolution is 16-bits (1/65536 of full scale). Analog input
      samples are taken on software trigger; neither FIFO sampling nor
      interrupt triggering is supported by this driver.
      
      The Apex Embedded Systems STX104 is primarily an analog-to-digital
      converter device. The STX104 IIO driver was initially placed in the DAC
      directory because only the DAC portion of the STX104 was supported at
      the time. Now that ADC support has been added to the STX104 IIO driver,
      the driver should be moved to the more appropriate ADC directory.
      Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      4075a283
  6. 03 9月, 2016 1 次提交
  7. 01 9月, 2016 1 次提交
  8. 30 8月, 2016 1 次提交
  9. 29 8月, 2016 1 次提交
  10. 24 8月, 2016 1 次提交
  11. 22 8月, 2016 3 次提交
    • Z
      iio: adc: mt2701: Add Mediatek auxadc driver for mt2701. · ace4cdfe
      Zhiyong Tao 提交于
      Add Mediatek auxadc driver based on iio.
      It will register a device in iio and support iio.
      So thermal can read auxadc channel to sample data by iio device.
      It is tested successfully on mt2701 platform.
      Mt8173 and mt6577 platforms are not tested.
      But the expectation is compatible.
      Signed-off-by: NZhiyong Tao <zhiyong.tao@mediatek.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      ace4cdfe
    • V
      iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample · 7175cce1
      Vignesh R 提交于
      Now that open delay and sample delay for each channel is configurable
      via DT, the default IDLE_TIMEOUT value is not enough as this is
      calculated based on hardcoded macros. This results in driver returning
      EBUSY sometimes. Fix this by increasing the timeout
      value based on maximum value possible to open delay and sample delays
      for each channel.
      
      Fixes: 5dc11e81 ("iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters")
      Signed-off-by: NVignesh R <vigneshr@ti.com>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      7175cce1
    • V
      iio: adc: ti_am335x_adc: Protect FIFO1 from concurrent access · 90c43ec6
      Vignesh R 提交于
      It is possible that two or more ADC channels can be simultaneously
      requested for raw samples, in which case there can be race in access to
      FIFO data resulting in loss of samples.
      If am335x_tsc_se_set_once() is called again from tiadc_read_raw(), when
      ADC is still acquired to sample one of the channels, the second process
      might be put into uninterruptible sleep state. Fix these issues, by
      protecting FIFO access and channel configurations with a mutex. Since
      tiadc_read_raw() might take anywhere between few microseconds to few
      milliseconds to finish execution (depending on averaging and delay
      values supplied via DT), its better to use mutex instead of spinlock.
      
      Fixes: 7ca6740c ("mfd: input: iio: ti_amm335x: Rework TSC/ADC synchronization")
      Signed-off-by: NVignesh R <vigneshr@ti.com>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      90c43ec6
  12. 21 8月, 2016 2 次提交
  13. 16 8月, 2016 2 次提交
  14. 15 8月, 2016 1 次提交
  15. 25 7月, 2016 2 次提交
  16. 03 7月, 2016 4 次提交
  17. 01 7月, 2016 1 次提交
  18. 28 6月, 2016 2 次提交
  19. 27 6月, 2016 3 次提交
    • M
      iio:ad7266: Fix probe deferral for vref · 68b356eb
      Mark Brown 提交于
      Currently the ad7266 driver treats any failure to get vref as though the
      regulator were not present but this means that if probe deferral is
      triggered the driver will act as though the regulator were not present.
      Instead only use the internal reference if we explicitly got -ENODEV which
      is what is returned for absent regulators.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      68b356eb
    • M
      iio:ad7266: Fix support for optional regulators · e5511c81
      Mark Brown 提交于
      The ad7266 driver attempts to support deciding between the use of internal
      and external power supplies by checking to see if an error is returned when
      requesting the regulator. This doesn't work with the current code since the
      driver uses a normal regulator_get() which is for non-optional supplies
      and so assumes that if a regulator is not provided by the platform then
      this is a bug in the platform integration and so substitutes a dummy
      regulator. Use regulator_get_optional() instead which indicates to the
      framework that the regulator may be absent and provides a dummy regulator
      instead.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      e5511c81
    • M
      iio:ad7266: Fix broken regulator error handling · 6b7f4e25
      Mark Brown 提交于
      All regulator_get() variants return either a pointer to a regulator or an
      ERR_PTR() so testing for NULL makes no sense and may lead to bugs if we
      use NULL as a valid regulator. Fix this by using IS_ERR() as expected.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      6b7f4e25
  20. 03 6月, 2016 4 次提交
  21. 30 5月, 2016 4 次提交