Jonathan Cameron [Thu, 10 Sep 2020 17:32:29 +0000 (18:32 +0100)]
iio:chemical:atlas-sensor: Drop of_match_ptr and use generic fw accessors
of_match_ptr() 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 and use generic fw accessors to check
if there is a fw_node and get the id.
It might be neater to use pointers rather than indexes for
the device_data but that is another issue and should be handled
separately.
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-26-jic23@kernel.org
Jonathan Cameron [Thu, 10 Sep 2020 17:32:28 +0000 (18:32 +0100)]
iio:chemical:ams-iaq-core: Drop of_match_ptr protection
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>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20200910173242.621168-25-jic23@kernel.org
Jonathan Cameron [Thu, 10 Sep 2020 17:32:27 +0000 (18:32 +0100)]
iio:resolver:ad2s1200: Drop of_match_ptr protection
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>
Link: https://lore.kernel.org/r/20200910173242.621168-24-jic23@kernel.org
Jonathan Cameron [Thu, 10 Sep 2020 17:32:26 +0000 (18:32 +0100)]
iio:temperature:tmp007: Drop of_match_ptr protection
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: Manivannan Sadhasivam <manivannanece23@gmail.com>
Link: https://lore.kernel.org/r/20200910173242.621168-23-jic23@kernel.org
Jonathan Cameron [Thu, 10 Sep 2020 17:32:25 +0000 (18:32 +0100)]
iio:temperature:tsys01: Drop of_match_ptr protection
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-22-jic23@kernel.org
Jonathan Cameron [Thu, 10 Sep 2020 17:32:24 +0000 (18:32 +0100)]
iio:pressure:zpa2326: Drop of_match_ptr protection
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: Gregor Boirie <gregor.boirie@parrot.com>
Link: https://lore.kernel.org/r/20200910173242.621168-21-jic23@kernel.org
Jonathan Cameron [Thu, 10 Sep 2020 17:32:23 +0000 (18:32 +0100)]
iio:pressure:ms5637: Drop of_match_ptr protection
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:22 +0000 (18:32 +0100)]
iio:pressure:ms5611: Drop of_match_ptr and CONFIG_OF protections
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:21 +0000 (18:32 +0100)]
iio:pressure:icp10100: Drop of_match_ptr and CONFIG_OF protections
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:20 +0000 (18:32 +0100)]
iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessors
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:19 +0000 (18:32 +0100)]
iio:dac:ti-
dac5571: Drop of_match_ptr and CONFIG_OF protections
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:18 +0000 (18:32 +0100)]
iio:dac:ti-dac082s085: Drop of_match_ptr and CONFIG_OF protections
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:17 +0000 (18:32 +0100)]
iio:dac:mcp4725: drop of_match_ptr and use generic fw properties
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:16 +0000 (18:32 +0100)]
iio:dac:ad7303: Drop of_match_ptr protection
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:15 +0000 (18:32 +0100)]
iio:dac:ad5593r: Drop of_match_ptr and ACPI_PTR protections.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:14 +0000 (18:32 +0100)]
iio:dac:ad5592r: Drop of_match_ptr and ACPI_PTR protections.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:13 +0000 (18:32 +0100)]
iio:dac:ad5446: Drop of_match_ptr and CONFIG_OF protections
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:12 +0000 (18:32 +0100)]
iio:potentiometer:mcp4531: Drop of_match_ptr and CONFIG_OF protections.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:11 +0000 (18:32 +0100)]
iio:potentiometer:mcp4131: Drop of_match_ptr and use generic fw interfaces.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:10 +0000 (18:32 +0100)]
iio:potentiometer:mcp4018: Drop of_match_ptr and CONFIG_OF protections.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:09 +0000 (18:32 +0100)]
iio:potentiometer:max5481: Drop invalid ACPI binding.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:08 +0000 (18:32 +0100)]
iio:potentiometer:max5481: Drop of_match_ptr and CONFIG_OF protections.
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:07 +0000 (18:32 +0100)]
iio:potentiometer:max5432: Drop of_match_ptr and use generic fw accessors
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:06 +0000 (18:32 +0100)]
iio:potentiometer:ds1803: Drop of_match_ptr and CONFIG_OF protections
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
Jonathan Cameron [Thu, 10 Sep 2020 17:32:05 +0000 (18:32 +0100)]
iio:potentiometer:ad5272: Drop of_match_ptr and CONFIG_OF protections.
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
Jonathan Cameron [Sun, 13 Sep 2020 13:21:13 +0000 (14:21 +0100)]
iio:imu:adis16400: Sort out missing kernel doc.
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
Alexandru Ardelean [Thu, 17 Sep 2020 12:59:51 +0000 (15:59 +0300)]
iio: buffer: split buffer sysfs creation to take buffer as primary arg
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>
Martin Blumenstingl [Tue, 15 Sep 2020 19:26:21 +0000 (21:26 +0200)]
iio: adc: meson-saradc: Make the of_device_id array style consistent
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>
Alexandru Ardelean [Wed, 16 Sep 2020 08:22:21 +0000 (11:22 +0300)]
iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup()
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>
Alexandru Ardelean [Wed, 16 Sep 2020 08:31:28 +0000 (11:31 +0300)]
iio: adc: ad9467: refine mismatch vs unknown chip-id messages
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>
Jonathan Cameron [Sat, 5 Sep 2020 17:47:21 +0000 (18:47 +0100)]
staging:iio:documentation: Drop most generic docs
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
Jonathan Cameron [Sat, 5 Sep 2020 17:47:20 +0000 (18:47 +0100)]
staging:iio:light: drop stale ABI docs
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
Jonathan Cameron [Sat, 5 Sep 2020 17:47:19 +0000 (18:47 +0100)]
staging:iio:light: Move tsl2x7x ABI docs to correct location.
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
Jonathan Cameron [Sat, 5 Sep 2020 17:47:18 +0000 (18:47 +0100)]
staging:iio:dac:max517 remove documentation
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
Liu Shixin [Mon, 14 Sep 2020 06:54:01 +0000 (14:54 +0800)]
iio: adc: palmas_gpadc: use module_platform_driver to simplify the code
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:58 +0000 (14:02 +0200)]
iio: adis: Drop non Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:57 +0000 (14:02 +0200)]
staging: iio: adis16240: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:56 +0000 (14:02 +0200)]
staging: iio: adis16203: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:55 +0000 (14:02 +0200)]
iio: adis16480: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:54 +0000 (14:02 +0200)]
iio: adis16460: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:53 +0000 (14:02 +0200)]
iio: adis16400: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:52 +0000 (14:02 +0200)]
iio: adis16260: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:51 +0000 (14:02 +0200)]
iio: adis16136: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:50 +0000 (14:02 +0200)]
iio: adis16209: Use Managed device functions
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>
Nuno Sá [Tue, 15 Sep 2020 12:02:49 +0000 (14:02 +0200)]
iio: adis16201: Use Managed device functions
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>
Krzysztof Kozlowski [Thu, 10 Sep 2020 16:19:33 +0000 (18:19 +0200)]
dt-bindings: iio: adc: exynos-adc: do not require syscon on S5Pv210
The ADC in S5Pv210 does not have ADC phy registers in separate block for
which syscon would be needed. Remove this requirement to fix dtbs_check
warnings like:
arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: adc@
e1700000: 'samsung,syscon-phandle' is a required property
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huwei.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200910161933.9156-2-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Thu, 10 Sep 2020 16:19:32 +0000 (18:19 +0200)]
dt-bindings: iio: adc: exynos-adc: require second interrupt with touch screen
The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
screen. In such case the second interrupt is required. This second
interrupt can be anyway provided, even without touch screens. This
fixes dtbs_check warnings like:
arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@
e1700000: interrupts: [[23], [24]] is too long
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huwei.com>
Link: https://lore.kernel.org/r/20200910161933.9156-1-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 30 Aug 2020 16:11:54 +0000 (17:11 +0100)]
dt-bindings: iio: adc: ti,ads7950 binding conversion
Conversion from txt to yaml. The binding documents that
as not all boards will make use of the ADC channels via a consumer
driver. It does no harm however, so we will leave it as required.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: David Lechner <david@lechnology.com>
Cc: David Lechner <david@lechnology.com>
Link: https://lore.kernel.org/r/20200830161154.3201-3-jic23@kernel.org
Jonathan Cameron [Sun, 30 Aug 2020 16:11:53 +0000 (17:11 +0100)]
dt-bindings: iio: adc: ti,
adc12138 yaml conversion.
Simple binding conversion from txt to yaml.
Only addition was #io-channel-cells to allow for potential consumers
of the channels on this device.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/20200830161154.3201-2-jic23@kernel.org
Sergiu Cuciurean [Wed, 16 Sep 2020 09:27:31 +0000 (12:27 +0300)]
iio: frequency:
adf4350: Replace indio_dev->mlock with own device lock
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>
Sergiu Cuciurean [Wed, 16 Sep 2020 09:25:35 +0000 (12:25 +0300)]
iio: dac: ti-
dac7612: Replace indio_dev->mlock with own device lock
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>
Sergiu Cuciurean [Wed, 16 Sep 2020 09:23:49 +0000 (12:23 +0300)]
iio: stm32-dac: Replace indio_dev->mlock with own device lock
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>
Nishant Malpani [Thu, 10 Sep 2020 18:04:50 +0000 (23:34 +0530)]
iio: gyro: adxrs290: Add debugfs register access support
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>
Nishant Malpani [Thu, 10 Sep 2020 18:04:49 +0000 (23:34 +0530)]
dt-bindings: iio: gyro: adxrs290: Add interrupts support
Include 'interrupts' property and provide a suitable example for using
a GPIO interrupt line.
Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
Link: https://lore.kernel.org/r/20200910180450.29696-3-nish.malpani25@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nishant Malpani [Thu, 10 Sep 2020 18:04:48 +0000 (23:34 +0530)]
iio: gyro: adxrs290: Add triggered buffer support
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>
Nishant Malpani [Thu, 10 Sep 2020 12:27:11 +0000 (17:57 +0530)]
iio: gyro: adxrs290: use hook for devm resource unwinding
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>
Krzysztof Kozlowski [Thu, 10 Sep 2020 08:52:07 +0000 (10:52 +0200)]
iio: adc: stm32: Fix missing return in booster error path
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>
Christian Eggers [Wed, 9 Sep 2020 15:44:39 +0000 (17:44 +0200)]
iio: light: as73211: Increase measurement timeout
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>
Crt Mori [Sun, 6 Sep 2020 21:02:31 +0000 (23:02 +0200)]
iio: temperature: mlx90632: Interface to change object ambient temperature
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>
Krzysztof Kozlowski [Thu, 3 Sep 2020 18:19:26 +0000 (20:19 +0200)]
MAINTAINERS: Move Hartmut Knaack to Credits
Hartmut Knaack was an active reviewer and contributor to the IIO
subsystem and drivers. However his last message on LKML is from
October 2015.
In thanks for Hartmut's effort, move him name to the Credits.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>
Link: https://lore.kernel.org/r/20200903181926.5606-2-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Thu, 3 Sep 2020 18:19:25 +0000 (20:19 +0200)]
MAINTAINERS: Consolidate Analog Devices IIO entries and remove Beniamin Bia
Emails to Beniamin Bia bounce with no such address so remove him from
maintainers. After this removal, many entries for Analog Devices Inc
IIO drivers look exactly the same so consolidate them.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>
Link: https://lore.kernel.org/r/20200903181926.5606-1-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Douglas Anderson [Tue, 1 Sep 2020 15:19:43 +0000 (08:19 -0700)]
iio: sx9310: Prefer async probe
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>
Alex Dewar [Fri, 4 Sep 2020 17:04:16 +0000 (18:04 +0100)]
iio: adc: rockchip_saradc: Allow compile-testing with !ARM
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>
kernel test robot [Tue, 1 Sep 2020 18:30:07 +0000 (19:30 +0100)]
drivers/iio/humidity/hdc2010.c:305:2-3: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Fixes:
0115a63c9993 ("iio: humidity: Add TI HDC20x0 support")
CC: Eugene Zaikonnikov <ez@norphonic.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:13 +0000 (12:08 +0300)]
iio: accel: bma220: Remove unneeded blank lines
There are few blank lines that split structure definitions
with their users. Remove them to increase readability.
While here, update copyright year.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:12 +0000 (12:08 +0300)]
iio: accel: bma220: Use BIT() and GENMASK() macros
Code is better to read when numbers of bit are explicitly used.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:11 +0000 (12:08 +0300)]
iio: accel: bma220: Group IIO headers together
Group IIO headers together and follow the common pattern of header inclusion,
i.e. more generic first.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:10 +0000 (12:08 +0300)]
iio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery
The driver is quite likely used only on ACPI based platforms and
rarely build with CONFIG_ACPI=n. Even though, the few dozens of bytes
is better than ugly ifdeffery and inclusion of heavy header.
As a result, replace acpi.h with mod_devicetable.h.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:09 +0000 (12:08 +0300)]
iio: accel: bma220: Mark PM functions as __maybe_unused
Instead of using ugly ifdeffery, mark PM functions as __maybe_unused.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:08 +0000 (12:08 +0300)]
iio: accel: bma220: Use dev_get_drvdata() directly
Instead of using to_spi_dev() + spi_get_drvdata(),
use dev_get_drvdata() to make code simpler.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:07 +0000 (12:08 +0300)]
iio: accel: bma220: Convert to use ->read_avail()
Convert to use ->read_avail() instead of open-coded attribute handling.
While here, fix the typo in array definition and append comma in case of
the future extension.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Andy Shevchenko [Mon, 31 Aug 2020 09:08:06 +0000 (12:08 +0300)]
iio: accel: bma220: Fix returned codes from bma220_init(), bma220_deinit()
Potentially bma220_init() and bma220_deinit() may return positive codes.
Fix the logic to return proper error codes instead.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 9 Aug 2020 11:17:41 +0000 (12:17 +0100)]
dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
Drops the deprecated compatibles without the vendor name.
Whilst the driver continues to support these for old dt blobs,
any dt bindings that are actuallly verified against this document should
be fixed to add the vendor name.
Added the #io-channel-cells property to allow for consumers.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Oskar Andero <oskar.andero@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-2-jic23@kernel.org
Alexandru Ardelean [Wed, 26 Aug 2020 05:20:11 +0000 (07:20 +0200)]
iio: buffer-dmaengine: adjust `bytes_used` with residue info
A transfer may fall shorter than the bytes in the block.
This information is available in the residue from the DMA engine, so we can
compute actual `bytes_used` with that by subtracting the residue.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20200826052011.13348-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 9 Aug 2020 11:17:53 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,tlc4541 binding conversion
Simple binding so easy to convert.
Dropped the stated value of maximum spi bus frequency as it does
not seem to correspond to the datasheet. The value of 200kHz
is the max sampling frequency of the ADC, not the clock frequency of
the SPI bus.
Added #io-channel-cells to allow use as a provider of channels to
other devices via the consumer binding.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-By: Phil Reid <preid@electromag.com.au>
Cc: Phil Reid <preid@electromag.com.au>
Link: https://lore.kernel.org/r/20200809111753.156236-14-jic23@kernel.org
Phil Reid [Sun, 9 Aug 2020 11:17:52 +0000 (12:17 +0100)]
dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc
JC: Seems that I messed up applying the original driver patches, and
this file never actually made it into the tree.
I have picked up original Ack and Sign-off so as to record the
history.
Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200809111753.156236-13-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:51 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,ads8344 yaml conversion
Simple binding so easy to convert.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200809111753.156236-12-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:49 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc128s052 yaml conversion.
Simple binding. Only addition to txt version is
as a provider of channels to other devices using the consumer
binding.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-10-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:46 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,
adc0832 yaml conversion.
Simple binding conversion of this SPI ADC binding, with reference
voltage.
Added the optional property #io-channel-cells to allow for
consumers of channels if that makes sense for a given board.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-7-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:45 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
Simple conversion for this ADC driver. Note that I haven't put
limits on the spi-max-sampling-frequency because the adc161s626
doesn't state one clearly defined value.
Added the #io-channel-cells property to allow for consumers.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20200809111753.156236-6-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:44 +0000 (12:17 +0100)]
dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
Very simple binding for this i2c device with a reference supply.
Added the #io-channel-cells property to allow for consumers.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20200809111753.156236-5-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:43 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc108s102 yaml conversion
Very simple conversion of spi device with reference supply.
Added the #io-channel-cells property to allow for consumers.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Link: https://lore.kernel.org/r/20200809111753.156236-4-jic23@kernel.org
Jonathan Cameron [Sun, 9 Aug 2020 11:17:42 +0000 (12:17 +0100)]
dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.
These i2c devices have simple bindings, well described by trivial-device.yaml
so rather than convert the binding doc to yaml, let us just add them to
trivial devices and drop the old binding document.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-3-jic23@kernel.org
Alexandru Tachici [Mon, 10 Aug 2020 09:32:57 +0000 (12:32 +0300)]
iio: accel: adxl372: Add additional trigger ABI docs
Document use of additional trigger supplied by driver.
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20200810093257.65929-3-alexandru.tachici@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stefan Popa [Mon, 10 Aug 2020 09:32:56 +0000 (12:32 +0300)]
iio: accel: adxl372: Add support for FIFO peak mode
By default, if all three channels (x, y, z) are enabled, sample sets of
concurrent 3-axis data is stored in the FIFO. This patch adds the option
to configure the FIFO to store peak acceleration (x, y and z) of every
over-threshold event. When pushing to iio buffer we push only enabled
axis data.
Currently the driver configures adxl372 to work in loop mode.
The inactivity and activity timings decide how fast the chip
will loop through the awake and waiting states and the
thresholds on x,y,z axis decide when activity or inactivity
will be detected.
This patch adds standard events sysfs entries for the inactivity
and activity timings: thresh_falling_period/thresh_rising_period
and for the in_accel_x_thresh_falling/rising_value.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20200810093257.65929-2-alexandru.tachici@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Crt Mori [Tue, 18 Aug 2020 21:37:37 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Some stylefixing leftovers
There is some inconsistency and whitespace cleanup performed in this
patch. It was done on top of my other patches, but I can rebase to head
of the togreg branch if it would go in sooner.
Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-6-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Crt Mori [Tue, 18 Aug 2020 21:37:36 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Adding extended calibration option
For some time the market wants medical grade accuracy in medical range,
while still retaining the declared accuracy outside of the medical range
within the same sensor. That is why we created extended calibration
which is automatically switched to when object temperature is too high.
This patch also introduces the object_ambient_temperature variable which
is needed for more accurate calculation of the object infra-red
footprint as sensor's ambient temperature might be totally different
than what the ambient temperature is at object and that is why we can
have some more errors which can be eliminated. Currently this temperature
is fixed at 25, but the interface to adjust it by user (with external
sensor or just IR measurement of the other object which acts as ambient),
will be introduced in another commit.
Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-5-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Crt Mori [Tue, 18 Aug 2020 21:37:35 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Convert polling while loop to regmap
Reduce number of lines and improve readability to convert polling while
loops to regmap_read_poll_timeout.
Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-4-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Crt Mori [Tue, 18 Aug 2020 21:37:34 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Add kerneldoc to the internal struct
Document internal/private struct for mlx90632 device.
Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-3-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Crt Mori [Tue, 18 Aug 2020 21:37:33 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Reduce number of equal calulcations
TAdut4 was calculated each iteration although it did not change. In light
of near future additions of the Extended range DSP calculations, this
function refactoring will help reduce unrelated changes in that series as
well as reduce the number of new functions needed.
Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-2-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Nishant Malpani [Tue, 25 Aug 2020 12:45:52 +0000 (18:15 +0530)]
iio: gyro: adxrs290: Insert missing mutex initialization call
Insert a missing mutex_init() call during the probe that initializes
the driver's local lock to unlocked state.
Fixes:
2c8920fff145 ("iio: gyro: Add driver support for ADXRS290")
Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
Link: https://lore.kernel.org/r/20200825124552.11155-1-nish.malpani25@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gwendal Grignou [Fri, 28 Aug 2020 23:31:55 +0000 (16:31 -0700)]
docs: abi: iio: Use What: consistently
Change "[w|W]hat[:| ]" to What: for consistency.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20200828233156.2264689-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:26 +0000 (08:47 +0200)]
iio: multiplexer: iio-mux: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20200829064726.26268-18-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:25 +0000 (08:47 +0200)]
iio: magnetometer: mag3110: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-17-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:24 +0000 (08:47 +0200)]
iio: magnetometer: ak8974: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200829064726.26268-16-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:23 +0000 (08:47 +0200)]
iio: light: tsl2772: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-15-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:22 +0000 (08:47 +0200)]
iio: light: isl29018: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-14-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:21 +0000 (08:47 +0200)]
iio: imu: inv_mpu6050: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Link: https://lore.kernel.org/r/20200829064726.26268-13-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:20 +0000 (08:47 +0200)]
iio: dac: dpot-dac: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20200829064726.26268-12-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:19 +0000 (08:47 +0200)]
iio: chemical: scd30: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Tomasz Duszynski <tomasz.duszynski@octakon.com>
Link: https://lore.kernel.org/r/20200829064726.26268-11-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>