summaryrefslogtreecommitdiff
path: root/drivers/iio
AgeCommit message (Collapse)Author
2026-05-31iio: adc: ad4080: add support for AD4884Antoniu Miclaus
Add support for the AD4884, a dual-channel, 16-bit, 40 MSPS SAR ADC. The AD4884 is the dual-channel variant of the AD4084, sharing the same register map and SPI interface as the rest of the AD4080 family. Like the AD4880, it uses two independent ADC channels, each with its own SPI configuration interface. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31light: tsl2591: simplify tsl2591_persist functions via lookup tableMatheus Silveira
Replace switch statements with an indexed lookup table for persist cycle conversions. Both functions contain redundant switch statements. This reduces code duplication and makes future updates to TSL2591_PRST_ALS_INT_CYCLE_* definitions easier to maintain by keeping the mapping in a single place. Signed-off-by: Matheus Silveira <matheus.feitosa@usp.br> Co-developed-by: Lucas Rabaquim <lucas.rabaquim@usp.br> Signed-off-by: Lucas Rabaquim <lucas.rabaquim@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: Use named initializers for platform_device_id arraysUwe Kleine-König (The Capable Hub)
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct platform_device_id replacing .driver_data by an anonymous union. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Add support for ADT7604Liviu Stan
The ADT7604 shares the same die as the LTC2984. It repurposes the custom RTD sensor type (18) as a copper trace resistance sensor and the custom thermistor type (27) as a leak detector, and removes thermocouple, diode and direct ADC sensor types. Two new software sensor type values are introduced (LTC2983_SENSOR_COPPER_TRACE = 32, LTC2983_SENSOR_LEAK_DETECTOR = 33) that map to the hardware register values 18 and 27 respectively. Dedicated structs (ltc2983_copper_trace, ltc2983_leak_detector) and parser functions are added rather than extending the existing RTD and thermistor paths, as the hardware configuration bits are fully hardcoded and several RTD/thermistor properties would need to be explicitly forbidden or ignored. Custom RTD (type 18) becomes the copper trace sensor. Sensor configuration bits are hardcoded to 0b1001 per the datasheet. Two variants are supported via the adi,copper-trace-sub-ohm DT property: sub-ohm traces (< 1 ohm) have bits 17:0 cleared with no excitation current or custom table; standard traces (> 1 ohm) have a required resistance-to-temperature table. Custom thermistor (type 27) becomes the leak detector. Sensor configuration bits are hardcoded to 0b001. The custom table uses a resolution of 16 instead of 64, and is specified via the required adi,custom-leak-detector DT property. Both sensor types expose an IIO_RESISTANCE channel reading from the resistance result register bank (0x0060-0x00AF). Added a "base" parameter to the LTC2983_RESULT_ADDR macro and a "base_reg" parameter to the ltc2983_chan_read function so we can read from both result register banks. The resistance register encodes the measured resistance with 10 fractional bits, so dividing by 1024 gives ohms. Since the sense resistor is specified in ohms, the output is in ohms for both sensor types and a single 1/1024 scale applies to both. For > 1 ohm copper traces and for leak detectors, a secondary channel also appears: IIO_TEMP (millidegrees Celsius) for copper trace and IIO_COVERAGE (percent) for leak detector. The ltc2983_chip_info struct is extended with a u64 supported_sensors bitmask using BIT_ULL() to safely represent the new sensor type bits 32 and 33 on 32-bit builds. A LTC2983_SENSOR_NUM sentinel is added to the enum so that the bounds check uses >= LTC2983_SENSOR_NUM rather than hardcoding the last sensor type. Tested on EVAL-ADT7604-AZ connected to Raspberry Pi 5 via SPI. Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: core: Add IIO_COVERAGE channel typeLiviu Stan
Add a new channel type for sensors that report fractional coverage as a percentage. The sysfs attribute is in_coverageY_raw; after applying in_coverageY_scale the value is in percent. The first user is the ADT7604 leak detector, where the value represents the portion of the sensing element that is wetted. Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Use fwnode_property_present() for optional propertiesLiviu Stan
Checking fwnode_property_read_u32() return value with if (!ret) silently swallows meaningful error codes when a property is present but malformed. Use fwnode_property_present() first so that absence uses the default while a present but unreadable property returns a proper error. Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Fix inconsistent channel wording in messagesLiviu Stan
Replace occurrences of the abbreviated 'chann' and 'chan' with 'channel' in error and debug messages throughout the driver. Also changed the diode invalid channel error message from "thermistor" to "diode". Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Use local device pointer consistentlyLiviu Stan
Some functions define a local 'dev' pointer but still use bare '&st->spi->dev' in some code paths, and some don't have it at all. Replace bare references with the local pointer for consistency and collapse some wrapped lines that now fit within 80 characters. Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Fix macro parenthesization and renameLiviu Stan
Wrap the 'chan' parameter in LTC2983_CHAN_START_ADDR() and LTC2983_CHAN_RES_ADDR() with parentheses to prevent potential macro argument expansion issues. Also rename LTC2983_CHAN_START_ADDR to LTC2983_CHAN_ASSIGN_ADDR and LTC2983_CHAN_RES_ADDR to LTC2983_RESULT_ADDR, to better reflect the datasheet names and avoid them being confused as related. Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Liviu Stan <liviu.stan@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Fix reinit_completion() called after conversion startLiviu Stan
reinit_completion() was called after regmap_write() initiated the hardware conversion, creating a race window where the interrupt could fire and call complete() before reinit_completion() reset the completion. Move reinit_completion() before the regmap_write() to close the race. ltc2983_eeprom_cmd() already does it in the correct order. Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Liviu Stan <liviu.stan@analog.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: temperature: ltc2983: Fix n_wires default bypassing rotation checkLiviu Stan
When adi,number-of-wires is absent, n_wires is left at 0. The binding documents a default of 2 wires, matching the hardware default. However the current-rotate validation checks n_wires == 2 || n_wires == 3, so with n_wires = 0 the guard is bypassed and adi,current-rotate is accepted for a 2-wire RTD. Initialize n_wires = 2 to match the binding default and ensure the rotation check fires correctly when the property is absent. Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Liviu Stan <liviu.stan@analog.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: light: add support for APDS9999 sensorJose A. Perez de Azpillaga
Add IIO driver for Broadcom APDS9999 ambient light sensor. The APDS9999 is a digital proximity and RGB sensor with ALS capability. The driver implements the ALS/Lux functionality using the green channel, which uses optical coating technology to approximate the human eye spectral response. Raw IIO_INTENSITY channels are exposed for red, green, blue, and IR so userspace can compute its own weighted lux. Proximity (PS) support is not yet implemented. Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: spear_adc: align headers with IWYU principleRodrigo Gobbi
Remove unused includes and add what is being used: #include <linux/array_size.h> // for ARRAY_SIZE #include <linux/bits.h> // for GENMASKxx #include <linux/dev_printk.h> // for dev_err_probe, dev_info #include <linux/math.h> // for DIV_ROUND_UP #include <linux/mutex.h> // for struct mutex #include <linux/types.h> // for uXX definitions #include <linux/iio/types.h> // for IIO_CHAN_INFO_* Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: spear_adc: sort includes alphabeticallyRodrigo Gobbi
Sort includes alphabetically, no functional change Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: pressure: cros_ec_baro: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Also drop obvious comment while we're at it. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: light: cros_ec_light_prox: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Also drop obvious comment while we're at it. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: common: cros_ec_sensors: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Also drop obvious comment while we're at it. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: stm32-adc: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: cc10001_adc: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: at91_adc: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: dln2-adc: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: common: scmi_sensors: simplify timestamp channel definitionDavid Lechner
Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of manually filling in the struct iio_chan_spec fields. This makes the code less verbose and mistake-prone. In fact, there was an error here as the sign should be 's' instead of 'u' which is now changed to 's' by using IIO_CHAN_SOFT_TIMESTAMP(). If we find that this breaks userspace, we will have to revert this change, but seems unlikely since the timestamp channel is well-known to be a signed 64-bit integer globally. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literalAndy Shevchenko
Currently IIO_CHAN_SOFT_TIMESTAMP() can only be used to fill the static data. In some cases it would be convenient to use it as right value in the assignment operation. But it can't be done as is, because compiler has no clue about the data layout. Converting it to be a compound literal allows the above mentioned usage. While at it, tidy up the indentation. We also have to change existing uses of compound literal at the same time to avoid compiler errors. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: chemical: sps30: Replace manual locking with RAII lockingMaxwell Doose
Replace manual mutex_lock() and mutex_unlock() calls with the much newer guard(mutex)() macro to enable RAII patterns, modernize the driver, and to increase readability. Move mutex locking into sps30_do_meas() and tune it up to use guard()(), as every caller takes the lock anyways. Signed-off-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: move standalone return to default caseAldo Conte
Move the trailing 'return -EINVAL' statements at the end of tcs3472_read_raw() and tcs3472_write_raw() into explicit default: cases inside the respective switch statements. This removes the need for a separate return statement after the switch. No functional change. Suggested-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: use local struct device * for remaining casesAldo Conte
Use the local 'struct device *dev' variable introduced for the devm calls also for the dev_info() calls in tcs3472_probe(), to keep the probe function consistent. No functional change. Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: use devm for resource managementAldo Conte
Convert the driver to use device-managed resource allocation: - Add tcs3472_powerdown_action() and register it with devm_add_action_or_reset() to ensure the device is powered down on cleanup. - Replace iio_triggered_buffer_setup() with devm_iio_triggered_buffer_setup(). - Replace request_threaded_irq() with devm_request_threaded_irq(). - Replace iio_device_register() with devm_iio_device_register(). - Replace mutex_init() with devm_mutex_init(). - Remove tcs3472_remove() as all cleanup is now handled by devm. Use a local 'dev = &client->dev' in tcs3472_probe() to keep the devm calls compact. Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: use ! instead of explicit NULL checkAldo Conte
Replace 'if (indio_dev == NULL)' with 'if (!indio_dev)' in tcs3472_probe() to follow the preferred kernel style. No functional change. Suggested-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: convert remaining locking to guard(mutex)Aldo Conte
Convert several functions to use guard(mutex)() This avoids manual unlock calls on each return path, drops the goto in tcs3472_write_event(), and removes 'ret' variables only needed to return after the unlock. While the conversion is in progress, take the opportunity to make a few small cleanups that guard() enables: - In tcs3472_read_event_config(), replace '!!(...)' with '(...) ? 1 : 0' for readability. - In tcs3472_write_event_config(), tcs3472_powerdown() and tcs3472_resume() use an early return on the I2C write failure path. No functional change. Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: sort headers alphabeticallyAldo Conte
Sort the #include directives in alphabetical order in preparation for adding new headers in upcoming patches. No functional change. Suggested-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: tcs3472: power down chip on probe failureAldo Conte
If tcs3472_probe() fails after enabling the chip (by writing PON | AEN to the ENABLE register), the error paths return without powering down the device. Add an 'error_powerdown' label at the end of the cleanup chain that calls tcs3472_powerdown() to power down the chip. The existing label cascade is rerouted to fall through to the new label. Move tcs3472_powerdown() above tcs3472_probe() so the probe can call it without a forward declaration. Found by code inspection while reviewing the probe error paths in preparation for the devm_ conversion. Fixes: eb869ade30a6 ("iio: Add tcs3472 color light sensor driver") Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: pressure: HID: hid-sensor-press: Refactor channel initializationNatália Salvino André
Replace the local press_adjust_channel_bit_mask() function with a compound literal for scan_type initialization to improve code readability. Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br> Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: magnetometer: HID: hid-sensor-magn-3d: Refactor channel initializationNatália Salvino André
Replace the local magn_3d_adjust_channel_bit_mask() function with a compound literal for scan_type initialization to improve code readability. Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br> Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: light: HID: hid-sensor-prox: Refactor channel initializationNatália Salvino André
Replace the local prox_adjust_channel_bit_mask() function with a compound literal for scan_type initialization to improve code readability. Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br> Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: light: HID: hid-sensor-als: Refactor channel initializationNatália Salvino André
Replace the local als_adjust_channel_bit_mask() function with a compound literal for scan_type initialization to improve code readability. Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br> Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: gyro: HID: hid-sensor-gyro-3d: Refactor channel initializationNatália Salvino André
Replace the local gyro_3d_adjust_channel_bit_mask() function with a compound literal for scan_type initialization to improve code readability. Additionaly, clean up the channel initialization loop by iterating directly over the channel scan indices. Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br> Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: accel: HID: hid-sensor-accel-3d: Refactor channel initializationNatália Salvino André
Clean up the channel initialization loop and replace the local accel_3d_adjust_channel_bit_mask() function with a compound literal to improve code readability. Signed-off-by: Natália Salvino André <natalia.andre@ime.usp.br> Co-developed-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Pietro Di Consolo Gregorio <pietro.gregorio@usp.br> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: imu: bno055: terminate dev_err() strings with a newlineStepan Ionichev
Two dev_err() calls in bno055_ser_write_reg() and bno055_ser_read_reg() are missing the trailing newline, so the kernel log buffer continues the next message on the same line. Add the missing \n. Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: imu: kmx61: Use guard(mutex)() over manual lockingMaxwell Doose
Include linux/cleanup.h to take advantage of new macros. Replace manual mutex_lock() and mutex_unlock() calls across the file with guard(mutex)() and scoped_guard() where appropriate to simplify error paths and eliminate manual locking calls. Add new helper function kmx61_read_for_each_active_channel() to mitigate certain style issues and to prevent notifying that the IRQ is finished whilst holding the lock. Update certain returns, and add default case to return -EINVAL in kmx61_read_raw(). Remove now-redundant gotos and ret variables, as the new RAII macros make them unneeded. Signed-off-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: humidity: ens210: remove compiler warning workaroundDavid Lechner
Rewrite IIO_CHAN_INFO_RAW case to avoid needing to add unreachable code to work around a compiler warning. When scoped_guard() was first introduced, compilers could not see when it returned unconditionally from inside the hidden for loop. This has since been fixed in the macro definition. So removing the `return -EINVAL` should be enough. Still, we can improve readability, decrease indentation and avoid the hidden for loop by rewriting the case without scoped_guard(). Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: Initialize i2c_device_id arrays using member namesUwe Kleine-König (The Capable Hub)
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Siratul Islam <email@sirat.me> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: proximity: sx9360: Drop unused driver dataUwe Kleine-König (The Capable Hub)
The value assigned in the three device_id entries (ACPI, of and i2c) are unused, directly in the driver and also the sx_common support lib. Drop them and while touching these arrays, convert to named initializers. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: proximity: sx9324: Drop unused driver dataUwe Kleine-König (The Capable Hub)
The value assigned in the three device_id entries (ACPI, of and i2c) are unused, directly in the driver and also the sx_common support lib. Drop them and while touching these arrays, convert to named initializers. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: dac: max5821: Drop unused i2c driver dataUwe Kleine-König (The Capable Hub)
The .driver_data member of the single i2c_device_id array entry is unused in the driver. Drop it and also the then unused definition. While at it, convert the i2c_device_id array to a better readable named initializer. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: adc: ad7091r5: Simplify driver_data handlingUwe Kleine-König (The Capable Hub)
The driver only supports a single device type. So the return value of i2c_get_match_data() is already known and can just be hardcoded without type casting. While at it also remove the unused .data of the single of_device_id entry. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: accel: bmc150: Explicitly set .driver_dataUwe Kleine-König (The Capable Hub)
There is one id entry that has an explicit assignment to .driver_data. To make the intention clearer, assign BOSCH_UNKNOWN (which is also 0) for all previously ids that had .driver_data = 0 implicitly before. While touching all entries in this array, convert to named initializers. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macroDavid Lechner
Remove the SSP_CHAN_TIMESTAMP() macro and replace users with the IIO_CHAN_SOFT_TIMESTAMP() macro. The SSP_CHAN_TIMESTAMP() macro is identical to the IIO_CHAN_SOFT_TIMESTAMP() macro, so we don't need a separate macro for it. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: trigger: drop generic interrupt trigger.Jonathan Cameron
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/ #1 Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-31iio: accel: mma8452: Use dev_err_probe()Sanjay Chitroda
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>
2026-05-31iio: accel: mma8452: sort headers alphabeticallySanjay Chitroda
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>