Commit Graph

9354 Commits

Author SHA1 Message Date
Kees Cook
189f164e57 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
 		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

  	ALLOC(...
  -		, GFP_KERNEL
  	)

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-22 08:26:33 -08:00
Linus Torvalds
323bbfcf1e Convert 'alloc_flex' family to use the new default GFP_KERNEL argument
This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 17:09:51 -08:00
Linus Torvalds
bf4afc53b7 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using

    git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 17:09:51 -08:00
Kees Cook
69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
Greg Kroah-Hartman
9991bbc6d5 IIO: New device support, features and cleanup for the 6.20/7.0 cycle.
Slightly messier than normal unfortunately due to some conflicts
 and build config bugs related to I3C drivers.
 
 One last minute Kconfig fix right at the top after a linux-next report.
 I've simplified the Kconfig and made it match other instances in the kernel
 so that should be safe enough despite short soak time in front of build bots.
 
 Merge of an immutable branch from I3C to get some stubs that were missing
 and caused build issues with dual I2C / I3C drivers. This also brought in a
 drop of some deprecated interfaces so there is also one patch to update a
 new driver to not use those.
 
 We are having another go at using cleanup.h magic with the IIO mode claim
 functions after backing out last try at this. This time we have wrappers
 around the new ACQUIRE() and ACQUIRE_ERR() macros.
 Having been burnt once, we will be taking it a bit more slowly this time
 wrt to wide adoption of these! Thanks in particular to Kurt for taking
 on this core IIO work.
 
 New Device Support
 ==================
 
 adi,ad18113
 - New driver to support the AD18113 amplifier - an interesting device due
   to the external bypass paths where we need to describe what gain those
   paths have in DT. Longer term it will be interesting to see if this
   simplistic description is enough for real deployments.
 adi,ad4062
 - New driver for the AD4060 and AD4052 SAR ADCs including trigger, event
   and GPIO controller support.  Follow up patch replaced use of some
   deprecated I3C interfaces prior to the I3C immutable branch merge as
   that includes dropping them.
 adi,ad4134
 - New driver for the AD4134 24bit 4 channel simultaneous sampling ADC.
 adi,ad7768-1,
 - Add support for the ADAQ767-1, ADAQ7768-1 and ADAQ7769-1 ADCs after some
   rework to enable the driver to support multiple device types.
 adi,ad9467
 - Add support for the similar ad9211 ADC to this existing driver.
 - Make the selection of 2s comp mode explicit for normal operation and
   switch to offset binary when entering calibration mode.
 honeywell,abp2
 - New driver to support this huge family (100+) of board mount pressure and
   temperature sensors.
 maxim,max22007
 - New drier for this 4 channel DAC.
 memsic,mmc5633
 - New driver for this I2C/I3C magnetometer. Follow on patches fixed up
   issues related to single driver supporting both bus types.
 microchip,mcp747feb02
 - New driver for the Microchip MCP47F(E/V)B(0/1/2)1,
   MCP47F(E/V)B(0/1/2)2, MCP47F(E/V)B(0/1/2)4 and MCP47F(E/V)B(0/1/2)8
   buffered voltage output DACs.
 nxp,sar-adc
 - New driver support ADCs found on s32g2 and s32g3 platforms.
 ti,ads1018
 - New drier for the ADS1018 and ADS1118 SPI ADCs.
 ti,ads131m02
 - New driver supporting ADS131M(02/03/04/06/08)24-bit simultaneous sampling
   ADCs.
 
 Features
 ========
 
 iio-core
 - New IIO_DEV_ACQUIRE_DIRECT_MODE() / IIO_DEV_ACQUIRE_FAILED() +
   equivalents for the much rarer case where the mode needs pinning
   whether or not it is in direct mode.  These use the ACQUIRE()
   / ACQUIRE_ERR() infrastructure underneath to provide both simple
   checks on whether we got the requested mode and to provide scope
   based release. Applied in a few initial drivers.
 adi,ad9467
 - Support calibbias control
 adi,adf4377
 - Add support to act as a clock provider.
 adi,adxl380
 - Support low power 1KHz sampling frequency mode. Required rework of
   how events and filters were configured, plus applying of constraints
   when in this mode.
 rf-digital,rfd77402
 - Add interrupt support as alternative to polling for completion.
 st,lsm6dsx
 - Tap event detection (after considerable driver rework)
 
 Cleanup and Minor Fixes
 =======================
 
 More minor cleanup such as typos, white space etc not called out except
 where they were applied to a lot of drivers.
 
 Various drivers.
 - Use of dev_err_probe() to cleanup error handling.
 - Introduce local struct device and struct device_node variables to
   reduce duplication of getting them from containing structs.
 - Ensure uses of iio_trigger_generic_data_rdy_poll() set IRQF_NO_THREAD
   as that function calls non threaded child interrupt handlers.
 - Replace IRQF_ONESHOT in not thread interrupt handlers with
   IRQF_NO_THREAD to ensure they run as intended. Drop one unnecessary case.
 iio-sw-device/trigger.
 - Constify configs_group_operations structures.
 iio-buffer-dma / buffer-dma-engine
 - Use lockdep_assert_held() to replace WARN_ON() to check lock is
   correctly held.
 - Make use of cleanup.h magic to simplify various code paths.
 - Make iio_dma_buffer_init() return void rather than always success.
 
 adi,ad7766
 - Replace custom interrupt handler with iio_trigger_generic_data_rdy_poll()
 adi,ad9832
 - Drop legacy platform_data support.
 adi,ade9000
 - Add a maintainer entry.
 adi,adt7316
 - Move to EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() so the compiler
   can cleanly drop unused pm structures and callbacks.
 adi,adxl345
 - Relax build constraint vs the driver that is in input so both may be
   built as modules and selection made at runtime.
 adi,adxl380
 - Make sure we don't read tail entries in the hardware fifo if a partial
   new scan has been written.
 - Move to a single larger regmap_noinc_read() to read the hardware fifo.
 aspeed,ast2600
 - Add missing interrupts property to DT binding.
 bosch,bmi270_i2c
 - Add missing MODULE_DEVICE_TABLE() macros so auto probing of modules can
   work.
 bosch,smi330
 - Drop duplicate assignment of IIO_TYPE in smi330_read_avail()
 - Use new common field_get() and field_prep() helpers to replace local
   version.
 honeywell,mprls0025pa
   Fixes delayed to merge window as late in cycle and we didn't want to delay
   the rest of the series.
 - Allow Kconfig selection of specific bus sub-drivers rather than tying that
   to the buses themselves being supported.
 - Zero spi_transfer structure to avoid chance of unintentionally set fields
   effecting transfer.
 - Fix a potential timing violation wrt to the chip select to first clock
   edge timing.
 - As recent driver, take risk inherent in dropping interrupt direction from
   driver as that should be set by firmware.
 - Fix wrong reported number of data bits for channel.
 - Fix a pressure channel calculation bug.
 - Rework to allow embedding the tx buffer in the iio_priv() structure rather
   than requiring separate allocation.
 - Move the buffer clearing to the shared core bringing it into affect for
   SPI as well as I2C.
 - Stricter checks for status byte.
 - Greatly simplify the measurement sequence.
 - Add a copyright entry to reflect Petre's continued work on this driver.
 intersil,isl29018
 - Switch from spritnf to sysfs_emit_at() to make it clear overflow can't
   occur.
 invensense,icm42600
 - Allow sysfs access to temperature when buffered capture in use as it
   does not impact other sensor data paths.
 invensense,itg3200
 - Check unused return value in read_raw() callback.
 men,z188
 - Drop now duplicated module alias.
 rf-digital,rfd77402
 - Add DT binding doc and explicit of_device_id table.
 - Poll for timeout with times as on datasheet, then replace opencoded
   version with read_poll_timeout().
 sensiron,scd4x
 - Add missing timestamp channel. The code to push it to the buffer was there
   but there was no way to turn it on.
 vti,sca3000
 - Fix resource leak if iio_device_register() fails.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAml/hWARHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0Foi51A/47f463/jhe68XY6wQEmB2q3FinSCor/3A
 tjhisUQd4EwNwkY007b9m7QILogsDJsVDrwpIT84mSoRd6RggyqEpWq/lyLM5AW2
 pq7zSf8D06ne/xPa5PL6Sy/L7edkeXLfU/NMfcLKhzhrm+kfFSKAKzfPzgXDBVZv
 TtFZkk7AaVc5rk4DQfnaSI1Nr1DQqI/rbCLj6dvD/Iq2Ozs1A4Q5GgClbU4sw4nR
 5iQryb9y7nesPoCKHb+qhHoUJMSv1uejTqMhwUecfNc/d47nxeqLmIwlI02YmFu+
 JKSZ5ptYAc2CrV4HTdfjLlfnZfkRCK5DeIalj2jE6hHN1lwqjUBvsP/J+/4RMK1S
 nth2wPRlW24hWjR51AcFhSMOM4nhwj3Tcxrb7w+uqEapbDhNJi7PT7LNalkFPIET
 qdxGCEm02OMBHjggyto/MhoXZj9IiqkvIKtuZ2M10Zq/6eP9TsPlhkRysdcok4f1
 VRmn23uTwJDGc3eAos1HBYLClZznG/kOgo7fyjJxEe7f9Kb2TwculY3yO3thYR2S
 XWFWZzw/Mr3yj0U3qKq7qXQvgME1P8KAFCiG82ZvjvixQpf8+Koe+WWuFVcdYvJi
 29yFbKHVnu58ttcPMvfegLy/iUjc1ZrhRNTJ4dRGa2xjc0eJqKqFs9OYVWKVfh2i
 MMHfMtVIhQ==
 =2IKe
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-7.0a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: New device support, features and cleanup for the 6.20/7.0 cycle.

