1. 30 4月, 2012 1 次提交
    • L
      staging:iio: Streamline API function naming · 7cbb7537
      Lars-Peter Clausen 提交于
      Currently we use two different naming schemes in the IIO API, iio_verb_object
      and iio_object_verb. E.g iio_device_register and iio_allocate_device. This
      patches renames instances of the later to the former. The patch also renames allocate to
      alloc as this seems to be the preferred form throughout the kernel.
      
      In particular the following renames are performed by the patch:
      	iio_put_device -> iio_device_put
      	iio_allocate_device -> iio_device_alloc
      	iio_free_device -> iio_device_free
      	iio_get_trigger -> iio_trigger_get
      	iio_put_trigger -> iio_trigger_put
      	iio_allocate_trigger -> iio_trigger_alloc
      	iio_free_trigger -> iio_trigger_free
      
      The conversion was done with the following coccinelle patch with manual fixes to
      comments and documentation.
      
      <smpl>
      @@
      @@
      -iio_put_device
      +iio_device_put
      @@
      @@
      -iio_allocate_device
      +iio_device_alloc
      @@
      @@
      -iio_free_device
      +iio_device_free
      @@
      @@
      -iio_get_trigger
      +iio_trigger_get
      @@
      @@
      -iio_put_trigger
      +iio_trigger_put
      @@
      @@
      -iio_allocate_trigger
      +iio_trigger_alloc
      @@
      @@
      -iio_free_trigger
      +iio_trigger_free
      </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7cbb7537
  2. 26 4月, 2012 2 次提交
  3. 19 4月, 2012 3 次提交
  4. 14 4月, 2012 1 次提交
  5. 08 3月, 2012 1 次提交
  6. 03 3月, 2012 3 次提交
  7. 25 2月, 2012 2 次提交
    • L
      staging:iio: Add extended IIO channel info · 5f420b42
      Lars-Peter Clausen 提交于
      Sometimes devices have per channel properties which either do not map nicely to
      the current channel info scheme (e.g. string properties) or are very device
      specific, so it does not make sense to add generic support for them.
      
      Currently drivers define these attributes by hand for each channel. Depending on
      the number of channels this can amount to quite a few lines of boilerplate code.
      Especially if a driver supports multiple variations of a chip with different
      numbers of channels. In this case it becomes necessary to have a individual
      attribute list per chip variation and also a individual iio_info struct.
      
      This patch introduces a new scheme for handling such per channel attributes
      called extended channel info attributes. A extended channel info attribute
      consist of a name, a flag whether it is shared and read and write callbacks.
      The read and write callbacks are similar to the {read,write}_raw callbacks and
      take a IIO device and a channel as their first parameters, but instead of
      pre-parsed integer values they directly get passed the raw string value, which
      has been written to the sysfs file.
      
      It is possible to assign a list of extended channel info attributes to a
      channel. For each extended channel info attribute the IIO core will create a new
      sysfs attribute conforming to the IIO channel naming spec for the channels type,
      similar as for normal info attributes. Read and write access to this sysfs
      attribute will be redirected to the extended channel info attributes read and
      write callbacks.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5f420b42
    • J
      staging:iio:core set the iio_dev.info pointer to null on unregister under lock. · ac917a81
      Jonathan Cameron 提交于
      This prevents use of provider callbacks after it has been unregistered.
      Note that all code using this that can be called from a consumer *must*
      check the pointer before using and hold the info_exist_lock throughout
      the usage of the callbacks in info.
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac917a81
  8. 10 2月, 2012 2 次提交
  9. 23 12月, 2011 2 次提交
  10. 09 12月, 2011 1 次提交
  11. 30 11月, 2011 1 次提交
  12. 28 11月, 2011 1 次提交
  13. 27 11月, 2011 8 次提交
  14. 22 11月, 2011 1 次提交
  15. 18 10月, 2011 1 次提交
  16. 11 10月, 2011 1 次提交
  17. 06 10月, 2011 1 次提交
  18. 27 9月, 2011 3 次提交
  19. 17 9月, 2011 1 次提交
  20. 07 9月, 2011 4 次提交