summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-01 13:43:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-01 13:43:39 +0200
commit675732707f29d6714bc756a75e70a6ec2b16a478 (patch)
tree57bfb6621f45828fa4db43d1c7ba255074d82dd2 /drivers/staging/iio/accel
parentf8da055aafec0483c12132554504ec683868c655 (diff)
parente0631a31b9ed501415e552a783b1f1e3988c7c46 (diff)
Merge tag 'iio-for-4.1b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: Second set of new devices, functionality and cleanup for IIO in the 4.1 cycle. New Functionality * Watermark logic for buffers. Allows for blocking reads to block until their requested amount is available - previously they only blocked until a single scan of data was available. Also allows for polling for a watermark amount of data to be available. This feature was first proposed some time ago to good responses, but not taken further by the original author Octavian has picked up the gauntlet and taken it through to merging (along with the hardware fifo support that follows). * New approach to hardware fifo handling - in particular handling the interaction of a hardware fifo feeding into a software fifo and their watershed events. We don't have every possible case well covered yet, but this is certainly a good, flexible starting point. This will replace the previous approach used in ancient drivers (sca3000) where we just exposed the hardware buffer directly to userspace. Very few pieces of hardware have sufficiently long buffers for that to be an adequate solution. * bmc150_accel - hardware fifo support. * mlx90614 - support dual IR sensor devices + some refactoring to clean up the code and allow some other functionality currently under review. * L3GD20H gyroscope support added to the st_gyro driver. * lis3lv02d accelerometer added to the st_gyro driver. Note this part is also supported by the older lis3 driver under misc. A lengthy discussion took place and concluded that holding parts out on the basis that whole driver would be subsumed into this one was counter productive. Better to add part support and add additional features as people need them. Basically there was not advantage in not merging the support. * max517 driver gains support for MAX520 and MAX521 DACs. Documentation * 3.20 -> 4.0 renaming for recent docs. Whilst technically a fix, I think people will cope until the next merge merge window. * An ABI typo hat -> What: More ABIs should have hats. * Document in_rot_offset, illuminance_raw and illuminance_scale. Cleanups * Fix a scale extraction bug in generic_buffer.c example. * Constify a load of device tree related structures.
Diffstat (limited to 'drivers/staging/iio/accel')
-rw-r--r--drivers/staging/iio/accel/sca3000_ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
index f76a26885808..8589eade1057 100644
--- a/drivers/staging/iio/accel/sca3000_ring.c
+++ b/drivers/staging/iio/accel/sca3000_ring.c
@@ -129,9 +129,9 @@ error_ret:
return ret ? ret : num_read;
}
-static bool sca3000_ring_buf_data_available(struct iio_buffer *r)
+static size_t sca3000_ring_buf_data_available(struct iio_buffer *r)
{
- return r->stufftoread;
+ return r->stufftoread ? r->watermark : 0;
}
/**