Slightly messier than normal unfortunately due to some conflicts
and build config bugs related to I3C drivers.

One last minute Kconfig fix right at the top after a linux-next report.
I've simplified the Kconfig and made it match other instances in the kernel
so that should be safe enough despite short soak time in front of build bots.

Merge of an immutable branch from I3C to get some stubs that were missing
and caused build issues with dual I2C / I3C drivers. This also brought in a
drop of some deprecated interfaces so there is also one patch to update a
new driver to not use those.

We are having another go at using cleanup.h magic with the IIO mode claim
functions after backing out last try at this. This time we have wrappers
around the new ACQUIRE() and ACQUIRE_ERR() macros.
Having been burnt once, we will be taking it a bit more slowly this time
wrt to wide adoption of these! Thanks in particular to Kurt for taking
on this core IIO work.

New Device Support
==================

adi,ad18113
- New driver to support the AD18113 amplifier - an interesting device due
  to the external bypass paths where we need to describe what gain those
  paths have in DT. Longer term it will be interesting to see if this
  simplistic description is enough for real deployments.
adi,ad4062
- New driver for the AD4060 and AD4052 SAR ADCs including trigger, event
  and GPIO controller support.  Follow up patch replaced use of some
  deprecated I3C interfaces prior to the I3C immutable branch merge as
  that includes dropping them.
