Commit Graph

1444085 Commits

Author SHA1 Message Date
David Carlier
8eedc312f1 iio: addac: ad74115: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Carlier
be186094ee iio: dac: ltc2664: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Carlier
81227f33a8 iio: dac: ad5686: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Carlier
e7394ce0e5 iio: dac: ad5755: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Carlier
b8c15f8589 iio: dac: ad5758: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Carlier
de960173ae iio: dac: ad7303: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Carlier
e15c8934e6 iio: dac: ad3552r: Use devm_mutex_init()
Use devm_mutex_init() which is helpful with CONFIG_DEBUG_MUTEXES.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
Piyush Patle
6cc18c0dc2 iio: adc: nxp-sar-adc: use field_get() for EOC bit check
Use field_get() here now that runtime-mask support exists, and drop
the obsolete TODO. Since NXP_SAR_ADC_EOC_CH(c) is BIT(c), the
resulting !-test is semantically identical.

No functional change.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
Piyush Patle
1619d52fce iio: dac: ad3552r: use field_get() for power-down bit read
Use field_get() for the per-channel DAC power-down bit instead of an
open-coded mask-and-shift sequence.

No functional change.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:22 +01:00
David Lechner
e0c6843248 iio: adc: ti-ads7950: use spi_optimize_message()
Use spi_optimize_message() to reduce CPU usage during buffered reads.

On hardware with support for SPI_CS_WORD, this reduced the CPU usage
of the threaded interrupt by about 5%. On hardware without support, this
should reduce CPU usage even more since it won't have to split the SPI
transfers each time the interrupt handler is called.

The .update_scan_mode() callback hand to be moved to the buffer preenable
callback since the SPI transfer mode can't be changed after
spi_optimize_message() has been called. (The buffer postenable callback
can't be used because it happens after the trigger is enabled, so the
SPI message needs to be optimized before that.)

The indent of the pointer to ti_ads7950_read_raw() in the assignment
is changed since there is no longer anything else in the struct to
align with since removal of use of the pointer to
ti_ads7950_update_scan_mode().

Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Archit Anant
99d7099872 iio: adc: ad799x: convert to fully managed resources and drop remove()
Convert the driver's remaining manual resource management to use the
devm_ infrastructure, allowing for the complete removal of the
ad799x_remove() function and the simplification of the probe error paths.

Specifically:
- Initialize the mutex using devm_mutex_init() and move it to the top
  of probe() (before IRQ registration) to prevent a race condition where
  an interrupt could attempt to take an uninitialized lock.
- Use devm_add_action_or_reset() to ensure that the VCC and VREF
  regulators are disabled safely and in the correct order during driver
  teardown or probe failure.
- Refactor the optional VREF error handling path for better readability.
- Convert iio_triggered_buffer_setup() and iio_device_register() to
  their devm_ variants.

Because all resources are now managed by the devm core, the unwinding
order is guaranteed to follow the reverse order of allocation. All manual
error handling goto labels in ad799x_probe() have been removed.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: David Lechner <dlechner@baylibre.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Archit Anant <architanant5@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Archit Anant
97c3fae0db iio: adc: ad799x: cache regulator voltages during probe
Since the reference voltage for this ADC is not expected to
change at runtime, determine the active reference voltage (either VREF
or VCC) during probe() and cache it in a single variable in the state
structure.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Archit Anant <architanant5@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Archit Anant
21450969a7 iio: adc: ad799x: use a static buffer for scan data
Currently, rx_buf is dynamically allocated using kmalloc() every time
ad799x_update_scan_mode() is called. This can lead to memory leaks if
the scan mask is updated multiple times.

Drop the dynamic allocation and replace it with a static buffer at the
end of the state structure using IIO_DECLARE_BUFFER_WITH_TS().
This eliminates the allocation overhead, prevents leaks, and removes
the need for manual kfree() on driver removal.

