summaryrefslogtreecommitdiff
path: root/drivers/iio/chemical
AgeCommit message (Collapse)AuthorFilesLines
2016-09-03iio: chemical: vz89x: fix boolreturn.cocci warningskbuild test robot1-1/+1
drivers/iio/chemical/vz89x.c:119:9-10: WARNING: return of 0/1 in function 'vz89x_measurement_is_valid' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29iio: chemical: vz89x: prevent corrupted buffer from being readMatt Ranostay1-2/+6
Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29iio: chemical: vz89x: add support for VZ89TE partMatt Ranostay1-15/+98
Add support the VZ89TE variant which removes the voc_short channel, and has CRC check for data transactions. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29iio: chemical: vz89x: abstract chip configurationMatt Ranostay1-18/+62
Abstract chip configuration data to allow supporting multiple variants of the VZ89 chemical sensor line. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21iio: chemical: atlas-ph-sensor: add ORP featureMatt Ranostay2-1/+53
Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21iio: chemical: atlas-ph-sensor: switch to REGCACHE_NONE regmap treeMatt Ranostay1-16/+0
Since there are overlapping volatile regions between parts, and only register that isn't volatile is the temperature compensation provided from userspace. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21iio: chemical: atlas-ph-sensor: switch to iio_device_*_direct_mode helpersMatt Ranostay1-7/+5
Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-06-30iio:core: timestamping clock selection supportGregor Boirie1-1/+1
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-05-29iio: chemical: atlas-ph-sensor: add EC featureMatt Ranostay2-5/+125
Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29iio: chemical: atlas-ph-sensor: reorg driver to allow multiple chipsMatt Ranostay1-55/+90
Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-27iio: convert to common i2c_check_functionality() return valueMatt Ranostay1-1/+1
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-24iio: chemical: atlas-ph-sensor: use regmap_bulk_readMatt Ranostay1-3/+3
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-19iio: chemical: atlas-ph-sensor: switch regmap cacheMatt Ranostay1-3/+1
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-06iio: chemical: select IRQ_WORK for ATLAS ph sensorArnd Bergmann1-0/+1
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: 27dec00ecf2d ("iio: chemical: add Atlas pH-SM sensor support") Reviewed-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-01-30iio: chemical: add Atlas pH-SM sensor supportMatt Ranostay3-0/+525
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>
2015-12-12iio: chemical: add AMS iAQ-core supportMatt Ranostay3-0/+209
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-03iio: chemical: vz89x: rework i2c transfer readingMatt Ranostay1-14/+52
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-09-30iio: chemical: vz89x hardware i2c workaroundMatt Ranostay1-2/+21
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-23iio: chemical: add SGX VZ89x VOC sensor supportMatt Ranostay3-0/+258
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>