adi,ad4134
- New driver for the AD4134 24bit 4 channel simultaneous sampling ADC.
adi,ad7768-1,
- Add support for the ADAQ767-1, ADAQ7768-1 and ADAQ7769-1 ADCs after some
  rework to enable the driver to support multiple device types.
adi,ad9467
- Add support for the similar ad9211 ADC to this existing driver.
- Make the selection of 2s comp mode explicit for normal operation and
  switch to offset binary when entering calibration mode.
honeywell,abp2
- New driver to support this huge family (100+) of board mount pressure and
  temperature sensors.
maxim,max22007
- New drier for this 4 channel DAC.
memsic,mmc5633
- New driver for this I2C/I3C magnetometer. Follow on patches fixed up
  issues related to single driver supporting both bus types.
microchip,mcp747feb02
- New driver for the Microchip MCP47F(E/V)B(0/1/2)1,
  MCP47F(E/V)B(0/1/2)2, MCP47F(E/V)B(0/1/2)4 and MCP47F(E/V)B(0/1/2)8
  buffered voltage output DACs.
nxp,sar-adc
- New driver support ADCs found on s32g2 and s32g3 platforms.
ti,ads1018
- New drier for the ADS1018 and ADS1118 SPI ADCs.
ti,ads131m02
- New driver supporting ADS131M(02/03/04/06/08)24-bit simultaneous sampling
  ADCs.

Features
========

iio-core
- New IIO_DEV_ACQUIRE_DIRECT_MODE() / IIO_DEV_ACQUIRE_FAILED() +
  equivalents for the much rarer case where the mode needs pinning
  whether or not it is in direct mode.  These use the ACQUIRE()
  / ACQUIRE_ERR() infrastructure underneath to provide both simple
  checks on whether we got the requested mode and to provide scope
  based release. Applied in a few initial drivers.