Suggested-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Archit Anant <architanant5@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Archit Anant
fa2d96d289 iio: adc: ad799x: use local device pointer in probe
Introduce a local device pointer 'dev' in ad799x_probe() and use it
throughout the function instead of accessing &client->dev repeatedly.

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Archit Anant <architanant5@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Archit Anant
d4c8667bc9 iio: adc: ad799x: sort headers alphabetically
Reorder header includes to maintain proper alphabetical ordering.

No functional changes.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Archit Anant <architanant5@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Erikas Bitovtas
de1cbc4b21 iio: light: vcnl4000: register an IIO device with a device-managed function
Use a device-managed counterpart of iio_device_register() and remove the
redundant iio_device_unregister() call in driver remove function,
allowing us to remove vcnl4000_remove() function altogether.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Erikas Bitovtas
de1839edfe iio: light: vcnl4000: make pm_runtime_enable() device-managed
Replace pm_runtime_set_active() and pm_runtime_enable() with their
device-managed counterpart to remove them from vcnl4000_remove().

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Erikas Bitovtas
857cb79df0 iio: light: vcnl4000: move power state function into device-managed action
Move power state setting into a device-managed action to get rid of
fail_poweroff goto label and remove it from vcnl4000_remove() function.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Erikas Bitovtas
8078daf886 iio: light: vcnl4000: move device tree entries into one line
Make device tree entries one line each to save space and LOC.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:21 +01:00
Erikas Bitovtas
b2362b824f iio: light: vcnl4000: drop enum id table in favor of chip structs
Instead of creating an enum table with chip IDs, store pointers to
structs directly. This drops the association between chip structs and
enum IDs and allows for easier addition or removal of new devices.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Erikas Bitovtas
4617091a76 iio: light: vcnl4000: validate device by prod ID instead of table ID
Add a new field for vcnl4000_chip_spec and check if we have the right
device by that instead of the index from enum table. This leaves the
enum table being used only for picking the right vcnl4000_chip_spec,
allowing us to drop it later on.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Nikhil Gautam
416e983c91 iio: dac: mcp4821: add configurable gain support
Add support for configuring the DAC gain using the GA bit

The MCP4821 supports two gain settings:
- 1x gain → 2.048V full-scale
- 2x gain → 4.096V full-scale

Scale write support is added in the IIO interface. Only scale
values advertised via the scale_available attribute are accepted,
ensuring consistency between the configured gain and exposed
scale values.

Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Nikhil Gautam
090839ecff iio: dac: mcp4821: move state initialization outside switch
Move the iio_priv() call outside the switch statement in
mcp4821_read_raw() to avoid repeating it in multiple cases.

No functional change.

Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Nikhil Gautam
f4d618c618 iio: dac: mcp4821: fix spelling mistake in enum name
Fix a typo in the enum name mcp4821_supported_drvice_ids
by renaming it to mcp4821_supported_device_ids.

This improves code readability and consistency.

Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Sanjay Chitroda
a9ecd9a121 iio: ssp_sensors: cleanup codestyle check
Reported by checkpatch:
FILE: drivers/iio/common/ssp_sensors/ssp_spi.c

CHECK: Macro argument '...' may be better as '(...)'
to avoid precedence issues

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Sanjay Chitroda
dcc80f2fdf iio: ssp_sensors: cleanup codestyle warning
Reported by checkpatch:
FILE: drivers/iio/common/ssp_sensors/ssp_spi.c

WARNING: Prefer __packed over __attribute__((__packed__))
+} __attribute__((__packed__));

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Joshua Crofts
13af23fb52 iio: frequency: ad9834: clean up includes
Cleanup include headers by removing proxy kernel.h header and
unnecessary list.h, interrupt.h, workqueue.h and slab.h headers. Added
additional headers that were previously included from kernel.h.

