- 21 Sep, 2020 40 commits
-
-
Jonathan Cameron authored
This binding has a few corners that would have been done different today but hopefully the yaml schema captures the constraints correctly. The child node names are not constrained hence the fairly open regexp. I've also documented the defaults for the two references that the driver seems to use and copied the value descriptions from the header because I think they should be in the dt-binding itself. This is part of a general effort to convert all the IIO bindings over to yaml Unfortunately I don't have a current address for Markus, so have put myself as the maintainer for this binding until someone else steps up! Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20200909175946.395313-21-jic23@kernel.org
-
Jonathan Cameron authored
A nice simple binding. Only real different from txt is that I dropped some descriptions where the naming of the parameter was self explanatory Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Haibo Chen <haibo.chen@nxp.com> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20200909175946.395313-20-jic23@kernel.org
-
Jonathan Cameron authored
This binding was moved over from hwmon some time ago so is a bit unusual in terms of IIO bindings. However, conversion was fairly straight forwards. I've listed both Dirk (who think wrote original binding) and Daniel who added the IIO driver for this device. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20200909175946.395313-17-jic23@kernel.org
-
Jonathan Cameron authored
I don't really know much about this one, hence the binding is a simple conversion of what was in the txt file. Note that I have taken on maintenance of this binding as I don't have a recent address for Phani Movva. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200909175946.395313-14-jic23@kernel.org
-
Jonathan Cameron authored
Renamed the file to reflect the only compatible. Added #io-channel-cells to make it easier to support consumers of the ADC channels this device provides. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Tomer Maimon <tmaimon77@gmail.com> Link: https://lore.kernel.org/r/20200909175946.395313-9-jic23@kernel.org
-
Jonathan Cameron authored
A simple conversion from txt file to yaml. I added the #io-channel-cells property as optional to allow the channels of this ADCs to be used to provide services to other drivers, for example if an analog accelerometer is connected. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20200909175946.395313-8-jic23@kernel.org
-
Jonathan Cameron authored
I changed the name to reflect a specific part in line with normal naming conventions. If there is a particularly strong reason to keep the wild cards let me know. Otherwise this was a fairly simple conversion as part of converting all the IIO bindings to yaml. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Orson Zhai <orsonzhai@gmail.com> Cc: Baolin Wang <baolin.wang7@gmail.com> Cc: Chunyan Zhang <zhang.lyra@gmail.com> Link: https://lore.kernel.org/r/20200909175946.395313-7-jic23@kernel.org
-
Jonathan Cameron authored
Part of a general move of IIO bindings over to yaml. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Antoine Tenart <antoine.tenart@free-electrons.com> Link: https://lore.kernel.org/r/20200909175946.395313-6-jic23@kernel.org
-
Jonathan Cameron authored
Simple txt to yaml conversion. Part of a general move to convert all the IIO bindings over to yaml. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Joel Stanley <joel@jms.id.au> Cc: Rick Altherr <raltherr@google.com> Cc: Joel Stanley <joel@jms.id.au> Cc: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20200909175946.395313-5-jic23@kernel.org
-
Jonathan Cameron authored
Conversion from freeform text to yaml. One oddity in this binding is that, for historical reasons it requires the node name to be stmpe_adc. I've put that in the decription field but I'm not sure if there is a better way to specify this? Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Stefan Agner <stefan@agner.ch> Link: https://lore.kernel.org/r/20200909175946.395313-4-jic23@kernel.org
-
Jonathan Cameron authored
Conversion from txt to yaml as part of a general move of IIO bindings to the new format. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Sebastian Reichel <sre@kernel.org> Link: https://lore.kernel.org/r/20200909175946.395313-3-jic23@kernel.org
-
Jonathan Cameron authored
A simple conversion of this freescale ADC binding from txt to yaml. For maintainer I went with Fugang Duan as the original author of the binding. Would be great to have confirmation of this. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Fugang Duan <fugang.duan@nxp.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20200909175946.395313-2-jic23@kernel.org
-
Mario Tesi authored
Scaling factor values for Acc lead to an unacceptable rounding of the full scale (FS) calculated by some SensorHAL on Android devices. For examples setting FS to 4g the in_accel_x_scale, in_accel_y_scale and in_accel_z_scale are 0.001196 on 6 decimal digits and the FS is 0.001196 × ((2^15) − 1) ~= 39.1893 m/s^2. Android CTS R10 SensorParameterRangeTest test expects a value greater than 39.20 m/s^2 so this test fails (ACCELEROMETER_MAX_RANGE = 4 * 9.80). Using 9 decimal digits the new scale factor is 0.001196411 and the FS now is 0.001196411 × ((2^15)−1) ~= 39.2028 m/s^2. This patch extends to IIO_VAL_INT_PLUS_NANO type the scaling factor to all IMU devices where SensorParameterRangeTest CTS test fails. Signed-off-by: Mario Tesi <mario.tesi@st.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/1600361236-2285-1-git-send-email-martepisa@gmail.com
-
Nuno Sá authored
As there are no users anymore of this structure, it can be safely removed. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200917155223.218500-5-nuno.sa@analog.com
-
Nuno Sá authored
Burst mode variables are now part of the `adis_data` struct. The driver also has now to explicitly define the length of the burst buffer. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200917155223.218500-4-nuno.sa@analog.com
-
Nuno Sá authored
Burst mode variables are now part of the `adis_data` struct. The driver also has now to explicitly define the length of the burst buffer. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200917155223.218500-3-nuno.sa@analog.com
-
Nuno Sá authored
Add burst mode variables in the per device specific data structure. As some drivers support multiple devices with different burst sizes it makes sense this data to be in `adis_data`. While moving the variables, there are two main differences: 1. The `en`variable is dropped. If a device supports burst mode, it will just use it as it will has better performance for almost all real use cases. 2. Replace `extra_len` by `burst_len`. Users should now explicitly define the length of the burst buffer as it is typically constant. This also allows to remove the following line from the library: ``` /* All but the timestamp channel */ burst_length = (indio_dev->num_channels - 1) * sizeof(u16); ``` The library should not assume that a timestamp channel is defined. Moreover, most parts also include some diagnostic data, crc, etc.. in the burst buffer that needed to be included in an `extra_len` variable which is not that nice. On top of this, some devices already start to have some 32bit size channels ... This patch is also a move to completely drop the `struct adis_burst` from the library. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200917155223.218500-2-nuno.sa@analog.com
-
Jonathan Cameron authored
Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced it with that. Should cause no functional change. Fixes: fdadbce0 ("iio: add Bosch BMA180 acceleration sensor driver") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com> Cc: Peter Meerwald <pmeerw@pmeerw.net> Cc: Jonathan Bakker <xc-racer2@live.ca> Link: https://lore.kernel.org/r/20200913121227.764626-1-jic23@kernel.org
-
Jonathan Cameron authored
So it's obvious that the code is wrong in passing true, but I'm assuming that will actually evaluate to 1 and hence IIO_SHARED_BY_TYPE. The documentation however has this attribute as IIO_SHARED_BY_ALL. My current assumption is the documentation is wrong. If anyone knows otherwise please shout out! Fixes: 7247645f ("iio: hmc5843: Move hmc5843 out of staging") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Link: https://lore.kernel.org/r/20200913112546.715624-1-jic23@kernel.org
-
Jonathan Cameron authored
A partial set of these was added to IIO a long time back. This fills in some gaps in coverage highlighted by building with W=1 Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200913132115.800131-3-jic23@kernel.org
-
Jonathan Cameron authored
One comment isn't kernel-doc at all, but starts with /** and another is simply missing a parameter that was introduced recently. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200913132115.800131-4-jic23@kernel.org
-
Alexandru Ardelean authored
Since there was a recently discovered issue with these locks, it probably makes sense to cleanup the code a bit, to prevent it from being used as an example/reference. This change moves the lock only where it is explicitly needed to protect resources from potential concurrent accesses. It also reworks the switch statements to do direct returns vs caching the return value on a variable. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200706110259.23947-3-alexandru.ardelean@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
The next rework may require an unindentation of a code block in ad5592r_read_raw(), which would make review a bit more difficult. This change unindents the code block for reading the scale of the non-temperature channels. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200706110259.23947-2-alexandru.ardelean@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
struct iio_chan_spec_ext_info shared element is of type enum iio_shared_by, not boolean. It's like the enum value will for IIO_SHARED_BY_TYPE == 1 == true, hence no actual problem has been observed. CC [M] drivers/iio/dac/ad5592r-base.o 491 | .shared = true, | Fixes: 56ca9db8 ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20200722142515.897378-1-jic23@kernel.org
-
Lee Jones authored
Fixes the following W=1 kernel build warning(s): drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Andreas Brauchli <a.brauchli@elementarea.net> Cc: Pascal Sachs <pascal.sachs@sensirion.com> Link: https://lore.kernel.org/r/20200716135928.1456727-6-lee.jones@linaro.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lee Jones authored
Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member 'lock' not described in 'adis16080_state' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Barry Song <21cnbao@gmail.com> Link: https://lore.kernel.org/r/20200716135928.1456727-13-lee.jones@linaro.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lee Jones authored
File headers are not good candidates for kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/iio/dummy/iio_dummy_evgen.c:30: warning: Cannot understand * @regs: irq regs we are faking on line 30 - I thought it was a doc line drivers/iio/dummy/iio_dummy_evgen.c:42: warning: Function parameter or member 'irq_sim_domain' not described in 'iio_dummy_eventgen' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Marc Zyngier <maz@kernel.org> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20200716135928.1456727-16-lee.jones@linaro.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lee Jones authored
Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad7949.c:58: warning: Function parameter or member 'indio_dev' not described in 'ad7949_adc_chip' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Charles-Antoine Couret <charles-antoine.couret@essensium.com> Link: https://lore.kernel.org/r/20200716135928.1456727-18-lee.jones@linaro.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lee Jones authored
Misspelling, missing description. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5064.c:71: warning: bad line: internal vref. drivers/iio/dac/ad5064.c:83: warning: Function parameter or member 'channels' not described in 'ad5064_chip_info' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member 'lock' not described in 'ad5064_state' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200716135928.1456727-20-lee.jones@linaro.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Lee Jones authored
Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vdd_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vref_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'lock' not described in 'ad7303_state' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200716135928.1456727-31-lee.jones@linaro.orgSigned-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, to protect against any other accesses during the reading of sample. Reading a sample requires multiple consecutive regmap operations and a completion callback, so this requires that no other read occurs until it completes. 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/20200916092928.78026-1-alexandru.ardelean@analog.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ivan Drobyshevskyi authored
VL53L0X can be configured to use interrupt pin (GPIO1) to notify host about readiness of new measurement. If interrupt pin is not specified, driver still uses polling. Signed-off-by: Ivan Drobyshevskyi <drobyshevskyi@gmail.com> Link: https://lore.kernel.org/r/20200916074458.873359-2-drobyshevskyi@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Ivan Drobyshevskyi authored
Since IRQ support was added to the driver, update bindings accordingly. Signed-off-by: Ivan Drobyshevskyi <drobyshevskyi@gmail.com> Link: https://lore.kernel.org/r/20200916074458.873359-1-drobyshevskyi@gmail.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Jonathan Cameron authored
This enables use of the driver with ACPI PRP0001 and also removes an antipattern that I am trying to clear out of IIO to avoid it being copied into new drivers. 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-39-jic23@kernel.org
-
Jonathan Cameron authored
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: David Barksdale <dbarksdale@uplogix.com> Link: https://lore.kernel.org/r/20200910173242.621168-38-jic23@kernel.org
-
Jonathan Cameron authored
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-37-jic23@kernel.org
-
Jonathan Cameron authored
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: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200910173242.621168-36-jic23@kernel.org
-
Jonathan Cameron authored
Both would result in only a small size saving. For simplicity it is best to remove them. I also wish to remove both these antipatterns from IIO. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Tested-by: Jonathan Albrieux <jonathan.albrieux@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Jonathan Albrieux <jonathan.albrieux@gmail.com> Link: https://lore.kernel.org/r/20200910173242.621168-35-jic23@kernel.org
-
Jonathan Cameron authored
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-34-jic23@kernel.org
-
Jonathan Cameron authored
This change allows the driver to be used with ACPI PRP0001 and removes an antipattern that I want to avoid being copied into new IIO drivers. 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-33-jic23@kernel.org
-