summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/envelope-detector.c
AgeCommit message (Collapse)Author
2019-08-05iio: Remove dev_err() usage after platform_get_irq()Stephen Boyd
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: linux-iio@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-20iio: envelope-detector: switch to SPDX license identifierPeter Rosin
Drop the boilerplate license text. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-22iio:adc: drop assign iio_info.driver_module and iio_trigger_ops.ownerJonathan Cameron
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-11-13iio: envelope-detector: ADC driver based on a DAC and a comparatorPeter Rosin
The DAC is used to find the peak level of an alternating voltage input signal by a binary search using the output of a comparator wired to an interrupt pin. Like so: _ | \ input +------>-------|+ \ | \ .-------. | }---. | | | / | | dac|-->--|- / | | | |_/ | | | | | | | | irq|------<-------' | | '-------' Signed-off-by: Peter Rosin <peda@axentia.se> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>