Verified using the include-what-you-use tool.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Joshua Crofts
0ce10ae5eb iio: frequency: ad9832: remove kernel.h proxy header
Remove kernel.h proxy header and add replacement headers (array_size.h,
dev_printk.h, kstrtox.h, mod_devicetable.h, mutex, types.h, asm/byteorder.h) to
maintain atomicity. Moved asm/div64.h header below generic <linux/*>
headers. Additionally, add bitops.h for BIT_ULL() macro.

Audited using the include-what-you-use tool.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Sanjay Chitroda
d47d6bdc81 iio: accel: adxl372: Use dev_err_probe()
dev_err_probe() makes error code handling simpler and handles
deferred probe nicely (avoid spamming logs).

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:20 +01:00
Sanjay Chitroda
24ab1d9a2f iio: accel: adxl372: Use devm-managed mutex initialization
Use devm_mutex_init() to tie the mutex lifetime to the device and
improve debugging when CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Sanjay Chitroda
f710a0fa46 iio: accel: adxl367: Use devm-managed mutex initialization
Use devm_mutex_init() to tie the mutex lifetime to the device and
improve debugging when CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Sanjay Chitroda
70cc2c65c2 iio: accel: adxl355: Use dev_err_probe()
dev_err_probe() makes error code handling simpler and handles
deferred probe nicely (avoid spamming logs).

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Sanjay Chitroda
07fd62916c iio: accel: adxl355_core: Use devm-managed mutex initialization
Use devm_mutex_init() to tie the mutex lifetime to the device and
improve debugging when CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Sanjay Chitroda
1ed49c5e6b iio: accel: adxl380: Use devm-managed mutex initialization
Use devm_mutex_init() to tie the mutex lifetime to the device and
improve debugging when CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Sanjay Chitroda
c27837e49f iio: accel: adxl313: Use dev_err_probe()
dev_err_probe() makes error code handling simpler and handles
deferred probe nicely (avoid spamming logs).

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Sanjay Chitroda
d2ed8a2f63 iio: accel: adxl313_core: Use devm-managed mutex initialization
Use devm_mutex_init() to tie the mutex lifetime to the device and
improve debugging when CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Joshua Crofts
2e8a75ac28 iio: magnetometer: ak8975: remove unnecessary braces
Remove unnecessary braces at single if statement block.

No functional change.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-04-27 09:58:19 +01:00
Gabriel Rondon
7328d444c1 iio: adc: ti-ads8688: use read_avail for available attributes
Convert the in_voltage_scale_available and in_voltage_offset_available
attributes from legacy IIO_DEVICE_ATTR with custom show functions to the
IIO framework's read_avail callback. This uses the framework's built-in
support for _available attributes, removing the need for manual sysfs
formatting.

Precompute the available scale values at probe time since they depend on
the reference voltage which does not change after initialization.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:19 +01:00
Antoniu Miclaus
5bcbbcfb7c iio: adc: ad4062: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
8b6e738829 iio: adc: ad9467: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
ba1ad6b2de iio: adc: ad7768-1: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
a88442f408 iio: adc: ad7280a: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
db935b8cac iio: adc: ad7791: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
d9e85469a7 iio: adc: ad7791: add dev variable
Add a local struct device pointer to simplify repeated &spi->dev
dereferences throughout the probe function.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
567485a8e6 iio: adc: ad7292: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
655c5e04e1 iio: adc: ad7292: add dev variable
Add a local struct device pointer to simplify repeated &spi->dev
dereferences throughout the probe function.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
d145e05835 iio: adc: ad7793: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:18 +01:00
Antoniu Miclaus
b659f18def iio: adc: ad7793: add dev variable
Add a local struct device pointer to simplify repeated &spi->dev
dereferences throughout the probe function.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:17 +01:00
Antoniu Miclaus
cd256a392b iio: adc: ad7780: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:17 +01:00
Antoniu Miclaus
bca122aff0 iio: adc: ad7780: add dev variable
Add a local struct device pointer to simplify repeated &spi->dev
dereferences throughout the probe function.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27 09:58:17 +01:00