Commit Graph

12 Commits

Author SHA1 Message Date
Gregor Boirie bc2b7dab62 iio:core: timestamping clock selection support
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>
2016-06-30 19:41:38 +01:00
Matt Ranostay e8dd92bfbf iio: chemical: atlas-ph-sensor: add EC feature
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 20:03:23 +01:00
Matt Ranostay 7103b99b03 iio: chemical: atlas-ph-sensor: reorg driver to allow multiple chips
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 20:03:16 +01:00
Matt Ranostay f8d9d3b434 iio: convert to common i2c_check_functionality() return value
Previously most drivers that used a i2c_check_functionality() check
condition required various error codes on failure. This patchset
converts to a standard of -EOPNOTSUPP

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-27 17:17:43 +00:00
Matt Ranostay 98e55e93a0 iio: chemical: atlas-ph-sensor: use regmap_bulk_read
Replaced i2c_smbus_read_i2c_block_data() with regmap_bulk_read()
function call. This is to make the driver code more consistent.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-24 20:40:40 +00:00
Matt Ranostay 0d43b34688 iio: chemical: atlas-ph-sensor: switch regmap cache
switch from using REGCACHE_FLAT to REGCACHE_RBTREE so initial hw values
are read from device. This also allows some volatile ranges to be
dropped.

Note that REGCACHE_FLAT is intended only for very low lag cases so doesn't
do nice things like read initial values from the device.  Hence this change.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-19 18:57:13 +00:00
Arnd Bergmann 3b31b783ad iio: chemical: select IRQ_WORK for ATLAS ph sensor
The newly added atlas-ph-sensor driver uses irq_work_queue, which
may not always be enabled:

ERROR: "irq_work_queue" [drivers/iio/chemical/atlas-ph-sensor.ko] undefined!

This adds a 'select' statement to Kconfig to ensure it's there
when we need it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 27dec00ecf ("iio: chemical: add Atlas pH-SM sensor support")
Reviewed-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-06 18:36:58 +00:00
Matt Ranostay 27dec00ecf iio: chemical: add Atlas pH-SM sensor support
Add support for the Atlas Scientific pH-SM chemical sensor that can
detect pH levels of solutions in the range of 0-14.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-01-30 16:27:17 +00:00
Matt Ranostay 466df4d0c1 iio: chemical: add AMS iAQ-core support
Add support for AMS iAQ-core continuous and pulsed VOC sensors.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-12-12 15:07:38 +00:00
Matt Ranostay 93e87d73cc iio: chemical: vz89x: rework i2c transfer reading
Add an optimized i2c transfer reading function, and fallback
to racey smbus transfers if client->adapter doesn't support this.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-12-03 18:31:12 +00:00
Matt Ranostay bf23cee62d iio: chemical: vz89x hardware i2c workaround
Chipset sometime updates in the middle of a reading causing it
to reset the data pointer, and causing invalid reading of previous data.

We can check for this invalid state by reading MSB of the resistance
reading that is always zero, and by also confirming the VOC_short isn't
zero.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-09-30 18:20:53 +01:00
Matt Ranostay cd8d97774f iio: chemical: add SGX VZ89x VOC sensor support
Add support for VZ89X sensors VOC and CO2 reporting channels in
percentage which can be converted to part per million.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-09-23 20:23:26 +01:00