adi,ad9467
- Support calibbias control
adi,adf4377
- Add support to act as a clock provider.
adi,adxl380
- Support low power 1KHz sampling frequency mode. Required rework of
  how events and filters were configured, plus applying of constraints
  when in this mode.
rf-digital,rfd77402
- Add interrupt support as alternative to polling for completion.
st,lsm6dsx
- Tap event detection (after considerable driver rework)

Cleanup and Minor Fixes
=======================

More minor cleanup such as typos, white space etc not called out except
where they were applied to a lot of drivers.

Various drivers.
- Use of dev_err_probe() to cleanup error handling.
- Introduce local struct device and struct device_node variables to
  reduce duplication of getting them from containing structs.
- Ensure uses of iio_trigger_generic_data_rdy_poll() set IRQF_NO_THREAD
  as that function calls non threaded child interrupt handlers.
- Replace IRQF_ONESHOT in not thread interrupt handlers with
  IRQF_NO_THREAD to ensure they run as intended. Drop one unnecessary case.
iio-sw-device/trigger.
- Constify configs_group_operations structures.
iio-buffer-dma / buffer-dma-engine
- Use lockdep_assert_held() to replace WARN_ON() to check lock is
  correctly held.
- Make use of cleanup.h magic to simplify various code paths.
- Make iio_dma_buffer_init() return void rather than always success.

adi,ad7766
- Replace custom interrupt handler with iio_trigger_generic_data_rdy_poll()
adi,ad9832
- Drop legacy platform_data support.
adi,ade9000
- Add a maintainer entry.
adi,adt7316
- Move to EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() so the compiler
  can cleanly drop unused pm structures and callbacks.
adi,adxl345
- Relax build constraint vs the driver that is in input so both may be
  built as modules and selection made at runtime.
adi,adxl380
- Make sure we don't read tail entries in the hardware fifo if a partial
  new scan has been written.
- Move to a single larger regmap_noinc_read() to read the hardware fifo.
aspeed,ast2600
- Add missing interrupts property to DT binding.
bosch,bmi270_i2c
- Add missing MODULE_DEVICE_TABLE() macros so auto probing of modules can
  work.
bosch,smi330
- Drop duplicate assignment of IIO_TYPE in smi330_read_avail()
- Use new common field_get() and field_prep() helpers to replace local
  version.
honeywell,mprls0025pa
  Fixes delayed to merge window as late in cycle and we didn't want to delay
  the rest of the series.
- Allow Kconfig selection of specific bus sub-drivers rather than tying that
  to the buses themselves being supported.
- Zero spi_transfer structure to avoid chance of unintentionally set fields
  effecting transfer.
- Fix a potential timing violation wrt to the chip select to first clock
  edge timing.
- As recent driver, take risk inherent in dropping interrupt direction from
  driver as that should be set by firmware.
- Fix wrong reported number of data bits for channel.
- Fix a pressure channel calculation bug.
- Rework to allow embedding the tx buffer in the iio_priv() structure rather
  than requiring separate allocation.
- Move the buffer clearing to the shared core bringing it into affect for
  SPI as well as I2C.
- Stricter checks for status byte.
- Greatly simplify the measurement sequence.
- Add a copyright entry to reflect Petre's continued work on this driver.
intersil,isl29018
- Switch from spritnf to sysfs_emit_at() to make it clear overflow can't
  occur.
invensense,icm42600
- Allow sysfs access to temperature when buffered capture in use as it
  does not impact other sensor data paths.
invensense,itg3200
- Check unused return value in read_raw() callback.
men,z188
- Drop now duplicated module alias.
rf-digital,rfd77402
- Add DT binding doc and explicit of_device_id table.
- Poll for timeout with times as on datasheet, then replace opencoded
  version with read_poll_timeout().
sensiron,scd4x
- Add missing timestamp channel. The code to push it to the buffer was there
  but there was no way to turn it on.
vti,sca3000
- Fix resource leak if iio_device_register() fails.

