summaryrefslogtreecommitdiffstats
path: root/drivers/iio/chemical/atlas-ph-sensor.c
AgeCommit message (Collapse)AuthorFilesLines
2019-12-29iio: chemical: atlas-ph-sensor: rename atlas-ph-sensor to atlas-sensorMatt Ranostay1-684/+0
Since the orginal scope of the driver was to only support the pH product from Atlas it has evolved to other sensors. Rename the file, driver name, and regmap to atlas-sensor which reflects this, although keep CONFIG_ATLAS_PH_SENSOR to not cause regressions with current configurations. Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-12-15iio: atlas-ph-sensor: Drop GPIO includeLinus Walleij1-1/+0
The driver includes <linux/gpio.h> yet fails to use symbols from any the header so drop the include. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-13iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() positionAlexandru Ardelean1-4/+4
The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. The iio_triggered_buffer_predisable() should be called last, to detach the poll func after the devices has been suspended. The position of iio_triggered_buffer_postenable() is correct. Note this is not stable material. It's a fix in the logical model rather fixing an actual bug. These are being tidied up throughout the subsystem to allow more substantial rework that was blocked by variations in how things were done. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-01-12iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsiusMatt Ranostay1-4/+3
IIO_TEMP scale value for temperature was incorrect and not in millicelsius as required by the ABI documentation. Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Fixes: 27dec00ecf2d (iio: chemical: add Atlas pH-SM sensor support) Cc: <stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-15iio: chemical: atlas-ph-sensor: use msleep() for long uncritical delaysMatt Ranostay1-7/+7
usleep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Cc: Nicholas Mc Guire <hofrat@osadl.org> Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-02-18iio: add SPDX identifier for various driversMatt Ranostay1-12/+4
Add GPLv2+ SPDX identifier and update email for author's drivers. Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-22iio:chemical: drop assign iio_info.driver_module and iio_trigger_ops.ownerJonathan Cameron1-2/+0
The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2016-10-23iio:chemical:atlas-ph-sensor: Fix use of 32 bit int to hold 16 bit big ↵Sandhya Bankar1-3/+4
endian value This will result in a random value being reported on big endian architectures. (thanks to Lars-Peter Clausen for pointing out the effects of this bug) Only effects a value printed to the log, but as this reports the settings of the probe in question it may be of direct interest to users. Also, fixes the following sparse endianness warnings: drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 drivers/iio/chemical/atlas-ph-sensor.c:215:9: warning: cast to restricted __be16 Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Fixes: e8dd92bfbff25 ("iio: chemical: atlas-ph-sensor: add EC feature") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-05Merge 4.8-rc5 into staging-nextGreg Kroah-Hartman1-1/+1
We want the staging fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21iio: chemical: atlas-ph-sensor: fix typo in val assignmentColin Ian King1-1/+1
Fix an incorrect assignment due to a typo on a variable name. The variable val2 should be assigned 100000 and not val. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-By: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21iio: chemical: atlas-ph-sensor: add ORP featureMatt Ranostay1-1/+52
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 Ranostay1-2/+120
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-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-01-30iio: chemical: add Atlas pH-SM sensor supportMatt Ranostay1-0/+511
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>