David Lechner
b8f008100a
iio: adc: mt6360-adc: use = { } instead of memset()
...
Use { } instead of memset() to zero-initialize stack memory to simplify
the code.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-4-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
David Lechner
3a780d29ae
iio: adc: dln2-adc: use = { } instead of memset()
...
Use { } instead of memset() to zero-initialize stack memory to simplify
the code.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-3-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
David Lechner
08ef45efc2
iio: accel: msa311: use = { } instead of memset()
...
Use { } instead of memset() to zero-initialize stack memory to simplify
the code.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-2-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
David Lechner
f448fb868a
iio: accel: adxl372: use = { } instead of memset()
...
Use { } instead of memset() to zero-initialize stack memory to simplify
the code.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-1-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
Lothar Rubusch
e564c05401
iio: accel: adxl345: replace magic numbers by unit expressions
...
Replace absolute numbers by their expressions from units.h to avoid
using magic numbers. Use uniform expressions to clarify their usage.
This is a refactoring change and should not impact functionality.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com >
Link: https://patch.msgid.link/20250610215933.84795-7-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
Lothar Rubusch
f7f905f7a7
iio: accel: adxl345: simplify measure enable
...
Simplify the function to enable or disable measurement. Replace the
separate decision logic and call to regmap_update_bits() by a single
call to regmap_assign_bits() taking a boolean argument directly.
This is a refactoring change and should not impact functionality.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com >
Link: https://patch.msgid.link/20250610215933.84795-4-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
Lothar Rubusch
5decafde4d
iio: accel: adxl345: make data struct variable irq function local
...
Remove variable irq from the struct state and make it a function local
variable, because it is not necessary to be kept struct-wise.
This is a refactoring change and should not impact functionality.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com >
Link: https://patch.msgid.link/20250610215933.84795-3-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
David Lechner
51180f03eb
iio: amplifiers: ada4250: use dev_err_probe()
...
Use dev_err_probe() when returning an error in the probe function.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-5-bf85ddea79f2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
David Lechner
e905b3dd3a
iio: amplifiers: ada4250: move offset_uv in struct
...
Move offset_uv in struct ada4250_state. This keeps things logically
grouped and reduces holes in the struct.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-4-bf85ddea79f2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:55 +01:00
David Lechner
3712f11b4e
iio: amplifiers: ada4250: use devm_regulator_get_enable_read_voltage()
...
Use devm_regulator_get_enable_read_voltage() to simplify the code.
Replace 1000000 with MICRO while we are touching this for better
readability.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-3-bf85ddea79f2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
David Lechner
f8a7be248f
iio: amplifiers: ada4250: don't fail on bad chip ID
...
Only print an information message instead of error message and failing
to probe the device if the chip ID is not recognized. Experience shows
that this can be fragile and some devices may not return the expected
chip ID even though the driver is still able to work with them.
Suggested-by: Jonathan Cameron <jic23@kernel.org >
Closes: https://lore.kernel.org/linux-iio/20250421122409.79f5580c@jic23-huawei/
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-2-bf85ddea79f2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
David Lechner
788d6060f1
iio: amplifiers: ada4250: used dev local variable
...
Replace local spi variable with dev in ada4250_init() since spi is not
used directly.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-1-bf85ddea79f2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Andrew Ijano
a80ad80f1b
iio: accel: sca3000: replace error_ret labels by simple returns
...
Replace usage of error_ret labels by returning directly when handling
errors. Cases that do a mutex unlock were not changed.
Signed-off-by: Andrew Ijano <andrew.lopes@alumni.usp.br >
Co-developed-by: Gustavo Bastos <gustavobastos@usp.br >
Signed-off-by: Gustavo Bastos <gustavobastos@usp.br >
Suggested-by: Jonathan Cameron <jic23@kernel.org >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250611194648.18133-2-andrew.lopes@alumni.usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Nattan Ferreira
6f6bf97823
iio: light: apds9306: Refactor threshold get/set functions to use helper
...
Refactor the apds9306_event_thresh_get() and apds9306_event_thresh_set()
functions to use a helper function (apds9306_get_thresh_reg()) for
obtaining the correct register based on the direction of the event. This
improves code readability and maintains consistency in accessing
threshold registers.
Signed-off-by: Nattan Ferreira <nattanferreira58@gmail.com >
Co-developed-by: Lucas Antonio <lucasantonio.santos@usp.br >
Signed-off-by: Lucas Antonio <lucasantonio.santos@usp.br >
Acked-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com >
Link: https://patch.msgid.link/20250611174253.16578-1-nattanferreira58@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Jonathan Santos
fb1d3b24eb
iio: adc: ad7768-1: add filter type and oversampling ratio attributes
...
Separate filter type and decimation rate from the sampling frequency
attribute. The new filter type attribute enables sinc3, sinc3+rej60
and wideband filters, which were previously unavailable.
Previously, combining decimation and MCLK divider in the sampling
frequency obscured performance trade-offs. Lower MCLK divider
settings increase power usage, while lower decimation rates reduce
precision by decreasing averaging. By creating an oversampling
attribute, which controls the decimation, users gain finer control
over performance.
The addition of those attributes allows a wider range of sampling
frequencies and more access to the device features. Sampling frequency
table is updated after every digital filter parameter change.
Changes in the sampling frequency are not allowed anymore while in
buffered mode.
Reviewed-by: David Lechner <dlechner@baylibre.com >
Co-developed-by: Pop Paul <paul.pop@analog.com >
Signed-off-by: Pop Paul <paul.pop@analog.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/cd3b60c44847d5c35cecc4385bbda6533be6825e.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Jonathan Santos
74e16c0cd6
iio: adc: ad7768-1: replace manual attribute declaration
...
Use read_avail callback from struct iio_info to replace the manual
declaration of sampling_frequency_available attribute.
Reviewed-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/b2653d270131b2c873373a6f81cde9a5bdf5d1ff.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Jonathan Santos
74790e84ff
iio: adc: ad7768-1: add support for Synchronization over SPI
...
The synchronization method using GPIO requires the generated pulse to be
truly synchronous with the base MCLK signal. When it is not possible to
do that in hardware, the datasheet recommends using synchronization over
SPI, where the generated pulse is already synchronous with MCLK. This
requires the SYNC_OUT pin to be connected to the SYNC_IN pin.
Use trigger-sources property to enable device synchronization over SPI
and multi-device synchronization while replacing sync-in-gpios property.
Reviewed-by: David Lechner <dlechner@baylibre.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/05aea6d1551fce94f290d68f1dba548513e1632f.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Jonathan Santos
54da2aeb71
iio: adc: ad7768-1: add multiple scan types to support 16-bits mode
...
When the device is configured to decimation x8, only possible in the
sinc5 filter, output data is reduced to 16 bits in order to support
1 MHz of sampling frequency due to clock limitation.
Use multiple scan types feature to enable the driver to switch
scan type at runtime, making it possible to support both 24-bit and
16-bit resolution.
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/08780fd4a59885f1f250759ce655420bd1dbb383.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Sergiu Cuciurean
d569ae0f05
iio: adc: ad7768-1: Add GPIO controller support
...
The AD7768-1 has the ability to control other local hardware (such as gain
stages),to power down other blocks in the signal chain, or read local
status signals over the SPI interface.
Add direct mode conditional locks in the GPIO callbacks to prevent register
access when the device is in buffered mode.
This change exports the AD7768-1's four GPIOs and makes them accessible
at an upper layer.
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com >
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com >
Co-developed-by: Jonathan Santos <Jonathan.Santos@analog.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/8abca580f43cb31d7088d07a7414b5f7efe91ead.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Jonathan Santos
96b6e814af
iio: adc: ad7768-1: add regulator to control VCM output
...
The VCM output voltage can be used as a common-mode voltage within the
amplifier preconditioning circuits external to the AD7768-1.
This change allows the user to configure VCM output using the regulator
framework.
Acked-by: Marcelo Schmitt <marcelo.schmitt@analog.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/1f02312fdc4131168b194d59f4b1688dc68ea36e.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:54 +01:00
Jonathan Santos
1905e6c9ce
dt-bindings: iio: adc: ad7768-1: add trigger-sources property
...
In addition to GPIO synchronization, The AD7768-1 also supports
synchronization over SPI, which use is recommended when the GPIO
cannot provide a pulse synchronous with the base MCLK signal. It
consists of looping back the SYNC_OUT to the SYNC_IN pin and send
a command via SPI to trigger the synchronization.
Introduce the 'trigger-sources' property to enable SPI-based
synchronization via SYNC_OUT pin, along with additional optional
entries for GPIO3 and DRDY pins.
Also create #trigger-source-cells property to differentiate the trigger
sources provided by the ADC. To improve readability, create a
adi,ad7768-1.h header with the macros for the cell values.
While at it, add description to the interrupts property.
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Reviewed-by: David Lechner <dlechner@baylirbe.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/713fd786010c75858700efaec8bb285274e7057e.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
Jonathan Santos
1c01c449e3
dt-bindings: iio: adc: ad7768-1: Document GPIO controller
...
The AD7768-1 ADC exports four bidirectional GPIOs accessible
via register map.
Document GPIO properties necessary to enable GPIO controller for this
device.
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/2ac34fc1e0b02886073ae0bb196c7e8d4d442c3f.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
Jonathan Santos
81d289c21e
dt-bindings: iio: adc: ad7768-1: document regulator provider property
...
The AD7768-1 provides a buffered common-mode voltage output
on the VCM pin that can be used to bias analog input signals.
Add regulators property to enable the use of the VCM output,
referenced here as vcm-output, by any other device.
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/33c02a1fb9d839f62da5237f9476ccbf14271b6d.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
Jonathan Santos
0dd88eaa71
dt-bindings: trigger-source: add generic GPIO trigger source
...
Inspired by pwm-trigger, create a new binding for using a GPIO
line as a trigger source.
Link: https://lore.kernel.org/linux-iio/20250207-dlech-mainline-spi-engine-offload-2-v8-3-e48a489be48c@baylibre.com/
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/c4a3a7c828c711b439d1893271b8376823176ea6.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
Jiri Slaby (SUSE)
a8daa0a8f1
iio: adc: stm32-adc: Use dev_fwnode()
...
irq_domain_create_simple() takes fwnode as the first argument. It can be
extracted from the struct device using dev_fwnode() helper instead of
using of_node with of_fwnode_handle().
So use the dev_fwnode() helper.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250612084627.217341-1-jirislaby@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
5cc2608766
iio: light: opt4060: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-11-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
f942862381
iio: light: ltr501: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-10-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
7eab62ecbc
iio: light: isl29028: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-9-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
a5afaa5de3
iio: imu: bno055: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-8-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
3be2dd5185
iio: imu: icm42600: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com >
Link: https://patch.msgid.link/20250611085838.4761-7-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
2619f7b14c
iio: health: afe4404: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-6-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:53 +01:00
chuguangqing
bc6c48bfad
iio: health: afe4403: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-5-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
chuguangqing
3547b9ab04
iio: dac: bd79703: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-4-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
chuguangqing
cc42e969eb
iio: dac: ad5380: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-3-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
chuguangqing
5c3f062483
iio: chemical: bme680: convert to use maple tree register cache
...
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.
Signed-off-by: chuguangqing <chuguangqing@inspur.com >
Link: https://patch.msgid.link/20250611085838.4761-2-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
David Lechner
1763bd3a0c
iio: adc: ad7173: check return value of spi_setup()
...
Check the return value of spi_setup() and propagate the error in the
ad7173_probe() function. This is unlikely to happen since virtually
every SPI controller supports SPI_MODE_3, but still always a good idea
to check the return value.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250611-iio-adc-ad7173-check-spi_setup-return-v1-1-4d6f9ef0a2e4@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Antonio Borneo
d657e251d9
iio: trigger: stm32-lptimer: Fix build warnings about export.h
...
After commit a934a57a42 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and commit 7d95680d64 ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1") we get the build
warning with W=1:
drivers/iio/trigger/stm32-lptimer-trigger.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
Fix it.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com >
Acked-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com >
Link: https://patch.msgid.link/20250610124855.269158-5-antonio.borneo@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Antonio Borneo
2628736bd4
iio: trigger: stm32-timer: Fix build warnings about export.h
...
After commit a934a57a42 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and commit 7d95680d64 ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1") we get the build
warning with W=1:
drivers/iio/trigger/stm32-timer-trigger.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
Fix it.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com >
Acked-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com >
Link: https://patch.msgid.link/20250610124855.269158-4-antonio.borneo@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Antonio Borneo
86c4903bb2
iio: adc: stm32-dfsdm: Fix build warnings about export.h
...
After commit a934a57a42 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and commit 7d95680d64 ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1") we get the build
warnings with W=1:
drivers/iio/adc/stm32-dfsdm-adc.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
drivers/iio/adc/stm32-dfsdm-core.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
Fix them.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com >
Acked-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com >
Link: https://patch.msgid.link/20250610124855.269158-3-antonio.borneo@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Jonathan Cameron
3ceb7cc345
iio: potentiometer: Drop unused export.h includes
...
Resolves:
warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Link: https://patch.msgid.link/20250609070616.3923709-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Pop Ioan Daniel
6a533f56b0
iio: adc: ad7405: add ad7405 driver
...
Add support for the AD7405/ADUM770x, a high performance isolated ADC,
1-channel, 16-bit with a second-order Σ-Δ modulator that converts an
analog input signal into a high speed, single-bit data stream.
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Link: https://patch.msgid.link/20250605150948.3091827-6-pop.ioan-daniel@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Pop Ioan Daniel
dbcf839432
dt-bindings: iio: adc: add ad7405
...
Add devicetree bindings for ad7405/adum770x family.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com >
Link: https://patch.msgid.link/20250605150948.3091827-5-pop.ioan-daniel@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:52 +01:00
Pop Ioan Daniel
dced5bda14
iio: adc: adi-axi-adc: add axi_adc_oversampling_ratio_set
...
Add support for setting decimation rate.
Reviewed-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com >
Link: https://patch.msgid.link/20250605150948.3091827-4-pop.ioan-daniel@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:51 +01:00
Pop Ioan Daniel
97e6882ed1
iio: backend: update iio_backend_oversampling_ratio_set
...
Add chan parameter to iio_backend_oversampling_ratio_set() to allow
for contexts where the channel must be specified. Modify all
existing users.
Reviewed-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com >
Link: https://patch.msgid.link/20250605150948.3091827-3-pop.ioan-daniel@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:51 +01:00
Pop Ioan Daniel
56e5ec2d85
iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update
...
Remove chan parameter from ad4851_set_oversampling_ratio parameters
list because the parameter is not used.
Reviewed-by: David Lechner <dlechner@baylibre.com >
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com >
Link: https://patch.msgid.link/20250605150948.3091827-2-pop.ioan-daniel@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:51 +01:00
Lothar Rubusch
7b20d517b9
iio: accel: adxl313: add debug register
...
Add IIO debug register for general sensor debugging.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com >
Link: https://patch.msgid.link/20250601172139.59156-2-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:51 +01:00
Gwendal Grignou
c430955d0c
iio: cros_ec_sensors: add cros_ec_activity driver
...
ChromeOS EC can report activity information derived from the
accelerometer:
- Reports on-body/off-body as a proximity event.
- Reports significant motion as an activity event.
This new sensor is a virtual sensor, included only when the EC firmware
is compiled with the appropriate module.
Signed-off-by: Gwendal Grignou <gwendal@google.com >
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org >
Link: https://patch.msgid.link/20250604053903.1376465-1-gwendal@google.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:51 +01:00
Colin Ian King
f0fdb01df2
iio: adc: ti-ads131e08: Fix spelling mistake "tweek" -> "tweak"
...
There is a spelling mistake in variable tweek_offset and in comment
blocks. Fix these.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250603165706.126031-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-26 19:32:51 +01:00
Angelo Dureghello
126cbd0deb
iio: adc: ad7606: add gain calibration support
...
Add gain calibration support, using resistor values set on devicetree,
values to be set accordingly with ADC external RFilter, as explained in
the ad7606c-16 datasheet, rev0, page 37.
Usage example in the fdt yaml documentation.
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250606-wip-bl-ad7606-calibration-v9-7-6e014a1f92a2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-09 07:45:37 +01:00
Angelo Dureghello
cc2eca4309
iio: adc: ad7606: rename chan_scale to a more generic chan_info
...
Non functional, renaming chan-related chan_scale structure to a more
generic chan_info, to host other chan specific settings, not just
scale-related.
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://patch.msgid.link/20250606-wip-bl-ad7606-calibration-v9-6-6e014a1f92a2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-06-09 07:45:37 +01:00