summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-04-27iio: adc: ad799x: use local device pointer in probeArchit Anant
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-27iio: adc: ad799x: sort headers alphabeticallyArchit Anant
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-27iio: light: vcnl4000: register an IIO device with a device-managed functionErikas Bitovtas
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-27iio: light: vcnl4000: make pm_runtime_enable() device-managedErikas Bitovtas
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-27iio: light: vcnl4000: move power state function into device-managed actionErikas Bitovtas
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-27iio: light: vcnl4000: move device tree entries into one lineErikas Bitovtas
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-27iio: light: vcnl4000: drop enum id table in favor of chip structsErikas Bitovtas
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-27iio: light: vcnl4000: validate device by prod ID instead of table IDErikas Bitovtas
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-27iio: dac: mcp4821: add configurable gain supportNikhil Gautam
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-27iio: dac: mcp4821: move state initialization outside switchNikhil Gautam
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-27iio: dac: mcp4821: fix spelling mistake in enum nameNikhil Gautam
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-27iio: ssp_sensors: cleanup codestyle checkSanjay Chitroda
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-27iio: ssp_sensors: cleanup codestyle warningSanjay Chitroda
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-27iio: frequency: ad9834: clean up includesJoshua Crofts
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-27iio: frequency: ad9832: remove kernel.h proxy headerJoshua Crofts
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-27iio: accel: adxl372: Use dev_err_probe()Sanjay Chitroda
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-27iio: accel: adxl372: Use devm-managed mutex initializationSanjay Chitroda
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-27iio: accel: adxl367: Use devm-managed mutex initializationSanjay Chitroda
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-27iio: accel: adxl355: Use dev_err_probe()Sanjay Chitroda
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-27iio: accel: adxl355_core: Use devm-managed mutex initializationSanjay Chitroda
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-27iio: accel: adxl380: Use devm-managed mutex initializationSanjay Chitroda
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-27iio: accel: adxl313: Use dev_err_probe()Sanjay Chitroda
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-27iio: accel: adxl313_core: Use devm-managed mutex initializationSanjay Chitroda
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-27iio: magnetometer: ak8975: remove unnecessary bracesJoshua Crofts
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-27iio: adc: ti-ads8688: use read_avail for available attributesGabriel Rondon
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-27iio: adc: ad4062: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad9467: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7768-1: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7280a: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7791: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7791: add dev variableAntoniu Miclaus
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-27iio: adc: ad7292: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7292: add dev variableAntoniu Miclaus
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-27iio: adc: ad7793: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7793: add dev variableAntoniu Miclaus
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-27iio: adc: ad7780: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ad7780: add dev variableAntoniu Miclaus
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-27iio: adc: ad7949: use dev_err_probe()Antoniu Miclaus
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-27iio: adc: ti-ads7950: complete conversion to using managed resourcesDmitry Torokhov
All resources that the driver needs have managed API now. Switch to using them to make code clearer and drop ti_ads7950_remove(). Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Tested-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: adc: ti-ads7950: switch to using devm_regulator_get_enable_read_voltage()Dmitry Torokhov
The regulator is enabled for the entire time the driver is bound to the device, and we only need to access it to fetch voltage, which can be done at probe time. Switch to using devm_regulator_get_enable_read_voltage() which simplifies probing and unbinding code. Suggested-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: adc: ti-ads7950: simplify check for spi_setup() failuresDmitry Torokhov
spi_setup() specifies that it returns 0 on success or negative error on failure. Therefore we can simply check for the return code being 0 or not. Reviewed-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: adc: ti-ads7950: switch to using guard() notationDmitry Torokhov
guard() notation allows early returns when encountering errors, making control flow more obvious. Use it. Reviewed-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: adc: ltc2309: Optimize chip_info structure layoutCarlos Jones Jr
Improve the ltc2309_chip_info structure with better type safety and memory efficiency: - Add __counted_by_ptr() annotation to the channels pointer, linking it to num_channels for improved bounds checking and kernel hardening - Reorder structure fields to minimize padding: * Place read_delay_us before num_channels * This reduces struct size and eliminates internal gaps - Reorder field initialization to match the structure definition order The __counted_by_ptr() attribute enables compile-time and runtime verification that array accesses to channels[] stay within the bounds specified by num_channels, improving memory safety. Signed-off-by: Carlos Jones Jr <carlosjr.jones@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: adc: ltc2309: add read delay for ltc2305Carlos Jones Jr
The LTC2305 requires a minimum 1.6μs delay between the I2C write operation (channel selection) and the subsequent read operation to allow the chip to process the command and prepare the result. While not explicitly documented in the datasheet, this timing requirement was identified by the hardware designer as necessary for reliable operation. Add a read_delay_us field to both the ltc2309_chip_info and ltc2309 device structures to support chip-specific timing requirements. Use fsleep() to implement the delay when non-zero, with LTC2305 set to 2μs (1.6μs requirement rounded up). LTC2309 does not require additional delay beyond inherent I2C bus timing. This extends the existing LTC2305 support added in (commit 8625d418d24b ("iio: adc: ltc2309: add support for ltc2305")) with the missing inter-transaction delay. Signed-off-by: Carlos Jones Jr <carlosjr.jones@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: imu: st_lsm6dsx: Add support for rotation sensorFrancesco Lavra
Some IMU chips in the LSM6DSX family have sensor fusion features that combine data from the accelerometer and gyroscope. One of these features generates rotation vector data and makes it available in the hardware FIFO as a quaternion (more specifically, the X, Y and Z components of the quaternion vector, expressed as 16-bit half-precision floating-point numbers). Add support for a new sensor instance that allows receiving sensor fusion data, by defining a new struct st_lsm6dsx_fusion_settings (which contains chip-specific details for the sensor fusion functionality), and adding this struct as a new field in struct st_lsm6dsx_settings. In st_lsm6dsx_core.c, populate this new struct for the LSM6DSV and LSM6DSV16X chips, and add the logic to initialize an additional IIO device if this struct is populated for the hardware type being probed. Note: a new IIO device is being defined (as opposed to adding channels to an existing device) because the rate at which sensor fusion data is generated may not match the data rate from any of the existing devices. Tested on LSM6DSV16X. Signed-off-by: Francesco Lavra <flavra@baylibre.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: ABI: Add quaternion axis modifierFrancesco Lavra
This modifier applies to the IIO_ROT channel type, and indicates a data representation that specifies the {x, y, z} components of the normalized quaternion vector. Signed-off-by: Francesco Lavra <flavra@baylibre.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: imu: st_lsm6dsx: Fix check for invalid samples from FIFOFrancesco Lavra
The DRDY_MASK feature implemented in sensor chips marks gyroscope and accelerometer invalid samples (i.e. samples that have been acquired during the settling time of sensor filters) with the special values 0x7FFFh, 0x7FFE, and 0x7FFD. The driver checks FIFO samples against these special values in order to discard invalid samples; however, it does the check regardless of the type of samples being processed, whereas this feature is specific to gyroscope and accelerometer data. This could cause valid samples to be discarded. Fix the above check so that it takes into account the type of samples being processed. To avoid casting to __le16 * when checking sample values, clean up the type representation for data read from the FIFO. Fixes: 960506ed2c69 ("iio: imu: st_lsm6dsx: enable drdy-mask if available") Signed-off-by: Francesco Lavra <flavra@baylibre.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: adc: ad7191: Don't check for specific errors when parsing propertiesAndy Shevchenko
Instead of checking for the specific error codes (that can be considered a layering violation to some extent) check for the property existence first and then either parse it, or apply a default value. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: orientation: hid-sensor-rotation: use ext_scan_typeDavid Lechner
Make use of ext_scan_type to handle the dynamic realbits size of the quaternion data. This lets us implement it using static data rather than having to duplicate the channel info for each driver instance. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-04-27iio: imu: bno055: add explicit scan buf layoutDavid Lechner
Move the scan buf.chans array into a union along with a struct that gives the layout of the buffer with all channels enabled. Although not technically required in this case, if there had been a different number of items before the quaternion, there could have been a subtle bug with the special alignment needed for the quaternion channel data and the array would have been too small. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>