* tag 'iio-for-7.0a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (144 commits)
  iio: magn: mmc5633: Fix Kconfig for combination of I3C as module and driver builtin
  iio: sca3000: Fix a resource leak in sca3000_probe()
  iio: proximity: rfd77402: Add interrupt handling support
  iio: proximity: rfd77402: Document device private data structure
  iio: proximity: rfd77402: Use devm-managed mutex initialization
  iio: proximity: rfd77402: Use kernel helper for result polling
  iio: proximity: rfd77402: Align polling timeout with datasheet
  iio: cros_ec: Allow enabling/disabling calibration mode
  iio: frequency: ad9523: correct kernel-doc bad line warning
  iio: buffer: buffer_impl.h: fix kernel-doc warnings
  iio: gyro: itg3200: Fix unchecked return value in read_raw
  MAINTAINERS: add entry for ADE9000 driver
  iio: accel: sca3000: remove unused last_timestamp field
  iio: accel: adxl372: remove unused int2_bitmask field
  iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()
  iio: magnetometer: Remove IRQF_ONESHOT
  iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD
  iio: Use IRQF_NO_THREAD
  iio: dac: Add MAX22007 DAC driver support
  dt-bindings: iio: dac: Add max22007
  ...
2026-02-02 17:08:30 +01:00
Jonathan Cameron
0713b26190 iio: magn: mmc5633: Fix Kconfig for combination of I3C as module and driver builtin
Fix based on similar fix in:
commit 83b645ee43 ("hwmon: tmp108: fix I3C dependency")

Note to keep things simple I'm now requiring I2C.
That can probably be relaxed in future, but I want to reduce the test
set of builds for now given this is blocker for the main IIO pull request.

Fixes: e559c86414 ("iio: magn: mmc5633: Ensure REGMAP_I2C / I3C not build if I2C / I3C is not.")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601310904.DueZdiuY-lkp@intel.com/
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
2026-02-01 16:53:35 +00:00
Harshit Mogalapalli
62b44ebc1f iio: sca3000: Fix a resource leak in sca3000_probe()
spi->irq from request_threaded_irq() not released when
iio_device_register() fails. Add an return value check and jump to a
common error handler when iio_device_register() fails.

Fixes: 9a4936dc89 ("staging:iio:accel:sca3000 Tidy up probe order to avoid a race.")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 18:22:53 +00:00
Shrikant Raskar
dc81be96a7 iio: proximity: rfd77402: Add interrupt handling support
Add interrupt handling support to enable event-driven data acquisition
instead of continuous polling. This improves responsiveness, reduces
CPU overhead, and supports low-power operation by allowing the system
to remain idle until an interrupt occurs.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:50:08 +00:00
Shrikant Raskar
53516b6fde iio: proximity: rfd77402: Document device private data structure
Add kernel-doc style comments for struct rfd77402_data to describe
the purpose of each member.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:49:00 +00:00
Shrikant Raskar
dff4bdff07 iio: proximity: rfd77402: Use devm-managed mutex initialization
Use devm_mutex_init() to tie the mutex lifetime to the device and
improve debugging when CONFIG_DEBUG_MUTEXES is enabled.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:48:45 +00:00
Shrikant Raskar
51eedb3a32 iio: proximity: rfd77402: Use kernel helper for result polling
Replace the manually written polling loop with read_poll_timeout(),
the kernel's standard helper for waiting on hardware status.This
makes the code easier to read.

Move the polling logic into a dedicated helper function, as it will
be reused by future updates.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:47:56 +00:00
Shrikant Raskar
36bff18423 iio: proximity: rfd77402: Align polling timeout with datasheet
Update the polling delay to use a 100 ms timeout, as specified
in the RFD77402 datasheet.

Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:46:47 +00:00
Gwendal Grignou
0077e9b985 iio: cros_ec: Allow enabling/disabling calibration mode
'calibrate' was a one-shot event sent to the sensor to calibrate itself.
It is used on Bosch sensors (BMI160, BMA254).
Light sensors work differently: They are first put in calibration mode,
tests are run to collect information and calculate the calibration
values to apply. Once done, the sensors are put back in normal mode.

Accept boolean true and false (not just true) to enter/exit calibration
state.

Check "echo 0 > calibrate" is supported.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:35:31 +00:00
Antoniu Miclaus
b79b24f578 iio: gyro: itg3200: Fix unchecked return value in read_raw
The return value from itg3200_read_reg_s16() is stored in ret but
never checked. The function unconditionally returns IIO_VAL_INT,
ignoring potential I2C read failures. This causes garbage data to
be returned to userspace when the read fails, with no error reported.

Add proper error checking to propagate the failure to callers.

