]> git.ipfire.org Git - thirdparty/kernel/stable.git/log
thirdparty/kernel/stable.git
3 weeks agoiio: trigger: drop generic interrupt trigger.
Jonathan Cameron [Sat, 16 May 2026 11:32:19 +0000 (12:32 +0100)] 
iio: trigger: drop generic interrupt trigger.

There is no way to bind to this driver from firmware and no explicit
platform device creation calls exist in mainline.

As such it is dead code. So drop it rather than potentially wasting time
modernizing it (see #1)

Link: https://lore.kernel.org/all/20260511063229.1433-1-sozdayvek@gmail.com/
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: accel: mma8452: Use dev_err_probe()
Sanjay Chitroda [Tue, 5 May 2026 17:46:35 +0000 (23:16 +0530)] 
iio: accel: mma8452: Use dev_err_probe()

dev_err_probe() makes error code handling simpler and handle
deferred probe nicely (avoid spamming logs).

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: accel: mma8452: sort headers alphabetically
Sanjay Chitroda [Tue, 5 May 2026 17:46:34 +0000 (23:16 +0530)] 
iio: accel: mma8452: sort headers alphabetically

Sort include headers alphabetically to improve readability.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: accel: mma8452: cleanup codestyle warning
Sanjay Chitroda [Tue, 5 May 2026 17:46:33 +0000 (23:16 +0530)] 
iio: accel: mma8452: cleanup codestyle warning

Reported by checkpatch:
FILE: drivers/iio/accel/mma8452.c

CHECK: Alignment should match open parenthesis

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: accel: mma8452: switch to non-devm request_threaded_irq()
Sanjay Chitroda [Tue, 5 May 2026 17:46:32 +0000 (23:16 +0530)] 
iio: accel: mma8452: switch to non-devm request_threaded_irq()

Avoid using devm_request_threaded_irq() as the driver requires explicit
error-handling path(s). Using devm_* API together with goto-based
unwinding breaks the expected LIFO resource release model.

Add explicit IRQ cleanup in the driver teardown paths to follow kernel
resource management conventions.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: accel: mma8452: handle I2C read error(s) in mma8452_read()
Sanjay Chitroda [Tue, 5 May 2026 17:46:31 +0000 (23:16 +0530)] 
iio: accel: mma8452: handle I2C read error(s) in mma8452_read()

Currently, If i2c_smbus_read_i2c_block_data() fails but
mma8452_set_runtime_pm_state() succeeds, mma8452_read() returns 0.

As a result, the caller mma8452_read_raw() assumes the read was
successful and proceeds to use a buffer containing uninitialized
stack memory.

Add proper checking of the I2C read return value and propagate errors
to the caller.

Fixes: 96c0cb2bbfe0 ("iio: mma8452: add support for runtime power management")
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: dac: ad5504: introduce local dev pointer
Taha Ed-Dafili [Sat, 9 May 2026 14:20:42 +0000 (15:20 +0100)] 
iio: dac: ad5504: introduce local dev pointer

Replace &spi->dev with a local dev pointer to shorten lines, fix
alignment, and improve overall readability in the probe function.

Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: dac: ad5504: sort headers alphabetically
Taha Ed-Dafili [Sat, 9 May 2026 14:20:40 +0000 (15:20 +0100)] 
iio: dac: ad5504: sort headers alphabetically

Rearrange the include headers in alphabetical order to follow the
standard kernel coding style. This is a preparatory cleanup with
no functional changes.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: chemical: bme680: use BME680_NUM_CHANNELS for scan buffer
Nikhil Gautam [Mon, 20 Apr 2026 08:24:36 +0000 (13:54 +0530)] 
iio: chemical: bme680: use BME680_NUM_CHANNELS for scan buffer

Use BME680_NUM_CHANNELS instead of the hardcoded channel count
in the scan buffer.

This avoids use of a magic number and improves code readability
and maintainability.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: sun20i-gpadc: support non-contiguous channel lookups
Michal Piekos [Sat, 16 May 2026 05:48:37 +0000 (07:48 +0200)] 
iio: adc: sun20i-gpadc: support non-contiguous channel lookups

Using consumer driver like iio-hwmon which resolve channels through
io-channels phandles will fail for sparse channels because IIO core by
default treats phandle argument as index into channel array.
        eg. <&gpadc 1> will fail if there is only channel@1 specified

Add .fwnode_xlate() which maps DT phandle to the registered channel
whose chan->channel matches the hardware channel number. It allows
sparse channel maps to be consumed by drivers like iio-hwmon.

Tested on Radxa Cubie A5E.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Michal Piekos <michal.piekos@mmpsystems.pl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: sun20i-gpadc: add A523 gpadc support
Michal Piekos [Sat, 16 May 2026 05:34:15 +0000 (07:34 +0200)] 
iio: adc: sun20i-gpadc: add A523 gpadc support

A523 differs from existing sun20i-gpadc-iio by having two clocks; bus
clock and module clock.

Change driver to enable all clocks.

Signed-off-by: Michal Piekos <michal.piekos@mmpsystems.pl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agodt-bindings: iio: adc: Add GPADC for Allwinner A523
Michal Piekos [Sat, 16 May 2026 05:34:14 +0000 (07:34 +0200)] 
dt-bindings: iio: adc: Add GPADC for Allwinner A523

Add support for the GPADC for the Allwinner A523. It differs from the
D1/T113s/R329/T507 by having two clocks.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Michal Piekos <michal.piekos@mmpsystems.pl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: veml6030: remove unnecessary read of IT index
Javier Carrasco [Thu, 14 May 2026 01:01:12 +0000 (14:01 +1300)] 
iio: light: veml6030: remove unnecessary read of IT index

This is dead code as the IT index is not used by gts to set the new scale.
In its current form, the value is read but not used afterward. Remove
the dead code.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: xilinx-ams: refactor alarm mapping to table-driven approach
Guilherme Ivo Bozi [Wed, 13 May 2026 00:31:52 +0000 (21:31 -0300)] 
iio: adc: xilinx-ams: refactor alarm mapping to table-driven approach

Replace multiple open-coded switch statements that map between
scan_index, alarm bits, and register offsets with a centralized
table-driven approach.

Introduce a struct-based alarm_map to describe the relationship
between scan indices and alarm offsets, and add a helper to
translate scan_index to event IDs. This removes duplicated logic
across ams_get_alarm_offset(), ams_event_to_channel(), and
ams_get_alarm_mask().

The new approach improves maintainability, reduces code size,
and makes it easier to extend or modify alarm mappings in the
future, while preserving existing behavior.

Signed-off-by: Guilherme Ivo Bozi <guilherme.bozi@usp.br>
Reviewed-by: Salih Erim <salih.erim@amd.com>
Tested-by: Salih Erim <salih.erim@amd.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: xilinx-ams: use guard(mutex) for automatic locking
Guilherme Ivo Bozi [Wed, 13 May 2026 00:31:51 +0000 (21:31 -0300)] 
iio: adc: xilinx-ams: use guard(mutex) for automatic locking

Replace open-coded mutex_lock()/mutex_unlock() pairs with
guard(mutex) to simplify locking and ensure proper unlock on
all control flow paths.

This removes explicit unlock handling, reduces boilerplate,
and avoids potential mistakes in error paths while keeping
the behavior unchanged.

Signed-off-by: Guilherme Ivo Bozi <guilherme.bozi@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Salih Erim <salih.erim@amd.com>
Tested-by: Salih Erim <salih.erim@amd.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling
Guilherme Ivo Bozi [Wed, 13 May 2026 00:31:50 +0000 (21:31 -0300)] 
iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling

ams_event_to_channel() may return a pointer past the end of
dev->channels when no matching scan_index is found. This can lead
to invalid memory access in ams_handle_event().

Add a bounds check in ams_event_to_channel() and return NULL when
no channel is found. Also guard the caller to safely handle this
case.

Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Guilherme Ivo Bozi <guilherme.bozi@usp.br>
Reviewed-by: Salih Erim <salih.erim@amd.com>
Tested-by: Salih Erim <salih.erim@amd.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: opt3001: use macros from bits.h header
Joshua Crofts [Tue, 12 May 2026 10:57:23 +0000 (12:57 +0200)] 
iio: light: opt3001: use macros from bits.h header

Use GENMASK() and BIT() macros from bits.h header where it makes
sense. While at it, remove unused macro.

No functional change.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: opt3001: make headers conform to iwyu
Joshua Crofts [Tue, 12 May 2026 10:57:22 +0000 (12:57 +0200)] 
iio: light: opt3001: make headers conform to iwyu

Remove kernel.h proxy header, device.h, irq.h, slab.h as they are
unnecessary and add missing headers (array_size.h, dev_printk.h,
errno.h, jiffies.h, wait.h) to enforce IWYU principle and reduce
transitive dependencies. Also, replace bitops.h with bits.h as only
the BIT() macro is used.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: add driver for MEMSIC MMC5983MA
Vladislav Kulikov [Mon, 11 May 2026 19:11:35 +0000 (19:11 +0000)] 
iio: magnetometer: add driver for MEMSIC MMC5983MA

Add support for the MEMSIC MMC5983MA 3-axis magnetometer. The driver
provides raw magnetic field readings via IIO sysfs with SET/RESET
offset cancellation for each measurement.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Vladislav Kulikov <vlad.kulikov.c@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agodt-bindings: iio: magnetometer: add MEMSIC MMC5983MA
Vladislav Kulikov [Mon, 11 May 2026 19:11:34 +0000 (19:11 +0000)] 
dt-bindings: iio: magnetometer: add MEMSIC MMC5983MA

Add a Devicetree binding for the MEMSIC MMC5983MA 3-axis
magnetometer.

MMC5983MA is not register-compatible with the existing MEMSIC
magnetometer drivers. It has a different register map, 18-bit output
data format, and I2C/SPI transport support.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Vladislav Kulikov <vlad.kulikov.c@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoDocumentation: iio: make ADXL Y-axis calibbias description consistent
Stepan Ionichev [Wed, 13 May 2026 10:07:52 +0000 (15:07 +0500)] 
Documentation: iio: make ADXL Y-axis calibbias description consistent

The Y-axis calibbias rows in adxl345.rst, adxl313.rst and adxl380.rst
use a different wording than the matching X-axis and Z-axis rows in
the same tables: the X/Z rows say "Calibration offset for the
X/Z-axis accelerometer channel." while the Y row says "Y-axis (or
y-axis) acceleration offset correction".

Make the Y-axis row match the other two so each driver's sysfs
table has consistent capitalisation and wording.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoDocumentation: iio: fix typo in triggered-buffers example
Stepan Ionichev [Thu, 14 May 2026 08:51:57 +0000 (13:51 +0500)] 
Documentation: iio: fix typo in triggered-buffers example

In the "IIO triggered buffer setup" example, iio_triggered_buffer_setup()
is called with "sensor_iio_polfunc" (single 'l') while the function is
defined and later referenced as "sensor_iio_pollfunc" (double 'l'). Fix
the misspelling so the example is consistent.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ad7192: fix GPOCON register access annotation
Stepan Ionichev [Wed, 13 May 2026 10:13:32 +0000 (15:13 +0500)] 
iio: adc: ad7192: fix GPOCON register access annotation

The comment next to AD7192_REG_GPOCON marks the register as RO,
but the AD7192 datasheet (Rev. A, page 24, GPOCON REGISTER) says:
"The GPOCON register is an 8-bit register from which data can be
read or to which data can be written."

The driver itself uses ad_sd_write_reg() against this register in
ad7192_show_scale() / write paths to control the bridge power-down
switch and digital outputs, which matches the RW datasheet
description. Update the comment to RW so it does not mislead
future readers.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: vcnl4000: use lock guard()
Raffael Raiel Trindade [Thu, 14 May 2026 20:11:49 +0000 (17:11 -0300)] 
iio: light: vcnl4000: use lock guard()

Use guard() and scoped_guard() for handling mutex lock instead of manually
locking and unlocking. Remove gotos in error handling logic. This prevents
forgotten locks on early exits.

Signed-off-by: Raffael Raiel Trindade <raffaelraiel@usp.br>
Co-developed-by: Kim Carvalho <kim.ca@usp.br>
Signed-off-by: Kim Carvalho <kim.ca@usp.br>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agodt-bindings: iio: chemical: sensirion,scd30: Update maintainers field
Maxwell Doose [Fri, 15 May 2026 01:16:39 +0000 (20:16 -0500)] 
dt-bindings: iio: chemical: sensirion,scd30: Update maintainers field

Tomasz Duszynski is no longer the maintainer of the SCD30 driver.
Replace his entry with mine.

Link: https://lore.kernel.org/linux-iio/20260507172404.80435-1-m32285159@gmail.com/
Signed-off-by: Maxwell Doose <m32285159@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: fix potential kernel stack memory leak
Joshua Crofts [Fri, 15 May 2026 10:28:23 +0000 (12:28 +0200)] 
iio: magnetometer: ak8975: fix potential kernel stack memory leak

Currently in the AK8975 driver there are four instances where potential
uninitialized kernel stack memory leaks can occur. If
i2c_smbus_read_i2c_block_data_or_emulated() returns a value less than
the size of the buffer, uninitialized bytes are retained in the buffer
and later the buffer is passed on to IIO buffers, potentially leaking
memory to userspace.

Fix this by adding checks whether the return value of the function is
equal to the size of the buffer and subsequently if the value is
lesser than zero to distinguish from a returned error code.

Fixes: bc11ca4a0b84 ("iio:magnetometer:ak8975: triggered buffer support")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260513-ak8975-fix-v1-1-104ea605dd54%40gmail.com
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: ensure device is awake for buffered capture
Joshua Crofts [Wed, 13 May 2026 14:35:52 +0000 (16:35 +0200)] 
iio: magnetometer: ak8975: ensure device is awake for buffered capture

Currently, the ak8975_start_read_axis() can be called while the device
is autosuspended, causing two issues:

1. I2C transfers in the aforementioned function will fail or timeout
because ak8975_runtime_suspend() disables the device regulators.
2. Since ak8975_fill_buffer() does not hold runtime references,
ak8975_runtime_suspend() can run concurrently, and since PM callbacks
do not use a locking mechanism, it may cause a race accessing the
control register via the I2C bus.

Fix this issue by adding struct iio_buffer_setup_ops that contains
preenable and postdisable functions to ensure correct that device is
powered on when running a buffered capture.

Fixes: bc11ca4a0b84 ("iio:magnetometer:ak8975: triggered buffer support")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260511-magnetometer-fixes-post-pickup-v7-0-9d910faa28b6%40gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agostaging: iio: addac: adt7316: document SPI interface switching sequence
Hungyu Lin [Mon, 11 May 2026 14:06:41 +0000 (14:06 +0000)] 
staging: iio: addac: adt7316: document SPI interface switching sequence

The device powers up in I2C mode. Switching to SPI mode
requires sending a sequence of SPI writes as described in
the datasheet.

During this sequence, the device may still be in I2C mode,
so SPI transactions may not be recognized and can fail.
Such errors are therefore ignored.

Add a comment to clarify this behavior.

Datasheet: https://www.analog.com/en/products/adt7316.html
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: consistently use 'data' parameter
Andy Shevchenko [Mon, 11 May 2026 11:26:13 +0000 (13:26 +0200)] 
iio: magnetometer: ak8975: consistently use 'data' parameter

Some of the functions use 'client', some use 'data', and some use both.
Refactor the driver to consistently use 'data' in all cases.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: check if gpiod read was successful
Joshua Crofts [Mon, 11 May 2026 11:26:11 +0000 (13:26 +0200)] 
iio: magnetometer: ak8975: check if gpiod read was successful

Add a check that ensures that valid data has been read from GPIOD. If
not, log an error and return the negative read value.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: modernize polling loops with iopoll() macros
Joshua Crofts [Mon, 11 May 2026 11:26:10 +0000 (13:26 +0200)] 
iio: magnetometer: ak8975: modernize polling loops with iopoll() macros

The driver currently uses while loops and msleep() for polling during
conversion waits.

Replace the custom polling loops with readx_poll_timeout() and
read_poll_timeout() macros from <linux/iopoll.h>. This reduces
boilerplate, standardizes timeout handling and improves overall code
readability, keeping the original timing and error behaviour. Add
<linux/time.h> for USEC_PER_MSEC macro instead of using magic numbers.

Assisted-by: Gemini:3.1-Pro
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoMAINTAINERS: Update maintainer for IIO drivers
Sanjay Chitroda [Mon, 11 May 2026 17:16:43 +0000 (22:46 +0530)] 
MAINTAINERS: Update maintainer for IIO drivers

The listed Analog Devices domain email for Cosmin Tanislav is no
longer valid, and he is no longer maintaining these IIO drivers.

Add Marcelo Schmitt as the maintainer from Analog Devices to continue
support and maintenance of the affected drivers.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoMAINTAINERS: Update Analog Devices IIO drivers entry
Sanjay Chitroda [Mon, 11 May 2026 17:16:42 +0000 (22:46 +0530)] 
MAINTAINERS: Update Analog Devices IIO drivers entry

Lars-Peter Clausen is currently busy and is therefore removed from the
ANALOG DEVICES INC IIO DRIVERS entry, with input from Jonathan.

Add Analog Devices mailing list as contact and Nuno Sá as maintainer
for the ANALOG DEVICES INC IIO DRIVERS entry for coverage support.

Suggested-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: Drop unused driver_data in four i2c drivers
Uwe Kleine-König (The Capable Hub) [Tue, 12 May 2026 12:50:34 +0000 (14:50 +0200)] 
iio: Drop unused driver_data in four i2c drivers

For the four drivers the .driver_data member of i2c_device_id is
write-only. Drop the explicit assignment.

While touching these arrays use a named initializer to assign the .name
member, which is easier to parse for a human.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: hx711: move scale computation to per-device storage
Piyush Patle [Mon, 11 May 2026 17:43:30 +0000 (23:13 +0530)] 
iio: adc: hx711: move scale computation to per-device storage

The gain-to-scale table is global today, so probe-time scale updates for
one device overwrite the values used by any earlier device instance.

Fix this by making the gain table const and storing the computed scale
values per device in hx711_data.

No functional change for single-sensor configurations.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agodt-bindings: iio: adc: hx711: clean up existing binding text
Piyush Patle [Mon, 11 May 2026 17:43:26 +0000 (23:13 +0530)] 
dt-bindings: iio: adc: hx711: clean up existing binding text

Rewrite the binding description and property text so it describes the
existing HX711 hardware behavior directly instead of documenting old
driver implementation details.

Also clarify that clock-frequency controls the SCK bit-bang timing.

No functional change.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agodt-bindings: iio: adc: qcom,pm8018-adc: add label property for ADC channels
Antony Kurniawan Soemardi [Sun, 10 May 2026 07:01:33 +0000 (07:01 +0000)] 
dt-bindings: iio: adc: qcom,pm8018-adc: add label property for ADC channels

Add a new optional label property for ADC channels to help users
identify each channel when reading values from the sysfs interface.

Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels
Antony Kurniawan Soemardi [Sun, 10 May 2026 07:01:45 +0000 (07:01 +0000)] 
iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels

Implement the .read_label callback to allow userspace to identify ADC
channels via the "label" property in the device tree. The name field in
pm8xxx_chan_info is renamed to label to better reflect its purpose. If
no label is provided in the device tree, it defaults to the hardware
datasheet name.

The change has been tested on Sony Xperia SP (PM8921).

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: qcom-pm8xxx-xoadc: remove redundant error logs when reading values
Antony Kurniawan Soemardi [Sun, 10 May 2026 07:01:41 +0000 (07:01 +0000)] 
iio: adc: qcom-pm8xxx-xoadc: remove redundant error logs when reading values

Drop dev_err() logging for -EINVAL and -ETIMEDOUT cases and rely on
return values to report errors, reducing unnecessary log noise.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: accel: adxl355: replace usleep_range() with fsleep()
Stepan Ionichev [Sun, 10 May 2026 11:38:52 +0000 (16:38 +0500)] 
iio: accel: adxl355: replace usleep_range() with fsleep()

The "at least 5ms" wait after software reset has no specific upper
bound. Use fsleep() with 5 * USEC_PER_MSEC to make the unit
explicit at the call site.

No functional change.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ad7192: replace usleep_range() with fsleep()
Stepan Ionichev [Mon, 11 May 2026 02:55:44 +0000 (07:55 +0500)] 
iio: adc: ad7192: replace usleep_range() with fsleep()

The AD7192 datasheet (Rev. A, page 34, RESET section) says:
"When a reset is initiated, the user must allow a period of
500 us before accessing any of the on-chip registers."

Use fsleep(500) instead of usleep_range(500, 1000).

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init
Md Shofiqul Islam [Sat, 9 May 2026 15:19:59 +0000 (18:19 +0300)] 
iio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init

The driver was enabling the internal test signal (INT_TEST), double
amplitude (TEST_AMP), and fast frequency (TEST_FREQ_FAST) bits in
CONFIG2 during initialization. These bits activate an internal square
wave generator intended for device testing and calibration, not normal
ECG operation.

CONFIG2 defaults to having only the RESERVED bit set after reset, which
is the correct value for normal operation. Remove the write entirely
since it would just be writing the reset default value.

Suggested-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ti-ads1298: Add parentheses around macro parameter
Md Shofiqul Islam [Sat, 9 May 2026 15:19:57 +0000 (18:19 +0300)] 
iio: adc: ti-ads1298: Add parentheses around macro parameter

ADS1298_REG_CHnSET() is missing parentheses around the parameter 'n'.
Add them to follow kernel macro coding style and prevent potential
operator precedence issues if the argument is an expression.

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ti-ads1298: Fix incorrect timeout comment
Md Shofiqul Islam [Sun, 10 May 2026 19:34:35 +0000 (22:34 +0300)] 
iio: adc: ti-ads1298: Fix incorrect timeout comment

At the lowest supported data rate of 250Hz, one conversion period is
4ms, not 40ms. The 50ms timeout is deliberately conservative to allow
for kernel scheduling latency, which can be significant under load or
on slow machines.

Fix the comment to state the correct conversion time, use "lowest sample
rate" for clarity, and explain that the extra margin exists to absorb
scheduling latency so that no one is tempted to shrink the timeout to
match the conversion period.

Also drop the redundant ret variable assignment by using the return value
of wait_for_completion_timeout() directly in the if() condition.

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: frequency: adrf6780: replace usleep_range() with fsleep()
Stepan Ionichev [Mon, 11 May 2026 05:44:41 +0000 (10:44 +0500)] 
iio: frequency: adrf6780: replace usleep_range() with fsleep()

The ADRF6780 datasheet (Rev. D, page 23, ADC section) says:
"Wait approximately 200 us for the ADC to be ready."

fsleep(200) expands to the same usleep_range(200, 250). Use the
flexible sleep helper, which picks the right primitive for the
given microsecond delay.

Replace the generic "Recommended delay for the ADC to be ready"
comment with the datasheet reference so the "why" of the wait is
visible at the call site.

No functional change.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ad7793: replace usleep_range() with fsleep()
Stepan Ionichev [Mon, 11 May 2026 05:30:43 +0000 (10:30 +0500)] 
iio: adc: ad7793: replace usleep_range() with fsleep()

The AD7792/AD7793 datasheet (Rev. B, page 25, RESET section)
says: "When a reset is initiated, the user must allow a period
of 500 us before accessing any of the on-chip registers."

Use fsleep(500) instead of usleep_range(500, 2000). The 500 us
minimum stays the same; fsleep() picks the upper slack itself
(about +25% on a default config -- narrower than the original
2000 us).

Add a code comment with the datasheet reference so the "why"
of the wait is visible at the call site.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: chemical: scd30: reject (response=NULL, size>0) in scd30_i2c_command()
Stepan Ionichev [Thu, 7 May 2026 15:28:00 +0000 (20:28 +0500)] 
iio: chemical: scd30: reject (response=NULL, size>0) in scd30_i2c_command()

scd30_i2c_command() takes an opaque "response" buffer plus its size.
At the start of the function the code already checks if response is
NULL (via the rsp local), but the response-decoding loop after the
i2c transfer always dereferences rsp without re-checking. With the
current callers in scd30_core.c this is harmless, since write
commands pass response=NULL together with size=0 (so the loop body
is never entered).

The (response=NULL, size>0) combination has no useful meaning: there
is nowhere to put the bytes that come back from the chip. Treat it
as an invalid argument and bail out at the top of the function with
-EINVAL, instead of silently doing the i2c transfer and dereferencing
a NULL pointer in the decode loop.

smatch flagged the inconsistency:

  drivers/iio/chemical/scd30_i2c.c:104 scd30_i2c_command() error: we
    previously assumed rsp could be null (see line 77)

No functional change for the existing callers, which only ever use
(response=NULL, size=0) for writes and (response!=NULL, size>0) for
reads.

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Acked-by: Maxwell Doose <m32285159@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: chemical: scd30: make command lookup table const
Giorgi Tchankvetadze [Fri, 8 May 2026 13:39:17 +0000 (17:39 +0400)] 
iio: chemical: scd30: make command lookup table const

scd30_i2c_cmd_lookup_tbl contains fixed opcodes and is
only read by scd30_i2c_command(). Make it const to document that it's immutable
and allow it to be placed in read-only memory.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
Acked-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: yamaha-yas530: replace usleep_range() with fsleep()
Andy Shevchenko [Fri, 8 May 2026 06:08:35 +0000 (08:08 +0200)] 
iio: magnetometer: yamaha-yas530: replace usleep_range() with fsleep()

Replace usleep_range() with fsleep() to allow the kernel
to select the most appropriate delay mechanism based on duration.
Using USEC_PER_MSEC makes the unit conversion explicit.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: yamaha-yas530: Use devm_mutex_init() for mutex initialization
Andy Shevchenko [Fri, 8 May 2026 06:08:34 +0000 (08:08 +0200)] 
iio: magnetometer: yamaha-yas530: Use devm_mutex_init() for mutex initialization

Use devm_mutex_init() since it brings some benefits when
CONFIG_DEBUG_MUTEXES is enabled.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: yamaha-yas530: Get rid of i2c_client_get_device_id()
Andy Shevchenko [Fri, 8 May 2026 06:08:33 +0000 (08:08 +0200)] 
iio: magnetometer: yamaha-yas530: Get rid of i2c_client_get_device_id()

Instead of relying on the name from ID table, which might be ambiguous
in some cases, use explicit product label in the driver data. With that
being done, get rid of i2c_client_get_device_id() call.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoMAINTAINERS: Add myself as SCD30 maintainer
Maxwell Doose [Thu, 7 May 2026 17:24:04 +0000 (12:24 -0500)] 
MAINTAINERS: Add myself as SCD30 maintainer

The current maintainer's email is no longer valid and the driver is
being orphaned. Replace his entry with mine, as I am volunteering to
take over.

Link: https://lore.kernel.org/linux-iio/20260507170950.37a46820@jic23-huawei/T/#t
Signed-off-by: Maxwell Doose <m32285159@gmail.com>
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ingenic-adc: use guard()() and scoped_guard() to handle synchronisation
Felipe Ribeiro de Souza [Wed, 6 May 2026 02:24:30 +0000 (23:24 -0300)] 
iio: adc: ingenic-adc: use guard()() and scoped_guard() to handle synchronisation

Replace mutex_lock() and mutex_unlock() calls with guard()() in
functions ingenic_adc_set_adcmd(), ingenic_adc_set_config(),
ingenic_adc_enable(), ingenic_adc_capture(), and with scoped_guard()
in function ingenic_adc_read_chan_info_raw().

This removes the need to call the unlock function, as the lock is
automatically released when the function return or the scope exits
for any other case.

Signed-off-by: Felipe Ribeiro de Souza <felipers@ime.usp.br>
Co-developed-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Signed-off-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ingenic-adc: refactor ingenic_adc_read_chan_info_raw()
Felipe Ribeiro de Souza [Wed, 6 May 2026 02:24:29 +0000 (23:24 -0300)] 
iio: adc: ingenic-adc: refactor ingenic_adc_read_chan_info_raw()

Extract the sample logic from ingenic_adc_read_chan_info_raw() into
a new helper function __ingenic_adc_read_chan() to improve code
readability and modularity.

The helper handles the mutex-protected section for sampling channels,
while the main function manages mutex and clock enabling/disabling.

Signed-off-by: Felipe Ribeiro de Souza <felipers@ime.usp.br>
Co-developed-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Signed-off-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ingenic-adc: rename ingenic_adc_enable_unlocked() function
Felipe Ribeiro de Souza [Wed, 6 May 2026 02:24:28 +0000 (23:24 -0300)] 
iio: adc: ingenic-adc: rename ingenic_adc_enable_unlocked() function

Rename ingenic_adc_enable_unlocked() to __ingenic_adc_enable() to
better reflect that this helper must be called with the lock held.

Signed-off-by: Felipe Ribeiro de Souza <felipers@ime.usp.br>
Co-developed-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Signed-off-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: unify return code variable name
Andy Shevchenko [Tue, 5 May 2026 11:46:09 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: unify return code variable name

In one case 'rc' is used in the other 'err', the most use 'ret'.
Make the latter use the former, id est 'ret'.

While at it, drop unneeded ' < 0' checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: reduce usage of magic lengths of the buffer
Andy Shevchenko [Tue, 5 May 2026 11:46:08 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: reduce usage of magic lengths of the buffer

Reduce usage of magic lengths of the supplied buffer by replacing them
with the corresponding sizeof():s.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: remove duplicate error message
Andy Shevchenko [Tue, 5 May 2026 11:46:07 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: remove duplicate error message

The devm_request_irq() already prints an error message.
Remove the duplicate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: drop duplicate NULL check
Andy Shevchenko [Tue, 5 May 2026 11:46:06 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: drop duplicate NULL check

The gpiod_set_consumer_name() is NULL-aware, no need to perform the same
check in the caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: avoid using temporary variable
Andy Shevchenko [Tue, 5 May 2026 11:46:05 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: avoid using temporary variable

Avoid using temporary variable in ak8975_read_axis(). With that being done,
the clamp_t() call becomes idiomatic in the driver and can be factored out
to a helper later on (and if needed).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: pass conversion timeouts as arguments
Joshua Crofts [Tue, 5 May 2026 11:46:02 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: pass conversion timeouts as arguments

Refactor wait_conversion_complete*_() helper function to accept poll
and timeout values directly as parameters. This improves the
readability of the code and does not rely on hardcoded macros.

Besides that, fix the home grown and obviously wrong in some cases the
jiffy-based timeout.

Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: fix wrong errno on return
Joshua Crofts [Tue, 5 May 2026 11:46:01 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: fix wrong errno on return

The driver currently returns -EINVAL on polling timeout instead of
-ETIMEDOUT.

Replace return code for -ETIMEDOUT and remove unnecessary error
message as -ETIMEDOUT is a standard POSIX error. Also replace
instances of -EINVAL in comments.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: change 'u8*' to 'u8 *' in cast
Joshua Crofts [Tue, 5 May 2026 11:46:00 +0000 (13:46 +0200)] 
iio: magnetometer: ak8975: change 'u8*' to 'u8 *' in cast

Change 'u8*' cast to 'u8 *' as the former triggers a checkpatch error.
Also fix the indentation of parameters in
i2c_smbus_read_i2c_block_data_or_emulated() function.

No functional change.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: replace usleep_range() with fsleep()
Joshua Crofts [Tue, 5 May 2026 11:45:59 +0000 (13:45 +0200)] 
iio: magnetometer: ak8975: replace usleep_range() with fsleep()

Replace usleep_range() calls with fsleep(), passing the minimum value
required by the sensor for hardware delays.

fsleep() automatically selects the optimal sleep mechanism, simplifying
driver code and time management.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: update headers per IWYU principle
Joshua Crofts [Tue, 5 May 2026 11:45:58 +0000 (13:45 +0200)] 
iio: magnetometer: ak8975: update headers per IWYU principle

Remove kernel.h proxy header and unused headers (slab.h, iio/sysfs.h,
iio/trigger.h). Add missing headers to ensure atomicity (array_size.h,
dev_printk.h, asm/byteorder.h, irqreturn.h, minmax.h, property.h,
types.h, wait.h).

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

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: sort headers alphabetically
Joshua Crofts [Tue, 5 May 2026 11:45:57 +0000 (13:45 +0200)] 
iio: magnetometer: ak8975: sort headers alphabetically

Sort include headers alphabetically to improve coding style and
readability.

No functional change.

Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
Andy Shevchenko [Wed, 6 May 2026 08:27:55 +0000 (10:27 +0200)] 
iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call

On the failure in the ak8975_read_axis() the PM runtime gets unbalanced.
Balance it by calling pm_runtime_put_autosuspend() on error path as well.

Fixes: cde4cb5dd422 ("iio: magn: ak8975: deploy runtime and system PM")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260505-magnetometer-fixes-v5-0-831b9b5550fc%40gmail.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: ABI: Add DAC 500ohm, 3.85kohm, and 16kohm powerdown modes
Kim Seer Paller [Tue, 5 May 2026 04:34:31 +0000 (12:34 +0800)] 
iio: ABI: Add DAC 500ohm, 3.85kohm, and 16kohm powerdown modes

Add powerdown mode entries for DACs with 500 Ohm, 3.85 kOhm, and
16 kOhm resistor to ground output impedance states. These are used
by the AD3531/AD3531R 4-channel DAC.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adxl313: fix typos in documentation
Wang Zihan [Tue, 5 May 2026 09:22:43 +0000 (17:22 +0800)] 
iio: adxl313: fix typos in documentation

Add missing space in "ADXL313is" and improve grammar for
"a single types of channels" to "multiple channels of a single type"
as suggested by Jonathan Cameron.

Wrap long line as suggested by Andy Shevchenko.

Signed-off-by: Wang Zihan <jiyu03@qq.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: iqs621-als: prefer early error handling over if (!ret)
Pedro Barletta Gennari [Wed, 29 Apr 2026 01:29:55 +0000 (22:29 -0300)] 
iio: light: iqs621-als: prefer early error handling over if (!ret)

Handle errors as early as possible by replacing 'if (!ret)' with the
more common form 'if (ret)'. This makes the code easier to read.

Signed-off-by: Pedro Barletta Gennari <pedro.pbg@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: iqs621-als: use lock guards
Pedro Barletta Gennari [Wed, 29 Apr 2026 01:29:54 +0000 (22:29 -0300)] 
iio: light: iqs621-als: use lock guards

Use guard(mutex)() for handling mutex lock instead of
manually locking and unlocking the mutex. This prevents forgotten
locks due to early exits and removes the need of gotos.

Signed-off-by: Pedro Barletta Gennari <pedro.pbg@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: mcp3422: write bit operations using bitfield.h APIs
Marcelo Machado Lage [Wed, 29 Apr 2026 22:44:01 +0000 (19:44 -0300)] 
iio: adc: mcp3422: write bit operations using bitfield.h APIs

Replace manual bit manipulations with FIELD_GET(), FIELD_PREP() and
FIELD_MODIFY() calls. The resulting code is more readable and
maintainable, and 6 macros previously defined in the header are not
needed anymore.

Signed-off-by: Marcelo Machado Lage <marcelomlage@usp.br>
Co-developed-by: Vinicius Lira <vinilira@usp.br>
Signed-off-by: Vinicius Lira <vinilira@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: mcp3422: rewrite mask macros with help of bits.h APIs
Marcelo Machado Lage [Wed, 29 Apr 2026 22:44:00 +0000 (19:44 -0300)] 
iio: adc: mcp3422: rewrite mask macros with help of bits.h APIs

Rewrite MCP3422_CHANNEL_MASK, MCP3422_SRATE_MASK, MCP3422_PGA_MASK
and MCP3422_CONT_SAMPLING using GENMASK() and BIT() macros from
bits.h.

The other macros MCP3422_SRATE_{240, 60, 15, 3} were not changed
because they are also used as array indices.

Signed-off-by: Marcelo Machado Lage <marcelomlage@usp.br>
Co-developed-by: Vinicius Lira <vinilira@usp.br>
Signed-off-by: Vinicius Lira <vinilira@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: magnetometer: rm3100: Modernize locking and refactor control flow
Maxwell Doose [Thu, 30 Apr 2026 12:41:47 +0000 (07:41 -0500)] 
iio: magnetometer: rm3100: Modernize locking and refactor control flow

Replace mutex_lock() and mutex_unlock() calls in rm3100-core.c with
the more modern guard(mutex)() family. This will help modernize the
driver and bring it up-to-date with modern available macros/functions.

While replacing mutex_lock() and mutex_unlock(), the critical sections
of rm3100_read_mag() and rm3100_get_samp_freq() have been extended to
include negligible operations for cleaner logic.

Add new helper-wrapper function rm3100_regmap_bulk_read_locked() to
help keep rm3100_trigger_handler() switch-cases clean while maintaining
mutex locking and avoiding re-entrancy risks from potential callbacks.

While at it, remove redundant gotos where applicable, and use direct
returns instead. In addition, remove regmap variable in
rm3100_trigger_handler() as its references have been replaced with
variable data.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: use guard(mutex)() macro
Joshua Crofts [Tue, 5 May 2026 07:31:33 +0000 (09:31 +0200)] 
iio: light: si1133: use guard(mutex)() macro

Remove mutex_lock()/mutex_unlock() and goto instances and add
guard(mutex)() macro to modernize driver and improve mutex handling.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: add local variable for timeout
Joshua Crofts [Tue, 5 May 2026 07:31:32 +0000 (09:31 +0200)] 
iio: light: si1133: add local variable for timeout

Add local variable for timeout to improve readability.

No functional change.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: group generic <linux/*> headers
Joshua Crofts [Tue, 5 May 2026 07:31:31 +0000 (09:31 +0200)] 
iio: light: si1133: group generic <linux/*> headers

Group generic <linux/*> include headers to improve code style.

No functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: add missing include headers
Joshua Crofts [Tue, 5 May 2026 07:31:30 +0000 (09:31 +0200)] 
iio: light: si1133: add missing include headers

Add missing include headers to prevent compilation relying on transient
dependencies (array_size.h, bitops.h, completion.h, dev_printk.h, err.h,
jiffies.h, math.h, mod_devicetable.h, mutex.h, types.h).

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: prefer complex macros enclosed in parenthesis
Joshua Crofts [Tue, 5 May 2026 07:31:29 +0000 (09:31 +0200)] 
iio: light: si1133: prefer complex macros enclosed in parenthesis

Enclose complex macros in parenthesis per checkpatch.pl error to
improve code style.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: remove unused macros
Joshua Crofts [Tue, 5 May 2026 07:31:28 +0000 (09:31 +0200)] 
iio: light: si1133: remove unused macros

Remove unused macros unrelated to hardware definition.

No functional change.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: prevent race condition on timeout
Joshua Crofts [Tue, 5 May 2026 07:31:27 +0000 (09:31 +0200)] 
iio: light: si1133: prevent race condition on timeout

Sashiko reported a bug where the si1133_command exits on timeout
without halting the sensor or masking the interrupt. If the sensor
completes the command later, any subsequent command to the sensor
will cause the IRQ handler to complete immediately, returning stale
data to the driver all while the command hasn't finished yet, shifting
all potential reads in the future.

Fix this by masking the IRQ if wait_for_completion_timeout() fails.
When initiating a new command, do a dummy read of the IRQ_STATUS
register and turn the IRQ back on.

Fixes: e01e7eaf37d8 ("iio: light: introduce si1133")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/message/20260428-si1133-checkup-v2-5-70ad14bfefe2%40gmail.com
Assisted-by: gemini:gemini-3.1-pro-preview
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: si1133: reset counter to prevent race condition
Joshua Crofts [Tue, 5 May 2026 07:31:26 +0000 (09:31 +0200)] 
iio: light: si1133: reset counter to prevent race condition

Sashiko reported a potential race condition happening when the driver
returns an errno after a timeout in the si1133_command() function. The
premature exit causes the hardware and software counters to become out
of sync by not updating data->rsp_seq, therefore the internal hardware
counter keeps incrementing.

Fix this by adding a call to si1133_cmd_reset_counter() before returning
from timeout.

Fixes: e01e7eaf37d8 ("iio: light: introduce si1133")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/message/20260428-si1133-checkup-v2-5-70ad14bfefe2%40gmail.com
Assisted-by: gemini:gemini-3.1-pro-preview
Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: gyro: adxrs290: Use guard(mutex) in lieu of manual lock+unlock
Guilherme Dias [Mon, 4 May 2026 19:04:25 +0000 (16:04 -0300)] 
iio: gyro: adxrs290: Use guard(mutex) in lieu of manual lock+unlock

Use guard(mutex)() to automatically release the lock on scope exit,
simplifying the error handling path and removing the need for
explicit unlock and goto-based cleanup.

Signed-off-by: Guilherme Dias <guilhermeabreu200105@usp.br>
Co-developed-by: João Paulo Menezes Linaris <jplinaris@usp.br>
Signed-off-by: João Paulo Menezes Linaris <jplinaris@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: Move MODULE_DEVICE_TABLE next to the table itself
Krzysztof Kozlowski [Tue, 5 May 2026 10:29:04 +0000 (12:29 +0200)] 
iio: Move MODULE_DEVICE_TABLE next to the table itself

By convention MODULE_DEVICE_TABLE() immediately follows the ID table it
exports, because this is easier to read and verify.  It also makes more
sense since #ifdef for ACPI or OF could hide both of them.

Most of the drivers already have this correctly placed, so adjust
the missing ones.  No functional impact.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: stk3310: Use sizeof() for regmap_bulk_read/write count parameter
Miao Li [Mon, 4 May 2026 03:04:08 +0000 (11:04 +0800)] 
iio: light: stk3310: Use sizeof() for regmap_bulk_read/write count parameter

Convert the hardcoded count parameter to sizeof(buf) for all
regmap_bulk_write() and regmap_bulk_read() calls in this driver
to improve code maintainability. For details, see [1].

Link: https://lore.kernel.org/all/20260428192213.7c5c80e5@jic23-huawei/
Signed-off-by: Miao Li <limiao@kylinos.cn>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: stk3310: Replace uint32_t with u32 and reorder members to eliminate padding
Miao Li [Mon, 4 May 2026 03:04:07 +0000 (11:04 +0800)] 
iio: light: stk3310: Replace uint32_t with u32 and reorder members to eliminate padding

Replace the uint32_t type members in struct stk3310_data with u32
to adhere to the unified kernel coding style, and reorder the member
variables to eliminate memory padding holes.

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Miao Li <limiao@kylinos.cn>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: stk3310: Deal with the ps interrupt issue in PM
Miao Li [Mon, 4 May 2026 03:04:06 +0000 (11:04 +0800)] 
iio: light: stk3310: Deal with the ps interrupt issue in PM

On the Inspur HS326 laptop(which integrated with HiSilicon M900
processor), if the STK3311-X chip's PS interrupt is configured
in "Recommended interrupt mode", the interrupt cannot be triggered
normally after waking from suspend or hibernation.

In this case, neither disabling and re-enabling the interrupt nor
resetting the PS threshold register can restore the interrupt to
normal operation.

If the interrupt is disabled in suspend() then reset the PS threshold
register and enable the interrupt in resume(). This resolves the issue.

Signed-off-by: Miao Li <limiao@kylinos.cn>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agostaging: iio: ad9834: fix chip name typo in comments
Angus Gardner [Mon, 4 May 2026 09:20:59 +0000 (19:20 +1000)] 
staging: iio: ad9834: fix chip name typo in comments

Two comments incorrectly refer to 'AD9843' instead of 'AD9834'.
Fix the copy-paste typo.

Signed-off-by: Angus Gardner <angusg778@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agostaging: iio: ad9834: use dev_err_probe() in probe function
Angus Gardner [Mon, 4 May 2026 09:20:58 +0000 (19:20 +1000)] 
staging: iio: ad9834: use dev_err_probe() in probe function

Replace open-coded dev_err() + return sequences with dev_err_probe(),
which is the preferred pattern for probe error paths as it handles
deferred probing correctly and reduces boilerplate.

Convert all three remaining instances in ad9834_probe():
 - master clock enable failure
 - device init SPI sync failure

The avdd regulator path already used dev_err_probe().

Signed-off-by: Angus Gardner <angusg778@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agostaging: iio: ad9834: simplify -ENOMEM return in probe
Angus Gardner [Mon, 4 May 2026 09:20:57 +0000 (19:20 +1000)] 
staging: iio: ad9834: simplify -ENOMEM return in probe

devm_iio_device_alloc() failure returns -ENOMEM via a local variable
unnecessarily. Return -ENOMEM directly instead.

Signed-off-by: Angus Gardner <angusg778@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: rcar: Fix up Marek Vasut MAINTAINERS entry
Marek Vasut [Wed, 29 Apr 2026 19:27:23 +0000 (21:27 +0200)] 
iio: adc: rcar: Fix up Marek Vasut MAINTAINERS entry

Use up to date address. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: stk3310: Update includes to match IWYU
Rafael G. Dias [Tue, 28 Apr 2026 16:13:39 +0000 (13:13 -0300)] 
iio: light: stk3310: Update includes to match IWYU

Clean up the included headers in stk3310.c according to the
Include-What-You-Use (IWYU) tool. Remove the generic <linux/kernel.h>
header and add explicit dependencies to improve compilation accuracy.

Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: light: stk3310: Sort headers alphabetically
Rafael G. Dias [Tue, 28 Apr 2026 16:13:38 +0000 (13:13 -0300)] 
iio: light: stk3310: Sort headers alphabetically

Sort the included headers alphabetically and group the <linux/iio/*>
headers separately from the generic <linux/*> headers.

Co-developed-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Felipe Khoury Dayoub <felipedayoub@usp.br>
Signed-off-by: Rafael G. Dias <rafael.guimaraes.dias@usp.br>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: frequency: ad9832: simplify bitwise math
Joshua Crofts [Sun, 19 Apr 2026 18:36:23 +0000 (20:36 +0200)] 
iio: frequency: ad9832: simplify bitwise math

Refactor the ad9832_calc_freqreg by removing the redundant u64 casts
and 1L bitwise left shift and replacing the multiplication by a bit
shift, as multiplying integers by a power of two is identical to a
bitwise left shift.

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>
3 weeks agoiio: buffer: Move from int64_t to s64 for timestamp
Andy Shevchenko [Mon, 27 Apr 2026 18:51:47 +0000 (20:51 +0200)] 
iio: buffer: Move from int64_t to s64 for timestamp

iio_push_to_buffers_with_ts_unaligned() uses int64_t for timestamp.
Move it from int64_t to s64 to make consistent with:
- iio_push_to_buffers_with_ts()
- all current users that supply s64 anyway

This will reduce potential of wrong type being chosen when using
this API.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: temperature: maxim_thermocouple: Fix indentation in of_match table
Rahman Mahmutović [Mon, 27 Apr 2026 20:20:16 +0000 (22:20 +0200)] 
iio: temperature: maxim_thermocouple: Fix indentation in of_match table

Replace leading spaces with tabs in the of_device_id table
entries to comply with kernel coding style.

Signed-off-by: Rahman Mahmutović <mahmutovicrahman5@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: dac: ad5706r: Add support for AD5706R DAC
Alexis Czezar Torreno [Mon, 27 Apr 2026 06:23:17 +0000 (14:23 +0800)] 
iio: dac: ad5706r: Add support for AD5706R DAC

Add support for the Analog Devices AD5706R, a 4-channel 16-bit
current output digital-to-analog converter with SPI interface.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agodt-bindings: iio: dac: Add ADI AD5706R
Alexis Czezar Torreno [Mon, 27 Apr 2026 06:23:16 +0000 (14:23 +0800)] 
dt-bindings: iio: dac: Add ADI AD5706R

Add device tree binding documentation for the Analog Devices
AD5706R 4-channel 16-bit current output digital-to-analog converter.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: adc: ad7625: fix type mismatch in clamp() macro
Giorgi Tchankvetadze [Sat, 25 Apr 2026 07:16:16 +0000 (11:16 +0400)] 
iio: adc: ad7625: fix type mismatch in clamp() macro

clamp() expects compatible operand types. The period calculation uses
nanosecond constants, while the local target variable was narrower than
the upper bound expression.

Make target unsigned long and use unsigned long bounds, including
NSEC_PER_USEC for the upper limit. This keeps the operands naturally
aligned without adding casts.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
3 weeks agoiio: ssp_sensors: cleanup codestyle warning
Sanjay Chitroda [Sun, 26 Apr 2026 09:17:02 +0000 (14:47 +0530)] 
iio: ssp_sensors: cleanup codestyle warning

Reported by checkpatch:
FILE: drivers/iio/common/ssp_sensors/ssp_dev.c

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

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>