summaryrefslogtreecommitdiffstats
path: root/drivers/iio/potentiostat
Commit message (Collapse)AuthorAgeFilesLines
* iio: lmp91000: Remove code to set trigger parentGwendal Grignou2021-03-251-2/+1
| | | | | | | | | | | | | | | | iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Given data->dev is dev, and we call devm_iio_trigger_alloc with dev instead of data->dev, we do not have to set data->trig->dev.parent to dev anymore. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Link: https://lore.kernel.org/r/20210309193620.2176163-6-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessorsJonathan Cameron2020-09-211-6/+5
| | | | | | | | | | This change allows use of this driver with ACPI via PRP0001 and removes an example of an anti pattern I'm trying to remove from IIO. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Link: https://lore.kernel.org/r/20200910173242.621168-17-jic23@kernel.org
* iio: Move attach/detach of the poll func to the coreLars-Peter Clausen2020-06-201-11/+2
| | | | | | | | | | | | | | | | | | | | | | | All devices using a triggered buffer need to attach and detach the trigger to the device in order to properly work. Instead of doing this in each and every driver by hand move this into the core. At this point in time, all drivers should have been resolved to attach/detach the poll-function in the same order. This patch removes all explicit calls of iio_triggered_buffer_postenable() & iio_triggered_buffer_predisable() in all drivers, since the core handles now the pollfunc attach/detach. The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's not immediately obvious that removing the hooks doesn't break anything. Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board. All seems to be fine. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Tested-by: Eugen Hristev <eugen.hristev@microchip.com> #for at91-sama5d2-adc Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: remove left-over parent assignmentsAlexandru Ardelean2020-06-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | These were found by doing some shell magic: ------------ for file in $(git grep -w devm_iio_device_alloc | cut -d: -f1 | sort | uniq) ; do if grep 'parent =' $file | grep -v trig | grep -vq devm_; then echo "$file -> $(grep "parent =" $file)" fi done ----------- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. JC: A few more added via inspection of all parent = statements in drivers/iio. Some of these may just have crossed with this series, others were less obvious to scripting due to some cross file / module boundary calls. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: potentiostat: lmp9100: fix iio_triggered_buffer_{predisable,postenable} ↵Alexandru Ardelean2020-03-081-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | positions The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook, the poll func should be attached before the enable code. The lmp9100 was attaching a poll function but never detaching it via any IIO disable hook. This change adds the detaching of the poll function, and moves/renames lmp91000_buffer_preenable() function to lmp91000_buffer_postenable(). The idea is to make it more symmetrical, so that when the iio_triggered_buffer_{predisable,postenable} functions get removed, it's easier to see. Fixes: 67e17300dc1d7 ("iio: potentiostat: add LMP91000 support") Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-212-0/+2
| | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio:potentiostat:lmp91000: change dev_err messageAnderson Reis2019-04-041-1/+1
| | | | | | | | | | Change dev_err message on line 215 in order to inform that tia-gain-ohm is not defined and an external resistor is not specified. Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com> Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio:potentiostat:lmp91000: invert if statementAnderson Reis2019-04-041-3/+2
| | | | | | | | | | | | Invert if statement arms in line 214, in order to make the code cleaner, solve these checkpatch.pl CHECKs: - lmp9100.c:214: CHECK: braces {} should be used on all arms of this statement - lmp9100.c:216: CHECK: Unbalanced braces around else statement Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio:potentiostat:lmp91000: reduce line width and remove blank lineAnderson Reis2019-04-041-3/+2
| | | | | | | | | | | | | Break the line 258 in order fit the line width on 80 characters. Remove the blank line 279, as the line before is also a blank line. Solve these checkpath.el WARNING and CHECK: - lmp91000.c:258: WARNING: line over 80 characters - lmp91000.c:279: CHECK: Please don't use multiple blank lines Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio:potentiostat:lmp91000: remove unnecessary parenthesesLucas Oshiro2019-04-041-1/+1
| | | | | | | | Remove unnecessary parentheses on line 116. Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: potentiostat: lmp91000: add LMP91002 supportMatt Ranostay2018-05-121-0/+2
| | | | | | | | LMP91002 is register compatible so add devicetree and i2c client ids Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: add SPDX identifier for various driversMatt Ranostay2018-02-181-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>
* iio:potentiostat:lmp91000 drop assign iio_info.driver_module and ↵Jonathan Cameron2017-08-221-2/+0
| | | | | | | | | | | iio_trigger_ops.owner 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>
* iio: lmp91000: Set parent deviceLars-Peter Clausen2017-02-191-0/+1
| | | | | | | | | | Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: potentiostat: add LMP91000 supportMatt Ranostay2016-09-273-0/+474
Add support for the LMP91000 potentiostat which is used for chemical sensing applications. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>