Fixes: 9dbf091da0 ("iio: gyro: Add itg3200")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 17:07:07 +00:00
Antoniu Miclaus
3e55c3dc93 iio: accel: sca3000: remove unused last_timestamp field
Remove unused last_timestamp field from sca3000_state
struct. The field is declared but never accessed in the
driver.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 16:25:39 +00:00
Antoniu Miclaus
3ec0a13ae2 iio: accel: adxl372: remove unused int2_bitmask field
Remove unused int2_bitmask field from adxl372_state struct.
The field is declared but never accessed in the driver.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 16:24:59 +00:00
Sebastian Andrzej Siewior
d07b24cc62 iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll()
ad7766_irq() is identical to iio_trigger_generic_data_rdy_poll().

Use iio_trigger_generic_data_rdy_poll() instead of ad7766_irq().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 16:13:52 +00:00
Sebastian Andrzej Siewior
a54e944092 iio: magnetometer: Remove IRQF_ONESHOT
Passing IRQF_ONESHOT ensures that the interrupt source is masked until
the secondary (threaded) handler is done. If only a primary handler is
used then the flag makes no sense because the interrupt can not fire
(again) while its handler is running.
The flag also disallows force-threading of the primary handler and the
irq-core will warn about this.
The force-threading functionality is required on PREEMPT_RT because the
handler is using locks with can sleep on PREEMPT_RT.

Remove IRQF_ONESHOT from irqflags.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 16:13:11 +00:00
Sebastian Andrzej Siewior
ac9fabd578 iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Passing IRQF_ONESHOT ensures that the interrupt source is masked until
the secondary (threaded) handler is done. If only a primary handler is
used then the flag makes no sense because the interrupt can not fire
(again) while its handler is running.
The flag also disallows force-threading of the primary handler and the
irq-core will warn about this.

The intention here was probably not allowing forced-threading for
handlers such as iio_trigger_generic_data_rdy_poll() will intends to
invoke hard-interrupt handlers.

Replace IRQF_ONESHOT with IRQF_NO_THREAD.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 16:11:50 +00:00
Sebastian Andrzej Siewior
04d390af97 iio: Use IRQF_NO_THREAD
The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke
other interrupt handler and this supposed to happen from within the
hardirq.

Use IRQF_NO_THREAD to forbid forced-threading.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-29 16:10:44 +00:00
Janani Sunil
f52690c508 iio: dac: Add MAX22007 DAC driver support
Add support for the MAX22007 4 channel DAC that drives a voltage or
current output on each channel.

Signed-off-by: Janani Sunil <janani.sunil@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-23 08:15:00 +00:00
Svyatoslav Ryhel
b010880b99 drivers: iio: mpu3050: use dev_err_probe for regulator request
Regulator requesting may result in deferred probing error which will
abort driver probing. To avoid this just use dev_err_probe which handles
deferred probing.

Fixes: 3904b28efb ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:18 +00:00
Francesco Lavra
6939484a42 iio: accel: adxl380: Optimize reading of FIFO entries in interrupt handler
In order to minimize the time required for transferring FIFO data from the
sensor to the host machine, perform the read from the FIFO in a single call
to regmap_noinc_read().
This allows reading acceleration data for all 3 axes at 16 kHz
sampling frequency using a 1MHz I2C bus frequency.

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:18 +00:00
Francesco Lavra
c1b1401522 iio: accel: adxl380: Avoid reading more entries than present in FIFO
The interrupt handler reads FIFO entries in batches of N samples, where N
is the number of scan elements that have been enabled. However, the sensor
fills the FIFO one sample at a time, even when more than one channel is
enabled. Therefore,the number of entries reported by the FIFO status
registers may not be a multiple of N; if this number is not a multiple, the
number of entries read from the FIFO may exceed the number of entries
actually present.

To fix the above issue, round down the number of FIFO entries read from the
status registers so that it is always a multiple of N.

Fixes: df36de1367 ("iio: accel: add ADXL380 driver")
Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:18 +00:00
Petre Rodan
b0913a44a9 iio: pressure: mprls0025pa: remove error message
Do not print a duplicate error message if devm_request_irq() fails.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:18 +00:00
Jonathan Santos
ff085189cb iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Family
Add support for ADAQ7767/68/69-1 series, which includes PGIA and
Anti-aliasing filter (AAF) gains. Unlike the AD7768-1, they do not
provide a VCM regulator interface.

The PGA gain is configured in run-time through the scale attribute,
if supported by the device. PGA is controlled by GPIOs provided in
the device tree.

