- 16 Sep, 2020 9 commits
-
-
Nuno Sá authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nuno Sá authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Krzysztof Kozlowski authored
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.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Krzysztof Kozlowski authored
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.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
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 authored
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 authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Sergiu Cuciurean authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Sergiu Cuciurean authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 13 Sep, 2020 7 commits
-
-
Nishant Malpani authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nishant Malpani authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nishant Malpani authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Nishant Malpani authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Krzysztof Kozlowski authored
Conversion of error paths to dev_err_probe() dropped one return statement. The driver will continue to probe if getting booster regulator fails. Fixes: ce30eeb6 ("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.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Christian Eggers authored
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: 403e5586 ("iio: light: as73211: New driver") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Crt Mori authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 06 Sep, 2020 5 commits
-
-
Krzysztof Kozlowski authored
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.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Krzysztof Kozlowski authored
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.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Douglas Anderson authored
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@changeidSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alex Dewar authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
kernel test robot authored
Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 0115a63c ("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>
-
- 03 Sep, 2020 19 commits
-
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
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 authored
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.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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 authored
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
-