1. 21 11月, 2012 3 次提交
  2. 20 11月, 2012 3 次提交
    • L
      staging:iio: Move adis library out of staging · ec04cb04
      Lars-Peter Clausen 提交于
      Now that the adis library no longer depends on the sw_ring buffer implementation
      we can move it out of staging.
      
      While we are at it also sort the entries in the iio Kconfig and Makefile to be
      in alphabetical order.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      ec04cb04
    • L
      staging:iio:adis: Preallocate transfer message · aacff892
      Lars-Peter Clausen 提交于
      Currently the driver reads out all sample registers of the device and throws
      away those which it does not need. Furthermore the SPI message is constructed
      each time the trigger handler is run, although it will be the same each time.
      This patch preallocates and pre-constructs the SPI message in the
      "update_scan_mode" callback. Only those register which are actually selected for
      sampling are included in the message. The patch also gets rid of the conversion
      of the sample data from big endian to the native endianness and instead marks
      the channel as big endian in its scan type. This allows to directly push the
      SPI transfer buffer to the IIO buffer without the need to post-process it.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      aacff892
    • L
      staging:iio: Add common ADIS library · ccd2b52f
      Lars-Peter Clausen 提交于
      A lot of the devices from the ADIS family use the same methods for accessing
      registers, sampling data and trigger handling. They also have similar register
      layout for the control registers.
      
      This patch adds a common library for these devices. The library implements
      functions for reading and writing registers as buffer and trigger management. It
      also provides a set functions for accessing the control registers and for
      running the devices internal self-test. Having this common library code will
      allow us to remove a lot of duplicated code.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      ccd2b52f