summaryrefslogtreecommitdiff
path: root/drivers/iio/pressure/mpl3115.c
AgeCommit message (Collapse)Author
2016-06-30iio:core: timestamping clock selection supportGregor Boirie
Adds a new per-device sysfs attribute "current_timestamp_clock" to allow userspace to select a particular POSIX clock for buffered samples and events timestamping. Following clocks, as listed in clock_gettime(2), are supported: CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_BOOTTIME and CLOCK_TAI. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Acked-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-29iio: Fix two mpl3115 issues in measurement conversionPeter Meerwald
(i) pressure is 20-bit unsigned, not signed; the buffer description is incorrect; for raw reads, this is just cosmetic (ii) temperature is 12-bit signed, not 16-bit; this affects readout of temperatures below zero as the sign bit is incorrectly processed reported via private mail Cc: stable@vger.kernel.org Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: Robert Deliƫn <robert@delien.nl> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-11iio:pressure:mpl3115: Fix sparse cast to restricted __be32 warningPeter Meerwald
>> >> drivers/iio/pressure/mpl3115.c:101:46: sparse: cast to restricted __be32 >> >> drivers/iio/pressure/mpl3115.c:115:46: sparse: cast to restricted __be32 Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-11-24iio: Add Freescale MPL3115A2 pressure / temperature sensor driverPeter Meerwald
I2C-controlled MEMS sensor with 20-bit pressure measurement (pascal) and 12-bit temperature measurement driver only exposes basic functionality, see TODO remarks datasheet: http://cache.freescale.com/files/sensors/doc/data_sheet/MPL3115A2.pdf v2: * store 20-bit value in 32-bit buffer element (instead of 24-bit) * zero buffer to prevent kernel data leak to userspace * fix mutex unlock in trigger handler (thanks Andi Shyti) Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reviewed-by: Andi Shyti <andi@etezian.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>