summary refs log tree commit diff
path: root/drivers
AgeCommit message (Collapse)Author
2020-09-21iio:pressure:ms5637: Drop of_match_ptr protectionJonathan Cameron
This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Ludovic Tancerel <ludovic.tancerel@maplehightech.com> Link: https://lore.kernel.org/r/20200910173242.621168-20-jic23@kernel.org
2020-09-21iio:pressure:ms5611: Drop of_match_ptr and CONFIG_OF protectionsJonathan Cameron
These prevents use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Tomasz Duszynski <tduszyns@gmail.com> Link: https://lore.kernel.org/r/20200910173242.621168-19-jic23@kernel.org
2020-09-21iio:pressure:icp10100: Drop of_match_ptr and CONFIG_OF protectionsJonathan Cameron
These prevents use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Link: https://lore.kernel.org/r/20200910173242.621168-18-jic23@kernel.org
2020-09-21iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessorsJonathan Cameron
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
2020-09-21iio:dac:ti-dac5571: Drop of_match_ptr and CONFIG_OF protectionsJonathan Cameron
These prevent the use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Link: https://lore.kernel.org/r/20200910173242.621168-16-jic23@kernel.org
2020-09-21iio:dac:ti-dac082s085: Drop of_match_ptr and CONFIG_OF protectionsJonathan Cameron
These prevent the use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Lukas Wunner <lukas@wunner.de> Link: https://lore.kernel.org/r/20200910173242.621168-15-jic23@kernel.org
2020-09-21iio:dac:mcp4725: drop of_match_ptr and use generic fw propertiesJonathan Cameron
This enables use of ACPI PRP0001 and removes an antipattern I am trying to stop people copying in IIO. This particular case is more complex than most because it allowed probing via sysfs with out a fwnode but would presumably always have then failed. Now the code will assume that properties are the defaults if not specified or the firmware node is not present. This relaxation of the constraints should not break any existing cases and may enable some new ones. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Peter Meerwald <pmeerw@pmeerw.net> Link: https://lore.kernel.org/r/20200910173242.621168-14-jic23@kernel.org
2020-09-21iio:dac:ad7303: Drop of_match_ptr protectionJonathan Cameron
This prevents use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Also add mod_devicetable.h include given struct of_device_id is declared there. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20200910173242.621168-13-jic23@kernel.org
2020-09-21iio:dac:ad5593r: Drop of_match_ptr and ACPI_PTR protections.Jonathan Cameron
These result in a very small reduction in driver size, but at the cost of more complex build and slightly harder to read code. In the case of of_match_ptr it also prevents use of PRP0001 ACPI based identification. In this particular case we have a valid ACPI/PNP ID that I am assuming was issued by Analog Devices. That should be used in preference to PRP0001 but doesn't mean we should prevent that route. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20200910173242.621168-12-jic23@kernel.org
2020-09-21iio:dac:ad5592r: Drop of_match_ptr and ACPI_PTR protections.Jonathan Cameron
These result in a very small reduction in driver size, but at the cost of more complex build and slightly harder to read code. In the case of of_match_ptr it also prevents use of PRP0001 ACPI based identification. In this particular case we have a valid ACPI/PNP ID that I am assuming was issued by Analog Devices. That should be used in preference to PRP0001 but doesn't mean we should prevent that route. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20200910173242.621168-11-jic23@kernel.org
2020-09-21iio:dac:ad5446: Drop of_match_ptr and CONFIG_OF protectionsJonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20200910173242.621168-10-jic23@kernel.org
2020-09-21iio:potentiometer:mcp4531: Drop of_match_ptr and CONFIG_OF protections.Jonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Also switch to device_get_match_data() from of_ variant and adjust headers to reflect the change. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/20200910173242.621168-9-jic23@kernel.org
2020-09-21iio:potentiometer:mcp4131: Drop of_match_ptr and use generic fw interfaces.Jonathan Cameron
This change allows the use of the driver with ACPI via PRP0001 and remove an example of an anti pattern I'm trying to remove from IIO. Also adjust includes to reflect this change. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Slawomir Stepien <sst@poczta.fm> Link: https://lore.kernel.org/r/20200910173242.621168-8-jic23@kernel.org
2020-09-21iio:potentiometer:mcp4018: Drop of_match_ptr and CONFIG_OF protections.Jonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Also use device_get_match_data() rather than devicetree only version. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/20200910173242.621168-7-jic23@kernel.org
2020-09-21iio:potentiometer:max5481: Drop invalid ACPI binding.Jonathan Cameron
Given that an ACPI binding must start with 3 or 4 capitals, this cannot represent a valid binding. It seems unlikely anything out there is using it. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Maury Anderson <maury.anderson@rockwellcollins.com> Cc: Matthew Weber <matthew.weber@rockwellcollins.com> Cc: Slawomir Stepien <sst@poczta.fm> Link: https://lore.kernel.org/r/20200910173242.621168-6-jic23@kernel.org
2020-09-21iio:potentiometer:max5481: Drop of_match_ptr and CONFIG_OF protections.Jonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Whilst this driver has an ACPI binding, it is not of a form that is valid under ACPI so will be dropped shortly. Also switch to device_get_match_data() and switch headers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Maury Anderson <maury.anderson@rockwellcollins.com> Cc: Matthew Weber <matthew.weber@rockwellcollins.com> Cc: Slawomir Stepien <sst@poczta.fm> Link: https://lore.kernel.org/r/20200910173242.621168-5-jic23@kernel.org
2020-09-21iio:potentiometer:max5432: Drop of_match_ptr and use generic fw accessorsJonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Drop them to remove this restriction. Also switch headers to reflect this change. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20200910173242.621168-4-jic23@kernel.org
2020-09-17iio:potentiometer:ds1803: Drop of_match_ptr and CONFIG_OF protectionsJonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Drop them to remove this restriction. Also switch of.h for mod_devicetable.h include given use of struct of_device_id which is defined in that header. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Slawomir Stepien <sst@poczta.fm> Link: https://lore.kernel.org/r/20200910173242.621168-3-jic23@kernel.org
2020-09-17iio:potentiometer:ad5272: Drop of_match_ptr and CONFIG_OF protections.Jonathan Cameron
These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Drop them to remove this restriction. Also added mod_devicetable.h include given use of struct of_device_id which is defined in that header. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Phil Reid <preid@eletromag.com.au> Link: https://lore.kernel.org/r/20200910173242.621168-2-jic23@kernel.org
2020-09-17iio:imu:adis16400: Sort out missing kernel doc.Jonathan Cameron
I'd like to be enable W=1 for all IIO builds as it catches real issues as well as more minor documentation issues such as this (also good to fix though!) drivers/iio/imu/adis16400.c:183: warning: Function parameter or member 'avail_scan_mask' not described in 'adis16400_state' Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Cc: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200913132115.800131-2-jic23@kernel.org
2020-09-17iio: buffer: split buffer sysfs creation to take buffer as primary argAlexandru Ardelean
Currently the iio_buffer_{alloc,free}_sysfs_and_mask() take 'indio_dev' as primary argument. This change splits the main logic into a private function that takes an IIO buffer as primary argument. That way, the functions can be extended to configure the sysfs for multiple buffers. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200917125951.861-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adc: meson-saradc: Make the of_device_id array style consistentMartin Blumenstingl
Use only one line for the closing bracket of the last entry and the opening bracket for the next one to keep the style across the whole array consistent. Also add a "sentinel" comment to the last entry and remove the comma to ensure that there won't be any entry after it. No functional changes. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20200915192621.13202-1-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup()Alexandru Ardelean
The proper error code should be ENODEV (vs EINVAL) in case the chip ID isn't recognized. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200916082221.72851-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adc: ad9467: refine mismatch vs unknown chip-id messagesAlexandru Ardelean
We should probably print what the expected chip-ID is. We already have that information available, based on the device specified via device-tree. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200916083128.73729-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16staging:iio:documentation: Drop most generic docsJonathan Cameron
These docs are both suffering from being out of date, and from being superceeded by the documentation in Documentation/driver-api/iio Note the inkern.txt drop is left for now as this is an area not well covered by the more recent documentation outside staging. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200905174721.216452-5-jic23@kernel.org
2020-09-16staging:iio:light: drop stale ABI docsJonathan Cameron
There are no remaining light drivers in staging/iio. The content of this file are either included in the non staging ABI docs, or don't seem to be used in any current driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200905174721.216452-4-jic23@kernel.org
2020-09-16staging:iio:light: Move tsl2x7x ABI docs to correct location.Jonathan Cameron
These seem to be up to date but never moved out of staging when the driver did. Hence let us move them out now. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Brian Masney <masneyb@onstation.org> Cc: Brian Masney <masneyb@onstation.org> Link: https://lore.kernel.org/r/20200905174721.216452-3-jic23@kernel.org
2020-09-16staging:iio:dac:max517 remove documentationJonathan Cameron
Whilst there is some useful info in here, it can be easily obtained from datasheets. Some of the info should perhaps be incorporated into a device tree bindings doc. As this didn't move out of staging with the driver, I'm suggesting we just drop it. We don't generally carry per driver documentation with the exception of non standard ABI which is not the case here. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Roland Stigge <stigge@antcom.de> Link: https://lore.kernel.org/r/20200905174721.216452-2-jic23@kernel.org
2020-09-16iio: adc: palmas_gpadc: use module_platform_driver to simplify the codeLiu Shixin
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20200914065401.3726354-1-liushixin2@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis: Drop non Managed device functionsNuno Sá
Drop `adis_setup_buffer_and_trigger()`. All users were updated to use the devm version of this function. This avoids having almost the same code repeated. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-11-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16staging: iio: adis16240: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-10-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16staging: iio: adis16203: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-9-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16480: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-8-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16460: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-7-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16400: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-6-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16260: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16136: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16209: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: adis16201: Use Managed device functionsNuno Sá
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: frequency: adf4350: Replace indio_dev->mlock with own device lockSergiu Cuciurean
As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock. The lock protect the state of the device from potential concurrent writes. The device is configured via a sequence of SPI writes, and this lock is meant to prevent the start of another sequence before another one has finished. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200916092731.77220-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: dac: ti-dac7612: Replace indio_dev->mlock with own device lockSergiu Cuciurean
As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state from potential concurrent write accesses from userspace. The write operation requires an SPI write, then toggling of a GPIO, so the lock aims to protect the sanity of the entire sequence of operation. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200916092535.76527-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16iio: stm32-dac: Replace indio_dev->mlock with own device lockSergiu Cuciurean
As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock. The lock protects against potential races when reading the CR reg and then updating, so that the state of pm_runtime is consistent between the two operations. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@st.com> Link: https://lore.kernel.org/r/20200916092349.75647-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-13iio: gyro: adxrs290: Add debugfs register access supportNishant Malpani
Extend support to read/write byte data from/to the device using debugfs iio interface. Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200910180450.29696-4-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-13iio: gyro: adxrs290: Add triggered buffer supportNishant Malpani
Provide a way for continuous data capture by setting up buffer support. The data ready signal exposed at the SYNC pin of the ADXRS290 is exploited as a hardware interrupt which triggers to fill the buffer. Triggered buffer setup was tested with both hardware trigger (DATA_RDY) and software triggers (sysfs-trig & hrtimer). Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200910180450.29696-2-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-13iio: gyro: adxrs290: use hook for devm resource unwindingNishant Malpani
Make use of devm_add_action_or_reset() hook to switch device into STANDBY mode during standard resource unwinding. The patch includes a helper function, in the form of adxrs290_set_mode(), to realise driving the device into STANDBY mode. Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200910122711.16670-1-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-13iio: adc: stm32: Fix missing return in booster error pathKrzysztof Kozlowski
Conversion of error paths to dev_err_probe() dropped one return statement. The driver will continue to probe if getting booster regulator fails. Fixes: ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/1599727927-7776-1-git-send-email-krzk@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-13iio: light: as73211: Increase measurement timeoutChristian Eggers
We found some sensors which are much slower (20% at room temperature) than nominal. According to the data sheet, up to 27% is possible. Now I add 33% to the nominal time out, hopefully this is enough. Signed-off-by: Christian Eggers <ceggers@arri.de> Link: https://lore.kernel.org/r/20200909154439.10308-1-ceggers@arri.de Fixes: 403e5586b52e ("iio: light: as73211: New driver") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-13iio: temperature: mlx90632: Interface to change object ambient temperatureCrt Mori
Since object temperature might be different than the sensor temperature the infrared sensors should provide an interface to inject ambient temperature. This was in past done via write to ambient temperature interface (in_temp_ambient_raw), but I think most people did not know about it. This solution introduces a new iio type of the CALIBAMBIENT which is hopefully more descriptive and more explicit about the purpose and capabilities of the sensors. Signed-off-by: Crt Mori <cmo@melexis.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200906210231.383976-1-cmo@melexis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-06iio: sx9310: Prefer async probeDouglas Anderson
On one board I found that: probe of 5-0028 returned 1 after 259547 usecs While some of this time is attributable to the pile of i2c transfers that we do at probe time, the lion's share (over 200 ms) is sitting waiting in the polling loop in sx9310_init_compensation() waiting for the hardware to indicate that it's done. There's no reason to block probe of all other devices on our probe. Turn on async probe. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Daniel Campello <campello@chromium.org> Link: https://lore.kernel.org/r/20200901081920.v2.1.Id02b2f451b3eed71ddd580f4b8b44b3e33e84970@changeid Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-06iio: adc: rockchip_saradc: Allow compile-testing with !ARMAlex Dewar
There seems no reason to allow for compile-testing on ARM only, so remove this restriction. Build-tested with allyesconfig on x86. Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20200904170416.16061-1-alex.dewar90@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>