1. 22 9月, 2013 1 次提交
    • L
      iio: Add iio_push_buffers_with_timestamp() helper · d2c3d072
      Lars-Peter Clausen 提交于
      Drivers using software buffers often store the timestamp in their data buffer
      before calling iio_push_to_buffers() with that data buffer. Storing the
      timestamp in the buffer usually involves some ugly pointer arithmetic. This
      patch adds a new helper function called iio_push_buffers_with_timestamp() which
      is similar to iio_push_to_buffers but takes an additional timestamp parameter.
      The function will help to hide to uglyness in one central place instead of
      exposing it in every driver. If timestamps are enabled for the IIO device
      iio_push_buffers_with_timestamp() will store the timestamp as the last element
      in buffer, before passing the buffer on to iio_push_buffers(). The buffer needs
      large enough to hold the timestamp in this case. If timestamps are disabled
      iio_push_buffers_with_timestamp() will behave just like iio_push_buffers().
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
      Cc: Josh Wu <josh.wu@atmel.com>
      Cc: Denis Ciocca <denis.ciocca@gmail.com>
      Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
      Cc: Ge Gao <ggao@invensense.com>
      Cc: Peter Meerwald <pmeerw@pmeerw.net>
      Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Marek Vasut <marex@denx.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      d2c3d072
  2. 16 9月, 2013 1 次提交
    • L
      iio: iio_push_to_buffers(): Change type of 'data' to const void * · 5d65d920
      Lars-Peter Clausen 提交于
      Change the type of the 'data' parameter for iio_push_to_buffers() from 'u8 *' to
      'const void *'. Drivers typically use the correct type (e.g. __be16 *) for their
      data buffer. When passing the buffer to iio_push_to_buffers() it needs to be
      cast to 'u8 *' for the compiler to not complain (and also having to add __force
      if we want to keep sparse happy as well). Since the buffer implementation should
      not care about the data layout (except the size of one sample) using a void
      pointer is the correct thing to do. Also make it const as the buffer
      implementations are not supposed to modify it.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      5d65d920
  3. 01 2月, 2013 1 次提交
  4. 20 11月, 2012 1 次提交
    • L
      iio: Fix iio_buffer_register stub signature · 50d69b51
      Lars-Peter Clausen 提交于
      Match the iio_buffer_register stub signature up to the real function and make
      the second parameter const. This fixes a the following warnings if
      CONFIG_IIO_BUFFER is disabled:
      
      	drivers/staging/iio/accel/adis16201_core.c: In function ‘adis16201_probe’:
      	drivers/staging/iio/accel/adis16201_core.c:536: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
      	drivers/staging/iio/accel/adis16203_core.c: In function ‘adis16203_probe’:
      	drivers/staging/iio/accel/adis16203_core.c:468: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
      	drivers/staging/iio/accel/adis16204_core.c: In function ‘adis16204_probe’:
      	drivers/staging/iio/accel/adis16204_core.c:527: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
      	drivers/staging/iio/accel/adis16209_core.c: In function ‘adis16209_probe’:
      	drivers/staging/iio/accel/adis16209_core.c:542: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
      	drivers/staging/iio/accel/adis16240_core.c: In function ‘adis16240_probe’:
      	drivers/staging/iio/accel/adis16240_core.c:588: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      50d69b51
  5. 10 11月, 2012 1 次提交
  6. 08 9月, 2012 1 次提交
  7. 10 7月, 2012 1 次提交
  8. 07 7月, 2012 1 次提交
  9. 19 6月, 2012 1 次提交
  10. 26 4月, 2012 1 次提交
  11. 25 4月, 2012 1 次提交
  12. 25 2月, 2012 1 次提交
  13. 23 12月, 2011 4 次提交
  14. 13 12月, 2011 1 次提交
  15. 09 12月, 2011 11 次提交
  16. 27 11月, 2011 1 次提交
    • J
      staging:iio: header reorganization · af5046af
      Jonathan Cameron 提交于
      Issue brought up by Lars-Peter Clausen. This is a varient of what
      he suggested.
      
      io/iio.h for driver stuff (has to include types.h)
      	Sub files for the bits drivers may or may not use
      	iio/sysfs.h
      	iio/buffer.h (contents of current buffer_generic.h)
      	(obviously anything offering events will need events.h as well)
      iio/types.h for the enums that matter to both
      	iio_chan_type, iio_modifier
      iio/events.h for the event code stuff
      	IIO_EVENT_CODE and friends.  + everything in chrdev.h  So this
      	is the stuff that userspace cares about.
      	Also include iio_event_type, iio_event_direction
      
      Thus iio drivers include iio.h + as required
      events.h
      sysfs.h
      buffer.h
      
      in kernel users (once that interface is merged) will need inkern.h
      which will pull in types.h
      
      Userspace will need just events.h (which pulls in types.h) to get
      everything they need to know about.  Buffer userspace access doesn't
      currently need any core defines. All information about the data
      format is passed through sysfs.
      Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      af5046af
  17. 11 10月, 2011 1 次提交
  18. 27 9月, 2011 3 次提交
  19. 07 9月, 2011 7 次提交