1. 26 12月, 2014 1 次提交
  2. 12 12月, 2014 1 次提交
    • L
      iio: Move buffer registration to the core · 3e1b6c95
      Lars-Peter Clausen 提交于
      Originally device and buffer registration were kept as separate operations
      in IIO to allow to register two distinct sets of channels for buffered and
      non-buffered operations. This has since already been further restricted and
      the channel set registered for the buffer needs to be a subset of the
      channel set registered for the device. Additionally the possibility to not
      have a raw (or processed) attribute for a channel which was registered for
      the device was added a while ago. This means it is possible to not register
      any device level attributes for a channel even if it is registered for the
      device. Also if a channel's scan_index is set to -1 and the channel is
      registered for the buffer it is ignored.
      
      So in summary it means it is possible to register the same channel array for
      both the device and the buffer yet still end up with distinctive sets of
      channels for both of them. This makes the argument for having to have to
      manually register the channels for both the device and the buffer invalid.
      Considering that the vast majority of all drivers want to register the same
      set of channels for both the buffer and the device it makes sense to move
      the buffer registration into the core to avoid some boiler-plate code in the
      device driver setup path.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      3e1b6c95
  3. 22 11月, 2014 3 次提交
  4. 20 7月, 2014 1 次提交
  5. 03 5月, 2014 1 次提交
  6. 30 4月, 2014 2 次提交
  7. 17 3月, 2014 1 次提交
    • J
      iio:core: Fix bug in length of event info_mask and catch unhandled bits set in masks. · ef4b4856
      Jonathan Cameron 提交于
      The unhandled bits case was highlighted by smatch:
        CHECK   drivers/iio/industrialio-core.c
      drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: buffer overflow 'iio_chan_info_postfix' 17 <= 31
        CC [M]  drivers/iio/industrialio-core.o
        CHECK   drivers/iio/industrialio-event.c
      drivers/iio/industrialio-event.c:327 iio_device_add_event() error: buffer overflow 'iio_ev_info_text' 3 <= 3
      
      The incorrect limit for the for_each_set_bit loop was noticed whilst fixing
      this other case.  Note that as we only have 3 possible entries a the moment
      and the value was set to 4, the bug would not have any effect currently.
      It will bite fairly soon though, so best fix it now.
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      ef4b4856
  8. 15 3月, 2014 1 次提交
  9. 18 2月, 2014 3 次提交
  10. 04 12月, 2013 1 次提交
  11. 25 11月, 2013 2 次提交
  12. 24 10月, 2013 2 次提交
  13. 12 10月, 2013 5 次提交
  14. 01 10月, 2013 1 次提交
  15. 21 9月, 2013 3 次提交
  16. 16 9月, 2013 2 次提交
  17. 15 9月, 2013 1 次提交
    • P
      iio: Add INT_TIME (integration time) channel info attribute · 899d90bd
      Peter Meerwald 提交于
      Integration time is in seconds; it controls the measurement
      time and influences the gain of a sensor.
      
      There are two typical ways that scaling is implemented in a device:
      1) input amplifier,
      2) reference to the ADC is changed.
      These both result in the accuracy of the ADC varying (by applying its
      sampling over a more relevant range).
      
      Integration time is a way of dealing with noise inherent in the analog
      sensor itself.  In the case of a light sensor, a mixture of photon noise
      and device specific noise.  Photon noise is dealt with by either improving
      the efficiency of the sensor, (more photons actually captured) which is not
      easily varied dynamically, or by integrating the measurement over a longer
      time period.  Note that this can also be thought of as an averaging of a
      number of individual samples and is infact sometimes implemented this way.
      Altering integration time implies that the duration of a measurement changes,
      a fact the device's user may be interested in.
      
      Hence it makes sense to distinguish between integration time and simple
      scale. In some devices both types of control are present and whilst they
      will have similar effects on the amplitude of the reading, their effect
      on the noise of the measurements will differ considerably.
      
      Used by adjd_s311, tsl4531, tcs3472
      The following drivers have similar controls (and could be adapted):
      * tsl2563 (integration time is controlled via CALIBSCALE among other things)
      * tsl2583 (has integration_time device_attr, but driver doesn't use channels yet)
      * tsl2x7x (has integration_time attr)
      Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net>
      Cc: Jon Brenner <jon.brenner@ams.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      899d90bd
  18. 04 8月, 2013 2 次提交
  19. 18 3月, 2013 2 次提交
  20. 16 3月, 2013 1 次提交
  21. 21 11月, 2012 2 次提交
  22. 10 11月, 2012 1 次提交
  23. 02 11月, 2012 1 次提交