Nuno Sa
fe90232d39
iio: imu: kmx61: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-11-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:40 +01:00
Nuno Sa
eec662e374
iio: imu: bno055: make use of iio_get_masklength()
...
Use iio_get_masklength() to access '.masklength' so it can be annotated
as __private when there are no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-10-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:40 +01:00
Nuno Sa
39a1e2f38e
iio: imu: bmi160_core: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-9-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:40 +01:00
Nuno Sa
72933488a2
iio: humidity: am2315: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-8-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:40 +01:00
Nuno Sa
6bf392f296
iio: health: afe4404: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-7-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:40 +01:00
Nuno Sa
4ae1ebaabc
iio: health: max30102: make use of iio_get_masklength()
...
Use iio_get_masklength() to access '.masklength' so it can be annotated
as __private when there are no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-6-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:40 +01:00
Nuno Sa
b7890c7b63
iio: health: afe4403: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-5-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Nuno Sa
05552370dd
iio: dummy: iio_simple_dummy_buffer: use iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-4-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Nuno Sa
d83b1961de
iio: adc: hx711: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-3-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Nuno Sa
b59776720f
iio: adc: dln2-adc: use new '.masklength' accessors
...
Make use of iio_get_masklength) and iio_for_each_active_channel() to
access '.masklength' so it can be annotated as __private when there
are no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-2-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Nuno Sa
6d4e5ffb3c
iio: adc: cc10001_adc: make use of iio_for_each_active_channel()
...
Use iio_for_each_active_channel() to iterate over active channels
accessing '.masklength' so it can be annotated as __private when there are
no more direct users of it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240718-dev-iio-masklength-private2-v1-1-8e12cd042906@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Alisa-Dariana Roman
4718638155
iio: adc: ad7192: Add clock provider
...
Internal clock of AD719X devices can be made available on MCLK2 pin. Add
clock provider to support this functionality when clock cells property
is present.
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com >
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240717212535.8348-5-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Alisa-Dariana Roman
8524782ee7
dt-bindings: iio: adc: ad7192: Add clock provider
...
Internal clock of AD719X devices can be made available on MCLK2 pin. Add
clock provider to support this functionality when clock cells property
is present.
The clock source can be either provided externally or the internal clock
is used. Pair of clocks and clock-names property is mutally exclusive
with #clock-cells property.
Modify second example to showcase the mode where internal clock is used.
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20240717212535.8348-4-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Alisa-Dariana Roman
51b6a71689
iio: adc: ad7192: Update clock config
...
There are actually 4 configuration modes of clock source for AD719X
devices. Either a crystal can be attached externally between MCLK1 and
MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2
pin. The other 2 modes make use of the 4.92MHz internal clock.
Undocumented properties adi,int-clock-output-enable and adi,clock-xtal
still supported for backward compatibility, but their use is highly
discouraged. Use cleaner alternative of configuring external clock by
using clock names mclk and xtal.
Functionality of AD7192_CLK_INT_CO will be implemented in complementary
patch by adding clock provider.
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com >
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240717212535.8348-3-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Alisa-Dariana Roman
fe2e796959
dt-bindings: iio: adc: ad7192: Update clock config
...
There are actually 4 configuration modes of clock source for AD719X
devices. Either a crystal can be attached externally between MCLK1 and
MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2
pin. The other 2 modes make use of the 4.92MHz internal clock.
To configure external clock as either a crystal or a CMOS-compatible
clock, changing the register settings is necessary. Therefore, add clock
name xtal alongside mclk. By selecting one or the other, the register is
configured.
The presence of an external clock source is optional, not required. When
both clocks and clock-names properties are present, an external clock
source is used. If the intention is to use the internal clock, both
properties should be absent. Modify required properties accordingly.
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com >
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20240717212535.8348-2-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Rayyan Ansari
53b53377d6
dt-bindings: iio: magnetometer: bmc150: Document mount-matrix
...
Document the mount-matrix property, which is used in device trees such
as msm8916-samsung-fortuna-common.dtsi, and supported by the driver.
Signed-off-by: Rayyan Ansari <rayyan.ansari@linaro.org >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20240716132512.80337-1-rayyan.ansari@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Marek Vasut
025f23cfeb
iio: light: noa1305: Make integration time configurable
...
Add another attribute which is the integration time. Report available
integration time settings, support read of integration time currently
configured in hardware, and support configuration of integration time
into hardware.
Signed-off-by: Marek Vasut <marex@denx.de >
Link: https://patch.msgid.link/20240715183120.143417-5-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Marek Vasut
98077d34d0
iio: light: noa1305: Report available scale values
...
Make use of the new static table of scale values and expose available
scale values via sysfs attribute of the IIO device.
Signed-off-by: Marek Vasut <marex@denx.de >
Link: https://patch.msgid.link/20240715183120.143417-4-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:39 +01:00
Marek Vasut
968a3bed1c
iio: light: noa1305: Use static table lookup of scale values
...
Move scale values into a static table, perform look up of those
scale values in noa1305_scale() simply by using the integration
time register content as an index, because the integration time
register content directly maps to the table values.
Signed-off-by: Marek Vasut <marex@denx.de >
Link: https://patch.msgid.link/20240715183120.143417-3-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Marek Vasut
dde56b6db4
iio: light: noa1305: Assign val in noa1305_measure()
...
Make noa1305_measure() behave similar to noa1305_scale(), make it
assign the 'val' output variable on success and return IIO_VAL_INT.
This further simplifies noa1305_read_raw() and allows removal of
ret variable altogether.
Signed-off-by: Marek Vasut <marex@denx.de >
Link: https://patch.msgid.link/20240715183120.143417-2-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Marek Vasut
0cef1c3232
iio: light: noa1305: Simplify noa1305_read_raw()
...
The only channel this hardware supports is IIO_LIGHT, if the channel
is anything else, exit right away. The 'ret' variable is now always
only assigned by noa1305_measure(), do not initialize it anymore.
Update function parameter indent. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de >
Link: https://patch.msgid.link/20240715183120.143417-1-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Rayyan Ansari
d5cbe15020
iio: accel: kxcjk-1013: Add support for KX022-1020
...
Add compatible for the KX022-1020 accelerometer [1] using the
KX022-1023 [2] register map as both have an identical i2c interface.
[1]: https://kionixfs.azureedge.net/en/datasheet/KX022-1020%20Specifications%20Rev%2012.0.pdf
[2]: https://kionixfs.azureedge.net/en/datasheet/KX023-1025%20Specifications%20Rev%2012.0.pdf
Signed-off-by: Rayyan Ansari <rayyan@ansari.sh >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Link: https://patch.msgid.link/20240714173431.54332-3-rayyan@ansari.sh
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Rayyan Ansari
fc1bc5e071
dt-bindings: iio: kionix,kxcjk1013: Document KX022-1020
...
Document the KX022-1020 accelerometer, which has the same register
layout as the KX023-1025 and so can use the same driver.
Signed-off-by: Rayyan Ansari <rayyan@ansari.sh >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://patch.msgid.link/20240714173431.54332-2-rayyan@ansari.sh
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
David Lechner
26560d94d1
iio: adc: mcp3911: use devm_regulator_get_enable_read_voltage()
...
This makes use of the new devm_regulator_get_enable_read_voltage()
helper function to reduce boilerplate code in the MCP3911 ADC driver.
The error message is slightly changed since there are fewer error
return paths.
An extra parameter is added to the config callback to avoid adding
state that is not used outside of the probe() function.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-6-835017bae43d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
David Lechner
f2e3fbc444
iio: dac: mcp4922: drop remove() callback
...
By using devm_iio_device_register(), we can drop the remove() callback
in the mcp4922 driver. We can also remove spi_set_drvdata() since there
are no more callers of spi_get_drvdata(). Also use dev_err_probe()
while we are at it.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-4-835017bae43d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
David Lechner
ba2b35841c
iio: dac: mcp4922: use devm_regulator_get_enable_read_voltage()
...
This makes use of the new devm_regulator_get_enable_read_voltage()
helper function to reduce boilerplate code in the MCP4922 DAC driver.
The error message is slightly different because there is only one error
return path now.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-3-835017bae43d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
David Lechner
475da4ee14
iio: dac: mcp4728: use devm_regulator_get_enable_read_voltage()
...
This makes use of the new devm_regulator_get_enable_read_voltage()
helper function to reduce boilerplate code in the MCP4728 DAC driver.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-2-835017bae43d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
David Lechner
ae40596980
iio: dac: mcp4728: rename err to ret in probe function
...
To prepare for using a function that returns a non-error value, rename
the variable 'err' to 'ret' in the probe function.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-1-835017bae43d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Vasileios Amoiridis
2486701531
iio: pressure: bmp280: Sort headers alphabetically
...
Sort headers in alphabetical order
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com >
Link: https://patch.msgid.link/20240711211558.106327-4-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Vasileios Amoiridis
262a6634bc
iio: pressure: bmp280: Fix waiting time for BMP3xx configuration
...
According to the datasheet, both pressure and temperature can go up to
oversampling x32. With this option, the maximum measurement time is not
80ms (this is for press x32 and temp x2), but it is 130ms nominal
(calculated from table 3.9.2) and since most of the maximum values
are around +15%, it is configured to 150ms.
Fixes: 8d32930918 ("iio: pressure: bmp280: Add support for BMP380 sensor family")
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com >
Link: https://patch.msgid.link/20240711211558.106327-3-vassilisamir@gmail.com
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:38 +01:00
Vasileios Amoiridis
b9065b0250
iio: pressure: bmp280: Fix regmap for BMP280 device
...
Up to now, the BMP280 device is using the regmap of the BME280 which
has registers that exist only in the BME280 device.
Fixes: 14e8015f85 ("iio: pressure: bmp280: split driver in logical parts")
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com >
Link: https://patch.msgid.link/20240711211558.106327-2-vassilisamir@gmail.com
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
David Lechner
316c957fee
Documentation: iio: Document ad4695 driver
...
The Analog Devices Inc. AD4695 (and similar chips) are complex ADCs that
will benefit from a detailed driver documentation.
This documents the current features supported by the driver.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
David Lechner
0277f93e84
iio: adc: ad4695: Add driver for AD4695 and similar ADCs
...
This is a new driver for Analog Devices Inc. AD4695 and similar ADCs.
The initial driver supports initializing the chip including configuring
all possible LDO and reference voltage sources as well as any possible
voltage input channel wiring configuration.
Only the 4-wire SPI wiring mode where the CNV pin is tied to the CS pin
is supported at this time. And reading sample data from the ADC can only
be done in direct mode for now.
Co-developed-by: Ramona Gradinariu <ramona.gradinariu@analog.com >
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com >
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240711-iio-adc-ad4695-v4-2-c31621113b57@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
David Lechner
b40cafc114
dt-bindings: iio: adc: add AD4695 and similar ADCs
...
Add device tree bindings for AD4695 and similar ADCs.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20240711-iio-adc-ad4695-v4-0-c31621113b57@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Thorsten Blum
7b00bb6fd6
iio: common: scmi_iio: Remove unnecessary u64 type cast
...
The variable uHz already has the type u64 and casting it to u64 is
unnecessary. Remove the redundant type cast.
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com >
Link: https://patch.msgid.link/20240711134502.168484-1-thorsten.blum@toblux.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Kim Seer Paller
4cc2fc445d
iio: dac: ltc2664: Add driver for LTC2664 and LTC2672
...
LTC2664 4 channel, 12-/16-Bit Voltage Output SoftSpan DAC
LTC2672 5 channel, 12-/16-Bit Current Output Softspan DAC
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Co-developed-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com >
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20240718051834.32270-7-kimseer.paller@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Kim Seer Paller
dd554d1a72
dt-bindings: iio: dac: Add adi,ltc2672.yaml
...
Add documentation for ltc2672.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Co-developed-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com >
Link: https://patch.msgid.link/20240718051834.32270-6-kimseer.paller@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Kim Seer Paller
2f472da995
dt-bindings: iio: dac: Add adi,ltc2664.yaml
...
Add documentation for ltc2664.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Co-developed-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com >
Link: https://patch.msgid.link/20240718051834.32270-5-kimseer.paller@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Kim Seer Paller
cfe76601f6
dt-bindings: iio: dac: Generalize DAC common properties
...
Introduce a generalized DAC binding that can be used by DACs that have
similar properties adding output-range-microamp and output-range-microvolt.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com >
Link: https://patch.msgid.link/20240718051834.32270-4-kimseer.paller@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Kim Seer Paller
404cb1bcef
iio: ABI: add DAC 42kohm_to_gnd powerdown mode
...
Add a new powerdown mode for DACs with 42kohm resistor to GND.
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com >
Link: https://patch.msgid.link/20240718051834.32270-3-kimseer.paller@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Kim Seer Paller
5fe8da6127
iio: ABI: Generalize ABI documentation for DAC
...
Introduces a more generalized ABI documentation for DAC. Instead of
having separate ABI files for each DAC, we now have a single ABI file
that covers the common sysfs interface for all DAC.
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com >
https://patch.msgid.link/20240718051834.32270-2-kimseer.paller@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:37 +01:00
Nuno Sa
dd97cdd520
iio: backend: print message in case op is not implemented
...
For APIs that have a return value, -EOPNOTSUPP is returned in case the
backend does not support the functionality. However, for APIs that do
not have a return value we are left in silence. Hence, at least print a
debug message in case the callback is not implemented by the backend.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240709-dev-iio-backend-add-debugfs-v1-2-fb4b8f2373c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Nuno Sa
8585632a86
iio: backend: remove unused parameter
...
Indio_dev was not being used in iio_backend_extend_chan_spec() so remove
it.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240709-dev-iio-backend-add-debugfs-v1-1-fb4b8f2373c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Julien Stephan
3e82dfc82f
docs: iio: new docs for ad7380 driver
...
This adds a new page to document how to use the ad7380 ADC driver.
Credit: this docs is based on ad7944 docs.
Signed-off-by: Julien Stephan <jstephan@baylibre.com >
Link: https://patch.msgid.link/20240709-ad7380-add-docs-v1-1-458ced3dfcc5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Antoniu Miclaus
b6a097a9af
docs: iio: add documentation for adxl380 driver
...
Add documentation for adxl380 driver which describes the driver
device files and shows how the user may use the ABI for various
scenarios (configuration, measurement, etc.).
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com >
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com >
Link: https://patch.msgid.link/20240708104114.29894-3-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Antoniu Miclaus
df36de1367
iio: accel: add ADXL380 driver
...
The ADXL380/ADXL382 is a low noise density, low power, 3-axis
accelerometer with selectable measurement ranges. The ADXL380 supports
the +/-4 g, +/-8 g, and +/-16 g ranges, and the ADXL382 supports
+/-15 g, +/-30 g and +/-60 g ranges.
The ADXL380/ADXL382 offers industry leading noise, enabling precision
applications with minimal calibration. The low noise, and low power
ADXL380/ADXL382 enables accurate measurement in an environment with
high vibration, heart sounds and audio.
In addition to its low power consumption, the ADXL380/ADXL382 has many
features to enable true system level performance. These include a
built-in micropower temperature sensor, single / double / triple tap
detection and a state machine to prevent a false triggering. In
addition, the ADXL380/ADXL382 has provisions for external control of
the sampling time and/or an external clock.
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com >
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com >
Link: https://patch.msgid.link/20240708104114.29894-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Antoniu Miclaus
f102219309
dt-bindings: iio: accel: add ADXL380
...
Add dt-bindings for ADXL380/ADLX382 low noise density, low
power, 3-axis accelerometer with selectable measurement ranges.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com >
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com >
Link: https://patch.msgid.link/20240708104114.29894-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Vasileios Amoiridis
80cd23f43d
iio: pressure: bmp280: Add triggered buffer support
...
BMP2xx, BME280, BMP3xx, and BMP5xx use continuous buffers for their
temperature, pressure and humidity readings. This facilitates the
use of burst/bulk reads in order to acquire data faster. The
approach is different from the one used in oneshot captures.
BMP085 & BMP1xx devices use a completely different measurement
process that is well defined and is used in their buffer_handler().
Suggested-by: Angel Iglesias <ang.iglesiasg@gmail.com >
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com >
Link: https://lore.kernel.org/r/20240512230524.53990-6-vassilisamir@gmail.com
Link: https://patch.msgid.link/20240628171726.124852-4-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Vasileios Amoiridis
479e67ac64
iio: pressure: bmp280: Add SCALE, RAW values in channels and refactorize them
...
Add extra IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_RAW channels in order
to be able to calculate the processed value with standard userspace
IIO tools. Can be used for triggered buffers as well.
Even though it is not a good design choice to have SCALE, RAW and
PROCESSED together, the PROCESSED channel is kept for ABI compatibility.
While at it, separate BMPxxx and BMExxx device channels since BME
supports also humidity measurements.
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com >
Link: https://lore.kernel.org/r/20240512230524.53990-5-vassilisamir@gmail.com
Link: https://patch.msgid.link/20240628171726.124852-3-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00
Vasileios Amoiridis
74353ceb35
iio: pressure: bmp280: Generalize read_*() functions
...
Add the coefficients for the IIO standard units and the IIO value
inside the chip_info structure.
Move the calculations for the IIO unit compatibility from inside the
read_{temp,press,humid}() functions and move them to the general
read_raw() function.
In this way, all the data for the calculation of the value are
located in the chip_info structure of the respective sensor.
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com >
Acked-by: Adam Rizkalla <ajarizzo@gmail.com >
Link: https://patch.msgid.link/20240628171726.124852-2-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-08-03 10:13:36 +01:00