summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2024-08-03iio: adc: rtq6056: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
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/20240726-dev-iio-masklength-private3-v1-7-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: adc: rockchip_saradc: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
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> Acked-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-6-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: adc: mt6360-adc: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
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> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-5-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: adc: mcp3911: make use of iio_for_each_active_channel()Nuno Sa1-1/+1
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/20240726-dev-iio-masklength-private3-v1-4-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: adc: max1118: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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/20240726-dev-iio-masklength-private3-v1-3-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: adc: max1118: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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/20240726-dev-iio-masklength-private3-v1-2-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: accel: adxl380: make use of iio_get_masklength()Nuno Sa1-1/+1
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/20240726-dev-iio-masklength-private3-v1-1-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: backend: spelling: continuous -> continuousDavid Lechner2-2/+2
This fixes the spelling in IIO_BACKEND_INTERNAL_CONTINUOUS_WAVE. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20240726-iio-backend-spelling-continuous-v1-1-467c6e3f78ff@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: pressure: bmp280-core: Make read-only const array conversion_time_max ↵Colin Ian King1-1/+1
static Don't populate the read-only array conversion_time_max on the stack at run time, instead make it static. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20240722151738.572913-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: ROHM BH1745 colour sensorMudit Sharma3-0/+920
Add support for BH1745, which is an I2C colour sensor with red, green, blue and clear channels. It has a programmable active low interrupt pin. Interrupt occurs when the signal from the selected interrupt source channel crosses set interrupt threshold high or low level. Interrupt source for the device can be configured by enabling the corresponding event. Interrupt latch is always enabled when setting up interrupt. Add myself as the maintainer for this driver in MAINTAINERS. Signed-off-by: Mudit Sharma <muditsharma.info@gmail.com> Reviewed-by: Ivan Orlov <ivan.orlov0322@gmail.com> Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20240718220208.331942-2-muditsharma.info@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: proximity: sx_common: make use of iio_for_each_active_channel()Nuno Sa1-4/+2
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-22-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: proximity: sx9500: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-21-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: proximity: hx9023s: make use of iio_for_each_active_channel()Nuno Sa1-2/+2
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-20-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: pressure: dlhl60d: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-19-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: magnetometer: rm3100-core: make use of iio_get_masklength()Nuno Sa1-1/+1
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-18-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: tcs3472: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-17-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: tcs3414: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-16-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: si1145: use new '.masklength' accessorsNuno Sa1-4/+3
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-15-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: isl29125: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-14-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: gp2ap020a00f: make use of iio_for_each_active_channel()Nuno Sa1-6/+3
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-13-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: light: adjd_s311: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-12-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: imu: kmx61: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-03iio: imu: bno055: make use of iio_get_masklength()Nuno Sa1-1/+1
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-03iio: imu: bmi160_core: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-03iio: humidity: am2315: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-03iio: health: afe4404: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-03iio: health: max30102: make use of iio_get_masklength()Nuno Sa1-1/+1
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-03iio: health: afe4403: make use of iio_for_each_active_channel()Nuno Sa1-2/+1
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-03iio: dummy: iio_simple_dummy_buffer: use iio_for_each_active_channel()Nuno Sa1-1/+1
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-03iio: adc: hx711: make use of iio_for_each_active_channel()Nuno Sa1-4/+1
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-03iio: adc: dln2-adc: use new '.masklength' accessorsNuno Sa1-5/+3
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-03iio: adc: cc10001_adc: make use of iio_for_each_active_channel()Nuno Sa1-3/+1
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-03iio: adc: ad7192: Add clock providerAlisa-Dariana Roman1-0/+92
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-03iio: adc: ad7192: Update clock configAlisa-Dariana Roman1-28/+63
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-03iio: light: noa1305: Make integration time configurableMarek Vasut1-0/+61
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-03iio: light: noa1305: Report available scale valuesMarek Vasut1-0/+21
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-03iio: light: noa1305: Use static table lookup of scale valuesMarek Vasut1-36/+15
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-03iio: light: noa1305: Assign val in noa1305_measure()Marek Vasut1-8/+5
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-03iio: light: noa1305: Simplify noa1305_read_raw()Marek Vasut1-24/+13
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-03iio: accel: kxcjk-1013: Add support for KX022-1020Rayyan Ansari1-2/+6
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-03iio: adc: mcp3911: use devm_regulator_get_enable_read_voltage()David Lechner1-43/+16
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-03iio: dac: mcp4922: drop remove() callbackDavid Lechner1-14/+3
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-03iio: dac: mcp4922: use devm_regulator_get_enable_read_voltage()David Lechner1-26/+4
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-03iio: dac: mcp4728: use devm_regulator_get_enable_read_voltage()David Lechner1-26/+7
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-03iio: dac: mcp4728: rename err to ret in probe functionDavid Lechner1-13/+13
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-03iio: pressure: bmp280: Sort headers alphabeticallyVasileios Amoiridis3-4/+4
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-03iio: pressure: bmp280: Fix waiting time for BMP3xx configurationVasileios Amoiridis1-3/+4
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: 8d329309184d ("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-03iio: pressure: bmp280: Fix regmap for BMP280 deviceVasileios Amoiridis3-4/+44
Up to now, the BMP280 device is using the regmap of the BME280 which has registers that exist only in the BME280 device. Fixes: 14e8015f8569 ("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-03iio: adc: ad4695: Add driver for AD4695 and similar ADCsDavid Lechner3-0/+746
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-03iio: common: scmi_iio: Remove unnecessary u64 type castThorsten Blum1-1/+1
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>