The AAF gain is defined by hardware connections and should be specified
in the device tree.

Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:18 +00:00
Jonathan Santos
e7b0312c60 iio: adc: ad7768-1: refactor ad7768_write_raw()
Squash __ad7768_write_raw() back to ad7768_write_raw() to allow the
addition of new attributes without requiring a direct mode claim.

Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:18 +00:00
Jonathan Santos
fa087f5bab iio: adc: ad7768-1: introduce chip info for future multidevice support
Add Chip info struct in SPI device to store channel information for
each supported part.

Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Kurt Borja
8284a49854 iio: light: opt4060: Use IIO cleanup helpers
Use IIO_DEV_GUARD_CURRENT_MODE() cleanup helper to simplify and drop
busy-waiting code in opt4060_set_driver_state().

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Kurt Borja
421ac0c231 iio: health: max30102: Use IIO cleanup helpers
Use IIO_DEV_GUARD_CURRENT_MODE() cleanup helper to simplify and drop
busy-waiting code in max30102_read_raw().

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Kurt Borja
6a3fe0fc9e iio: light: vcnl4000: Use IIO cleanup helpers
Use IIO_DEV_ACQUIRE_DIRECT_MODE() helper to automatically release direct
mode.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Kurt Borja
2daee817df iio: core: Match iio_device_claim_*() semantics and implementation
Implement iio_device_claim_buffer_mode() fully inline with the use of
__iio_dev_mode_lock(), which takes care of sparse annotations.

To completely match iio_device_claim_direct() semantics, we need to
also change iio_device_claim_buffer_mode() return semantics to usual
true/false conditional lock semantics.

Additionally, to avoid silently breaking out-of-tree drivers, rename
iio_device_claim_buffer_mode() to iio_device_claim_try_buffer_mode().

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Kurt Borja
c37ec9d507 iio: core: Refactor iio_device_claim_direct() implementation
In order to eventually unify the locking API, implement
iio_device_claim_direct() fully inline, with the use of
__iio_dev_mode_lock(), which takes care of sparse annotations.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Kurt Borja
88fd1f9079 iio: core: Add and export __iio_dev_mode_lock()
Add unconditional wrappers around the internal IIO mode lock.

As mentioned in the documentation, this is not meant to be used by
drivers, instead this will aid in the eventual addition of cleanup
classes around conditional locks.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:53:17 +00:00
Jonathan Cameron
e559c86414 iio: magn: mmc5633: Ensure REGMAP_I2C / I3C not build if I2C / I3C is not.
Fixes the following build warning (and equivalent I2C one)
WARNING: unmet direct dependencies detected for REGMAP_I3C
  Depends on [n]: I3C [=n]
  Selected by [m]:
  - MMC5633 [=m] && IIO [=y] && (I2C [=y] || I3C [=n])

Fixes: 6e5f6bf2e3 ("iio: magnetometer: Add mmc5633 sensor")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:52:12 +00:00
Jonathan Cameron
a02d46be8a iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
Commit 9904232ae3 ("i3c: drop i3c_priv_xfer and i3c_device_do_priv_xfers()")
currently in the i3c/for-next tree removes the deprecated
struct i3c_priv_xfer and i3c_device_do_priv_xfers().

Switch to struct i3c_xfer and i3c_device_do_xfers(..., I3C_SDR)
now rather causing a build issue when both trees are merged.

Suggested-by: Sasha Levin <sashal@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-22 20:52:12 +00:00
Shrikant Raskar
a35df4c118 iio: proximity: rfd77402: Reorder header includes
Reorder header includes to follow kernel include
ordering conventions.

Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 20:07:01 +00:00
Geert Uytterhoeven
188c338240 iio: imu: smi330: Convert to common field_{get,prep}() helpers
Drop the driver-specific smi330_field_get() and smi330_field_prep()
macros, in favor of the globally available variants from
<linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 19:44:57 +00:00
Francesco Lavra
f65de31fb6 iio: accel: adxl380: Add support for 1 kHz sampling frequency
In sensor variants (such as ADXL380 and ADXL382) that support low-power
mode, the SAR signal path allows sampling acceleration data at lower rates;
more specifically, when the sensor operates in VLP mode, the sampling
frequency is 1 kHz.

