summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/max517.c
Commit message (Collapse)AuthorAgeFilesLines
* iio: Switch i2c drivers back to use .probe()Uwe Kleine-König2023-05-211-1/+1
| | | | | | | | | | | | After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230515205048.19561-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: dac: max517: Convert to i2c's .probe_new()Uwe Kleine-König2022-11-231-3/+3
| | | | | | | | | | .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20221118224540.619276-90-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: dac: max517: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()Jonathan Cameron2022-07-181-4/+4
| | | | | | | | | | | Using these newer macros allows the compiler to remove the unused structure and functions when !CONFIG_PM_SLEEP + removes the need to mark pm functions __maybe_unused. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20220621202719.13644-14-jic23@kernel.org
* iio:dac:max517.c: Use devm_iio_device_register()Mugilraj Dhavachelvan2021-03-251-9/+1
| | | | | | | | | | Use devm_iio_device_register() to avoid remove function and drop explicit call to iio_device_unregister(). Signed-off-by: Mugilraj Dhavachelvan <dmugil2000@gmail.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210314175709.34301-1-dmugil2000@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio: remove explicit IIO device parent assignmentAlexandru Ardelean2020-06-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61Thomas Gleixner2019-05-241-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio: dac: max517: avoid using CONFIG_PM_SLEEPMarcus Folkesson2018-08-191-8/+3
| | | | | | | This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio:dac: drop assignment of iio_info.driver_moduleJonathan Cameron2017-08-221-1/+0
| | | | | | | | | The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure element will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* iio: max517: Add support for MAX520 and MAX521 chips.Antonio Fiol2015-03-281-12/+33
| | | | | | | | MAX520 and MAX521 are protocol-compatible with the already supported chips, just have more channels. Signed-off-by: Antonio Fiol <antonio@fiol.es> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-111-1/+0
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:max517 drop specification of scan type as unused in this driver.Jonathan Cameron2013-12-171-1/+0
| | | | | | | | IIO_ST is going away as it is a pain to maintain so the simplest path with this driver is to not specify the unused scan type. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
* iio: dac: max517: Remove redundant variableSachin Kamat2013-10-241-8/+1
| | | | | | | | Remove an inconsequential print message and return directly thereby eliminating an intermediate variable. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:max517: Report scale as fractional valueLars-Peter Clausen2013-10-011-5/+3
| | | | | | | Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: max517: Use devm_iio_device_allocSachin Kamat2013-08-191-13/+4
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:max517 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Roland Stigge <stigge@antcom.de>
* Drivers: iio: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-3/+3
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio: max517: mark probe() and remove() with __devinit and __devexitPeter Meerwald2012-06-121-3/+3
| | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio: remove indio_dev pointer from max517_dataPeter Meerwald2012-06-121-1/+0
| | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Roland Stigge <stigge@antcom.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:iio: Move DAC drivers out of stagingLars-Peter Clausen2012-06-051-0/+243
The IIO DAC drivers are in a reasonably good shape. They all make use of channel spec and non of them provides non-documented sysfs attributes. Code style should be OK as well, both checkpatch and coccicheck only report trivial issues. So lets move the whole folder out of staging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>