To add support for the 1kHz sampling frequency value, modify the operating
mode selection logic to take into account the sampling frequency, and
configure the decimation filters only when applicable (i.e. when using a
sampling frequency that relies on the DSM signal path); in addition,
constrain the available sampling frequency values based on whether the
sensor is operating in low-power mode.

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 19:42:08 +00:00
Francesco Lavra
fabae75587 iio: accel: adxl380: Introduce helper function for activity detection
Motion detection functionalities (such as activity and inactivity
detection) are only available when the chip is in a low-power mode; this
affects the available sampling frequency values.
In preparation for adding support for a new frequency value, introduce a
helper function that checks whether activity/inactivity detection is
currently enabled; this function will be reused in a future commit to
determine what frequency values are available at any given time.
No functional changes.

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 19:40:04 +00:00
Francesco Lavra
a99b000f92 iio: accel: adxl380: Store sampling frequency index in odr struct member
The ADXL380 driver assumes that acceleration samples are always retrieved
via the high-performance DSM signal path; as a result, the sampling
frequency value depends exclusively on the decimation filter settings in
the TRIG_CFG register.
In preparation for adding support for sampling frequency values that rely
on the low-power SAR signal path (on which the decimation filters are not
supported), use the (currently unused) 'odr' member of struct adxl380_state
to store the sampling frequency value, and when userspace requests the
current frequency value, retrieve it from the struct instead of calculating
it from the decimation filter settings.

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 19:38:31 +00:00
Tomas Melin
bac5e3d20c iio: adc: ad9467: include two's complement in default mode
All supported drivers currently implicitly use two's complement mode.
Make this clear by declaring two's complement in the default
output mode. Calibration mode uses offset binary, so change the output
mode only when running the calibration or other test mode.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 18:38:24 +00:00
Petre Rodan
0b6a86a049 iio: pressure: mprls0025pa: add copyright line
Add copyright line to the core driver.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:41 +00:00
Petre Rodan
500b36ee44 iio: pressure: mprls0025pa: change measurement sequence
Implement a measurement sequence that does not involve a one byte read of
the status byte before reading the conversion.

The sensor's conversions should be read either once the EoC interrupt
has triggered or 5ms after the 0xaa command. See Options 1 and 2
respectively in Tables 16 (page 15) and 18 (page 18) of the datasheet.
Note that Honeywell's example code also covered in the datasheet follows
Option 2 for both i2c and SPI.

The datasheet does not specify any of the retry parameters that are
currently implemented in the driver. A simple 5+ms sleep as specified in
Option 2 is enough for a valid measurement sequence.

The change also gets rid of the code duplication tied to the verification
of the status byte.

This change only affects users that do not define the EoC interrupt in
the device tree.

Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf?download=false
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:41 +00:00
Petre Rodan
84e15e1a6e iio: pressure: mprls0025pa: stricter checks for the status byte
Make sure a valid conversion comes with a status byte that only has
the MPR_ST_POWER bit set.
Return -EBUSY if also MPR_ST_BUSY is set or -EIO otherwise.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:41 +00:00
Petre Rodan
4edab7b087 iio: pressure: mprls0025pa: move memset to core
Move memset() from the bus specific code into core.

Zeroing out the buffer is performed because the sensor has noticeable
latch-up sensitivity and in some cases it clamps the MISO signal to GND
in sync with SCLK [1]. A raw conversion of zero is out of bounds since
valid values have to be between output_min and output_max (and the
smallest output_min is 2.5% of 2^24 = 419430).

The user is expected to discard out of bounds pressure values.

Given the fact that we can't follow the behaviour of all SPI controllers
when faced to this clamping of an output signal, a raw conversion of zero
is used as an early warning in case the low level SPI API reacts
unexpectedly.

Link: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1588325/am3358-spi-tx-data-corruption [1]
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:41 +00:00
Petre Rodan
cf322f806d iio: pressure: mprls0025pa: introduce tx buffer
Use a tx_buf that is part of the priv struct for transferring data to
the sensor instead of relying on a devm_kzalloc()-ed array.
Remove the .init operation in the process.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:40 +00:00
Petre Rodan
7071f9f062 iio: pressure: mprls0025pa: rename buffer variable
For the reason of better naming consistency rename priv->buffer into
priv->rx_buf since tx_buf will get introduced in the next patch.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:40 +00:00
Petre Rodan
77261502ea iio: pressure: mprls0025pa: remove redundant declarations
Remove the iio_chan_spec and iio_dev structs which are already defined in
the included iio.h header.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:40 +00:00
Petre Rodan
448889d3ab iio: pressure: mprls0025pa: cleanup includes
Remove unused headers and add required headers as needed.

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-01-16 17:40:40 +00:00