]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 months agorust_binder: add fd translation tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:46 +0000 (17:49 +0300)] 
rust_binder: add fd translation tracepoints

Add Rust Binder tracepoint declarations for both `transaction_fd_send`
and `transaction_fd_recv`. Also, wire in the corresponding trace calls
where fd objects are serialised/deserialised.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-5-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: add `transaction_received` tracepoint
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:45 +0000 (17:49 +0300)] 
rust_binder: add `transaction_received` tracepoint

Add Rust Binder `transaction_received` tracepoint decalaration and
wire in the corresponding trace call when a transaction work item is
accepted for execution.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-4-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: add `wait_for_work` tracepoint
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:44 +0000 (17:49 +0300)] 
rust_binder: add `wait_for_work` tracepoint

Add the Rust Binder `wait_for_work` tracepoint declaration and wire
it into the thread read path before selecting the work source.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-3-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: add ioctl/read/write done tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:43 +0000 (17:49 +0300)] 
rust_binder: add ioctl/read/write done tracepoints

Add Rust Binder tracepoints declarations for `ioctl_done`,
`read_done` and `write_done`.

Additionally, wire in the new tracepoints into the corresponding
Binder call sites.

Note that the new tracepoints report final errno-style return values,
matching the existing C model for operation completion.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-2-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: remove "rust_" prefix from tracepoints
Mohamad Alsadhan [Tue, 17 Mar 2026 14:49:42 +0000 (17:49 +0300)] 
rust_binder: remove "rust_" prefix from tracepoints

Remove the "rust_" prefix as the name is part of the uapi, and
userspace expects tracepoints to have the old names.

Link: https://github.com/Rust-for-Linux/linux/issues/1226
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Link: https://patch.msgid.link/20260317-rust-binder-trace-v3-1-6fae4fbcf637@sdhn.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: drop startup init log message
Pedro Montes Alcalde [Sat, 28 Mar 2026 01:02:51 +0000 (22:02 -0300)] 
rust_binder: drop startup init log message

The "Loaded Rust Binder." message is logged during normal
initialization and does not indicate an error/warning condition.

Logging it creates unnecessary noise and is inconsistent
with other drivers, so this change fixes that

Signed-off-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260328010250.249131-2-pedro.montes.alcalde@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: check current before closing fds
Alice Ryhl [Tue, 24 Mar 2026 20:02:38 +0000 (20:02 +0000)] 
rust_binder: check current before closing fds

This list gets populated once the transaction is delivered to the target
process, at which point it's not touched again except in BC_FREE_BUFFER
and process exit, so if the list has been populated then this code
should not run in the context of the wrong userspace process.

However, why tempt fate? The function itself can run in the context of
both the sender and receiver, and if someone can engineer a scenario
where it runs in the sender and this list is non-empty (or future Rust
Binder changes make such a scenario possible), then that'd be a problem
because we'd be closing random unrelated fds in the wrong process.

Note that on process exit, the == comparison may actually fail because
it's called from a kthread. The fd closing code is a no-op on kthreads,
so there is no actual behavior different though.

Suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-4-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: make use of == for Task
Alice Ryhl [Tue, 24 Mar 2026 20:02:37 +0000 (20:02 +0000)] 
rust_binder: make use of == for Task

Now that we have implemented the == operator for Task, replace the two
raw pointer comparisons in Binder with the == operator.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-3-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust: task: implement == operator for Task
Alice Ryhl [Tue, 24 Mar 2026 20:02:36 +0000 (20:02 +0000)] 
rust: task: implement == operator for Task

It's useful to compare if two tasks are the same task or not. Rust
Binder wants this to check if a certain task is equal to the group
leader of current.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-2-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust: sync: implement == operator for ARef
Alice Ryhl [Tue, 24 Mar 2026 20:02:35 +0000 (20:02 +0000)] 
rust: sync: implement == operator for ARef

Rust Binder wants to perform a comparison between ARef<Task> and &Task,
so define the == operator for ARef<_> when compared with another ARef<_>
or just a reference. The operator is implemented in terms of the same
operator applied to the inner type.

Note that PartialEq<U> cannot be implemented because it would overlap
with the impl for ARef<U>.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-1-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agorust_binder: introduce TransactionInfo
Alice Ryhl [Fri, 6 Mar 2026 11:28:46 +0000 (11:28 +0000)] 
rust_binder: introduce TransactionInfo

Rust Binder exposes information about transactions that are sent in
various ways: printing to the kernel log, tracepoints, files in
binderfs, and the upcoming netlink support. Currently all these
mechanisms use disparate ways of obtaining the same information, so
let's introduce a single Info struct that collects all the required
information in a single place, so that all of these different mechanisms
can operate in a more uniform way.

For now, the new info struct is only used to replace a few things:
* The BinderTransactionDataSg struct that is passed as an argument to
  several methods is removed as the information is moved into the new
  info struct and passed down that way.
* The oneway spam detection fields on Transaction and Allocation can be
  removed, as the information can be returned to the caller via the
  mutable info struct instead.
But several other uses of the info struct are planned in follow-up
patches.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260306-transaction-info-v1-1-fda58fca558b@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agoMerge tag 'iio-for-7.1a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 29 Mar 2026 12:35:31 +0000 (14:35 +0200)] 
Merge tag 'iio-for-7.1a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: New devices support, features and cleanup for 7.1

Includes merge of v7.0-rc4 to pull in a fix and a merge of
ib-iio-thermal-qcom-pmic5 immutable branch (provided from the IIO tree so
thermal could also pick this up and add thermal specific remainder
of the series on top.

New device support
------------------

adi,ad4030
- Add support for ADA4316 and ADAQ4224 ADCs with PGAs.
adi,ad4080
- Add support for AD4082, AD4085 and AD4088 ADCs.
adi,ad8366
- Add ADRF5702 and ADRF5703 digital step attenuators.
adi,adxl372
- Add support for the ADXL371 accelerometer after refactors to allow multiple
  device variants to be supported by the driver. In particular a silicon
  issue means the hardware FIFO doesn't work on the ADXL371
bosch,bma255/bmg160
- Add support for BMX055 gyroscope and magnetometer (effectively separate
  devices from point of view of interface).
lltc,ltc2309
- Add support for LTC2305 2 channel 12-bit ADC.
lltc,ltc2532
- Add support for 4 variants of the LTC2654 quad DAC.
maxim,ds4424
- Add IDs for DS4402 and DS4404 parts. Initially patch is ID only but additional
  features also added that are device dependent.
qcom,spmi-adc-gen3
- New driver supporting this generation of Qualcomm's SoC ADC.
st,vl53l1
- New driver for this Time Of Flight (TOF) sensor.
ti,ina2xx
- Support the INA236 digital power monitor.
vishay,vcnl4000
- Add support for CM36686 ambient light and proximity sensor.
- Add support for CM36672P proximity sensors.

ID only additions.
amlogic,meson-adc
- Support the Meson S4.

Features
--------

iio-backend framework
- Add capability discovery so front end drivers can know what features are
  available from the backend and adjust how they operate.
adi,ad4030
- Add SPI offload support requiring a non trivial PWM setup.
adi,ad7380
- Add support for multiple SPI lanes to improve throughput.
adi,ad7768-1
- Support SPI offload and always use continuous mode, enabling more
  filter options.
adi,ad8366
- Device tree bindings and support.
aspeed,adc
- Handle battery channel.
maxim,ds4424
- Add external resistor controlled scale and per-variant limits.
- Handle per variant range limits.
- Move it to regmap.
motorola,cpcap-adc
- Support for the ADC found on the Motorola Mot board. Effectively some board
  specific configuration handled in the driver.
vishay,vcnl4000
- Support explicit power supply regulators.
tyhx,hx9023s
- Allow device tree specification of firmware file name.

Cleanup and minor fixes
-----------------------

treewide
- Remove a bunch of unused structure elements.
- Replaces standard fixed width integers with kernel types.
- Replace some other error values that were returned on allocation failure
  with -ENOMEM
iio-core
- Replace a few custom devm implementations for devm_add_action_or_reset()
iio-trigger
- Use put_device() to cleanup on error.
iio-backend
- Use __free(fwmode_handle) to simplify some code.
hw-consumer
- Use separate allocation for scan mask bitmap to simplify code.
acpi-als
- Switch from ACPI driver to platform driver.
adi,ad4030
- Use BIT() to replace values that are always a power of 2 to slightly
  improve readability.
adi,ad4062
- Add a missing check for error form iio_get_current_scan_type()
adi,ad5933
- Use div64_ul() rather than do_div() as remainder was not used.
adi,ad7191
- Documentation fixes related to clocks
adi,ad7816
- Use sysfs_emit()
adi,ad8366
- General driver modernization
adi,adf4350
- Change a TOOD to NOTE in a comment to avoid anyone from walking into
  a tricky to improve corner case.
adi,admv1013
- Avoid a null pointer dereference if device_property_read_string() fails.
adi,admv4420
- Return error code rather than -1..
adi,adxl345
- Add separate scaling for events from that of raw channels.
amlogic,meson-adc
- Don't bother keeping nvmem cell access around when only used in probe.
atmel,at91-sama5d
- Don't bother keeping nvmem cell access around when only used in probe.
bosch,bmc150
- Use sysfs_emit() in a few places.
honeywell,hsc030pa
- Improve handling of return values from i2c_transfer.
liteon,ltr501
- Return error values rather than -1 replaced by -EINVAL at higher
  levels of the callstack.
maxim,ds4424
- A bunch of general minor improvements prior to adding new features.
maxim,max11410
- Make some const string arrays static.
maxim,max5522
- Use devm_regulator_get_enable_read_voltage() at probe to cache the
  voltage rather than keeping the regulator around to access and query
  later.
vishay,vcnl4000
- Various code improvements.
sharp,gp2ap020a00f
- General driver modernization.
silabs,si7210
- Use devm_regulator_get_enable_read_voltage() at probe to cache the
  voltage rather than keeping the regulator around to access and query
  later.
st,lsm6dsx
- Add SMOCF00 ACPI ID seen on products by SHIFT.
st,st_sensors
- Fix up various kernel-doc issues.
- Avoid kmalloc of a single use buffer and instead reused existing
  buffer_data.
taos,tsl2772
- Fix some kernel-doc warnings due to missing :
ti,ads7950
- Use iio_push_to_buffers_with_ts_unaligned() as first few elements of
  array are not the data that is pushed.
- Move from array of chip_info structures to individual named ones. This
  is part of slowly replacing use of a code pattern that we don't want
  replicated in new drivers.
vti,sca3000
- General driver modernization included use of devm and guard().

Various other more minor stuff not called out explicitly.
Includes things like typo fixes, use of dev_err_probe() and local
variables to avoid repeated dereferencing of the same member as well as
increasing use of guard() to simplify release of locks.

Another slow improvement to code quality is both standardizing on
header order and ensure all appropriate headers are included.

* tag 'iio-for-7.1a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (217 commits)
  Docs: iio: ad7191 Correct clock configuration
  iio: amplifiers: ad8366: add support for adrf5702/3
  dt-bindings: iio: amplifiers: ad8366: add adrf5702/3 support
  iio: adc: meson-saradc: add support for Meson S4
  dt-bindings: iio: adc: amlogic,meson-saradc: add S4 compatible
  iio: imu: st_lsm6dsx: Add ACPI ID for SHIFT13mi gyroscope
  iio: proximity: add driver for ST VL53L1X ToF sensor
  dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
  iio: adc: max11410: make vref register name arrays static const
  iio: accel: bmc150-accel-core: use sysfs_emit() in show functions
  iio: frequency: adf4350: replace TODO with NOTE in adf4350_set_freq()
  iio: adc: ltc2309: add support for ltc2305
  iio: adc: ltc2309: explicitly assign hex values to channel enums
  dt-bindings: adc: ltc2497: add support for ltc2305
  iio: accel: adxl380: fix typo in PART_ID register macro
  iio: dac: ds4424: add Rfs-based scale and per-variant limits
  dt-bindings: iio: dac: maxim,ds4424: add maxim,rfs-ohms property
  iio: dac: ds4424: convert to regmap
  iio: dac: ds4424: support per-variant output range limits
  iio: dac: ds4424: add DS4402/DS4404 device IDs
  ...

2 months agoDocs: iio: ad7191 Correct clock configuration
Ammar Mustafa [Fri, 27 Feb 2026 19:08:33 +0000 (14:08 -0500)] 
Docs: iio: ad7191 Correct clock configuration

Correct the ad7191 documentation to match the datasheet:
- Fix inverted CLKSEL pin logic: device uses external clock when pin is
  inactive, and internal CMOS/crystal when high.
- Correct CMOS-compatible clock pin from MCLK2 to MCLK1.

Signed-off-by: Ammar Mustafa <ammarmustafa34@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: amplifiers: ad8366: add support for adrf5702/3
Rodrigo Alencar [Thu, 26 Mar 2026 18:32:17 +0000 (18:32 +0000)] 
iio: amplifiers: ad8366: add support for adrf5702/3

Add chip info structs and device table entries for ADRF5702 and ADRF5703
Digital Step Attenuators.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: amplifiers: ad8366: add adrf5702/3 support
Rodrigo Alencar [Thu, 26 Mar 2026 18:32:16 +0000 (18:32 +0000)] 
dt-bindings: iio: amplifiers: ad8366: add adrf5702/3 support

Add compatible entries for ADRF5702 and ADRF5703 Digital Attenuators.
ADRF5702 is an 8-bit DSA with a step of 0.125 dB and ADRF5703 is a 7-bit
DSA with a step 0.25 dB. Then, each device ends up with its own gain
range, hence no fallback compatibles are used.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: meson-saradc: add support for Meson S4
Nick Xie [Wed, 25 Mar 2026 07:06:16 +0000 (15:06 +0800)] 
iio: adc: meson-saradc: add support for Meson S4

Add support for the SARADC found on the Amlogic Meson S4 SoC.
According to the documentation and current testing, it is fully
compatible with the G12A parameter set, so we reuse
`meson_sar_adc_g12a_data` for this new compatible string.

Although the device tree fallback mechanism could handle the match,
a dedicated entry is added to ensure the userspace ABI correctly
reports the specific part name ("meson-s4-saradc"). This allows
userspace to accurately identify the exact device and maintains
consistency across different firmware types where automatic fallback
parsing might be problematic.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: adc: amlogic,meson-saradc: add S4 compatible
Nick Xie [Wed, 25 Mar 2026 07:06:15 +0000 (15:06 +0800)] 
dt-bindings: iio: adc: amlogic,meson-saradc: add S4 compatible

Add the compatible string for the SARADC (Successive Approximation
Register ADC) IP block found in the Amlogic Meson S4 SoC.

There are no known differences between the SARADC on S4 and the one
on G12A. Therefore, it uses "amlogic,meson-g12a-saradc" as a proper
specific fallback.

Also add a comment indicating that "amlogic,meson-saradc" must not be
used for new devices. It's a made up compatible string that does not
correspond to a specific hardware generation and is not used to match
any driver. For old devices we keep it as it's part of the ABI.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: imu: st_lsm6dsx: Add ACPI ID for SHIFT13mi gyroscope
Milan Misic [Tue, 24 Mar 2026 19:36:26 +0000 (20:36 +0100)] 
iio: imu: st_lsm6dsx: Add ACPI ID for SHIFT13mi gyroscope

The SHIFT13mi or SHIFTbook tablet device by the German manufacturer
SHIFT contains an STM LSM6DSO IMU declared in the DSDT with the
hardware ID SMOCF00. Add this ID to the ACPI match table so that the
driver binds correctly to this device.

WHO_AM_I register returns 0x6c, confirming LSM6DSO.

Signed-off-by: Milan Misic <twoexem@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: proximity: add driver for ST VL53L1X ToF sensor
Siratul Islam [Wed, 25 Mar 2026 20:19:42 +0000 (02:19 +0600)] 
iio: proximity: add driver for ST VL53L1X ToF sensor

Add support for the STMicroelectronics VL53L1X Time-of-Flight
ranging sensor with I2C interface.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Siratul Islam <email@sirat.me>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Siratul Islam [Wed, 25 Mar 2026 20:19:41 +0000 (02:19 +0600)] 
dt-bindings: iio: proximity: add ST VL53L1X ToF sensor

Add device tree binding documentation for the STMicroelectronics
VL53L1X Time-of-Flight ranging sensor connected via I2C.

vdd-supply is not made globally required to maintain backwards
compatibility with existing st,vl53l0x devicetrees that do not specify it.

Signed-off-by: Siratul Islam <email@sirat.me>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: max11410: make vref register name arrays static const
Giorgi Tchankvetadze [Mon, 23 Mar 2026 06:46:41 +0000 (10:46 +0400)] 
iio: adc: max11410: make vref register name arrays static const

The vrefp_regs and vrefn_regs arrays are constant lookup tables and
are not modified.

Make them static const so they are not reinitialized on each probe
call and are placed in read-only memory. Mark the pointer array as
const as well to prevent unintended modification.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: accel: bmc150-accel-core: use sysfs_emit() in show functions
Gabriel Rondon [Mon, 23 Mar 2026 21:56:19 +0000 (21:56 +0000)] 
iio: accel: bmc150-accel-core: use sysfs_emit() in show functions

Replace sprintf() with sysfs_emit() in sysfs attribute show
callbacks. sysfs_emit() is the preferred API as it is aware of the
sysfs buffer page size limit.

Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: frequency: adf4350: replace TODO with NOTE in adf4350_set_freq()
Neel Bullywon [Mon, 23 Mar 2026 23:33:16 +0000 (19:33 -0400)] 
iio: frequency: adf4350: replace TODO with NOTE in adf4350_set_freq()

Replace the TODO comment in adf4350_set_freq() with a NOTE explaining
that a constant-time approach using fls_long() was attempted but deemed
more complex without meaningful benefit for initialization code.

Signed-off-by: Neel Bullywon <neelb2403@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: ltc2309: add support for ltc2305
Kyle Hsieh [Wed, 25 Mar 2026 02:24:22 +0000 (10:24 +0800)] 
iio: adc: ltc2309: add support for ltc2305

Add support for the LTC2305 ADC to the LTC2309 driver. The LTC2305 is
a 2-channel, 12-bit SAR ADC that is register-compatible with the
LTC2309 but has a different channel selection mapping and count.

To support multiple chips in this family, introduce ltc2309_chip_info
struct to store chip-specific channel specifications and names.
The probe function now uses i2c_get_match_data() to retrieve the
correct configuration for the detected device.

Specific channel addresses for LTC2305 (CH0, CH1, and differential
pairs) are added based on the datasheet.

Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: ltc2309: explicitly assign hex values to channel enums
Kyle Hsieh [Wed, 25 Mar 2026 02:24:21 +0000 (10:24 +0800)] 
iio: adc: ltc2309: explicitly assign hex values to channel enums

The current ltc2309_channels enum relies on implicit sequential
assignment. While this works for the 8-channel LTC2309, it is
not intuitive and makes it difficult to support other chips in
the same family that might have different bit mappings.

Explicitly assign hex values to the enum members based on the
channel selection bits defined in the datasheet. This improves
code readability and provides a consistent pattern for future
chip support.

Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: adc: ltc2497: add support for ltc2305
Kyle Hsieh [Wed, 25 Mar 2026 02:24:20 +0000 (10:24 +0800)] 
dt-bindings: adc: ltc2497: add support for ltc2305

Add documentation for the 2-channel LTC2305 ADC in the
existing ltc2497 binding.
This enables automatic device tree matching for LTC2305
while using the LTC2309 driver (drivers/iio/adc/ltc2309.c),
since both ADCs share the same I2C interface and 12-bit SAR architecture.
The main difference is the number of channels (LTC2305: 2, LTC2309: 8).

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: accel: adxl380: fix typo in PART_ID register macro
Nikhil Gautam [Wed, 25 Mar 2026 11:42:51 +0000 (17:12 +0530)] 
iio: accel: adxl380: fix typo in PART_ID register macro

Fix a typo in the ADXL380_PART_ID_REG macro name where it was
incorrectly defined as ADLX380_PART_ID_REG.

Also update its usage in adxl380_setup().

Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: add Rfs-based scale and per-variant limits
Oleksij Rempel [Tue, 10 Feb 2026 13:51:10 +0000 (14:51 +0100)] 
iio: dac: ds4424: add Rfs-based scale and per-variant limits

Parse optional maxim,rfs-ohms values to derive the per-channel output
current scale (mA per step) for the IIO current ABI.

Behavior changes:
- If maxim,rfs-ohms is present, IIO_CHAN_INFO_SCALE becomes available
  and reports mA/step derived from Rfs.
- If maxim,rfs-ohms is missing, SCALE is not exposed to keep older DTs
  working without requiring updates.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: dac: maxim,ds4424: add maxim,rfs-ohms property
Oleksij Rempel [Tue, 10 Feb 2026 13:51:09 +0000 (14:51 +0100)] 
dt-bindings: iio: dac: maxim,ds4424: add maxim,rfs-ohms property

The Maxim DS4422/DS4424 and DS4402/DS4404 current DACs determine their
full-scale output current via external resistors (Rfs) connected to the
FSx pins. Without knowing these values, the full-scale range of the
hardware is undefined.

Add the 'maxim,rfs-ohms' property to describe these physical components.
This property is required to provide a complete description of the
hardware configuration.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: convert to regmap
Oleksij Rempel [Tue, 10 Feb 2026 13:51:08 +0000 (14:51 +0100)] 
iio: dac: ds4424: convert to regmap

Refactor the driver to use the regmap API.

Replace the driver-specific mutex and manual shadow buffers with the
standard regmap infrastructure for locking and caching.

This ensures the cache is populated from hardware at probe, preventing
state desynchronization (e.g. across suspend/resume).

Define access tables to validate the different register maps of DS44x2
and DS44x4.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: support per-variant output range limits
Oleksij Rempel [Tue, 10 Feb 2026 13:51:07 +0000 (14:51 +0100)] 
iio: dac: ds4424: support per-variant output range limits

The DS4402/DS4404 variants operate with a 5-bit resolution (31 steps),
whereas the DS4422/DS4424 support 7-bit (127 steps).

Previously, the driver enforced a hardcoded 7-bit mask (DS4424_DAC_MASK)
for all variants. This allowed users to write values exceeding the 5-bit
range to DS4402/DS4404 devices, resulting in silent truncation or
undefined behavior.

Add a `result_mask` field to the chip_info structure to define the valid
data range for each variant. Use this mask to:
1. Correctly mask register values in read_raw().
2. Return -EINVAL in write_raw() if the input value exceeds the
   variant's capabilities.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: add DS4402/DS4404 device IDs
David Jander [Tue, 10 Feb 2026 13:51:06 +0000 (14:51 +0100)] 
iio: dac: ds4424: add DS4402/DS4404 device IDs

Add I2C/OF IDs for DS4402 and DS4404 and set the correct channel count.
Follow-up changes add per-variant scaling based on external Rfs.

Co-developed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David Jander <david@protonic.nl>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: dac: maxim,ds4424: add ds4402/ds4404
Oleksij Rempel [Tue, 10 Feb 2026 13:51:05 +0000 (14:51 +0100)] 
dt-bindings: iio: dac: maxim,ds4424: add ds4402/ds4404

Add compatible strings for Maxim DS4402 and DS4404 current DACs.
These devices are 5-bit variants of the DS4422/DS4424 family.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: use fsleep() instead of usleep_range()
Oleksij Rempel [Tue, 10 Feb 2026 13:51:04 +0000 (14:51 +0100)] 
iio: dac: ds4424: use fsleep() instead of usleep_range()

The DS4422/DS4424 and DS4402/DS4404 datasheets do not specify a minimum
delay between power-up (POR) and the availability of the I2C interface.

The driver previously used `usleep_range(1000, 1200)` to enforce a ~1ms
delay. Replace this with `fsleep(1000)` to allow the kernel to select
the most efficient sleep mechanism while retaining the existing
conservative delay to ensure device readiness.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: use device match data for chip info
Oleksij Rempel [Tue, 10 Feb 2026 13:51:03 +0000 (14:51 +0100)] 
iio: dac: ds4424: use device match data for chip info

Refactor the driver to use device match data instead of checking ID enums
in a switch statement.

Define a `ds4424_chip_info` structure to hold variant-specific attributes
(currently just the channel count) and attach it directly to the I2C and
OF device ID tables.

This simplifies the probe function and makes it easier to add support for
new variants like DS4402/DS4404.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: rename iio_info struct to avoid ambiguity
Oleksij Rempel [Tue, 10 Feb 2026 13:51:02 +0000 (14:51 +0100)] 
iio: dac: ds4424: rename iio_info struct to avoid ambiguity

Rename the static `ds4424_info` structure to `ds4424_iio_info`.

The previous name was generic and could be confused with chip-specific
data structures (like the upcoming `ds4424_chip_info`). The new name
explicitly indicates that this structure holds the IIO framework
callbacks.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: sort headers alphabetically
Oleksij Rempel [Tue, 10 Feb 2026 13:51:01 +0000 (14:51 +0100)] 
iio: dac: ds4424: sort headers alphabetically

Sort the header inclusions alphabetically. This improves readability and
simplifies adding new includes in the future.

Group subsystem-specific headers (linux/iio/*) separately at the end
to clarify subsystem context.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: ratelimit read errors and use device context
Oleksij Rempel [Tue, 10 Feb 2026 13:51:00 +0000 (14:51 +0100)] 
iio: dac: ds4424: ratelimit read errors and use device context

Replace pr_err() with dev_err_ratelimited() in the RAW read path to avoid
log spam on repeated I2C failures and to include the device context.

Use %pe to print errno names for faster debugging. Use the parent
device context to identify the physical hardware causing the error.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ds4424: refactor raw access to use bitwise operations
Oleksij Rempel [Tue, 10 Feb 2026 13:50:59 +0000 (14:50 +0100)] 
iio: dac: ds4424: refactor raw access to use bitwise operations

Refactor the raw access logic to use standard GENMASK() and BIT()
macros. Use abs() for magnitude calculation to simplify the logic and
make the data flow clearer.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoMerge tag 'v7.0-rc4' into togreg
Jonathan Cameron [Sun, 22 Mar 2026 12:20:42 +0000 (12:20 +0000)] 
Merge tag 'v7.0-rc4' into togreg

Linux 7.0-rc4

Required for the ds4422 series which is build upon;
5187e03b817c ("iio: dac: ds4424: reject -128 RAW value")

2 months agoiio: st_sensors: correct kernel-doc issues
Randy Dunlap [Thu, 12 Mar 2026 05:13:45 +0000 (22:13 -0700)] 
iio: st_sensors: correct kernel-doc issues

Use the proper kernel-doc format and struct member names to avoid
kernel-doc warnings:

Warning: include/linux/iio/common/st_sensors.h:184 struct member 'int1'
 not described in 'st_sensor_data_ready_irq'
Warning: ../include/linux/iio/common/st_sensors.h:184 struct member 'int2'
 not described in 'st_sensor_data_ready_irq'
Warning: ../include/linux/iio/common/st_sensors.h:184 struct member
 'stat_drdy' not described in 'st_sensor_data_ready_irq'
Warning: ../include/linux/iio/common/st_sensors.h:184 struct member 'ig1'
 not described in 'st_sensor_data_ready_irq'
Warning: ../include/linux/iio/common/st_sensors.h:219 struct member
 'num_ch' not described in 'st_sensor_settings'
Warning: ../include/linux/iio/common/st_sensors.h:263 struct member
 'num_data_channels' not described in 'st_sensor_data'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: frequency: ad9523: use dev_err_probe
Antoniu Miclaus [Fri, 13 Mar 2026 11:57:44 +0000 (13:57 +0200)] 
iio: frequency: ad9523: use dev_err_probe

Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: frequency: ad9523: add dev variable
Antoniu Miclaus [Fri, 13 Mar 2026 11:57:43 +0000 (13:57 +0200)] 
iio: frequency: ad9523: add dev variable

Introduce a local struct device variable in ad9523_probe() to simplify
subsequent conversions and improve code readability.

Split pdata declaration and assignment since the result is validated
immediately after.

No functional change.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: frequency: admv4420: use dev_err_probe
Antoniu Miclaus [Fri, 13 Mar 2026 11:57:42 +0000 (13:57 +0200)] 
iio: frequency: admv4420: use dev_err_probe

Use dev_err_probe() instead of dev_err() in the probe path to ensure
proper handling of deferred probing and to simplify error handling.

Also fix the format specifier for vco_freq_hz from %lld to %llu since
it is u64 (unsigned), and add missing newline to the error message.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: frequency: admv4420: add dev variable
Antoniu Miclaus [Fri, 13 Mar 2026 11:57:41 +0000 (13:57 +0200)] 
iio: frequency: admv4420: add dev variable

Introduce a local struct device variable in admv4420_probe() to
simplify subsequent conversions and improve code readability.

No functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: ad_sigma_delta: Format block comments
Giorgi Tchankvetadze [Sat, 14 Mar 2026 11:12:53 +0000 (15:12 +0400)] 
iio: adc: ad_sigma_delta: Format block comments

Format the multi-line comment in ad_sd_set_comm() according to
the kernel multi-line comment style.

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: ti-ads7950: use iio_push_to_buffers_with_ts_unaligned()
David Lechner [Sat, 14 Mar 2026 21:12:24 +0000 (16:12 -0500)] 
iio: adc: ti-ads7950: use iio_push_to_buffers_with_ts_unaligned()

Use iio_push_to_buffers_with_ts_unaligned() to avoid unaligned access
when writing the timestamp in the rx_buf.

The previous implementation would have been fine on architectures that
support 4-byte alignment of 64-bit integers but could cause issues on
architectures that require 8-byte alignment.

Fixes: 902c4b2446d4 ("iio: adc: New driver for TI ADS7950 chips")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: st_sensors: drop temporary kmalloc buffer and reuse buffer_data
Sanjay Chitroda [Sun, 15 Mar 2026 12:16:25 +0000 (17:46 +0530)] 
iio: st_sensors: drop temporary kmalloc buffer and reuse buffer_data

Replace the per-call kmalloc() scratch buffer with the existing
buffer_data[] field present in struct st_sensor_data. The existing buffer
is DMA-aligned and sufficiently sized for all channel widths, so using it
avoids unnecessary dynamic memory allocation on each read.

This simplifies the code, removes redundant allocation and cleanup.
No functional change intended.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: ina2xx: add INA236 support
Chuang Zhu [Sun, 15 Mar 2026 18:23:04 +0000 (02:23 +0800)] 
iio: adc: ina2xx: add INA236 support

The calibration divisor is not directly specified in the datasheet, but can be calculated:

I = Current_LSB * Current
Current = ShuntVoltage * CAL / calibration_divisor
CAL = 0.00512 / (Current_LSB * Rshunt)
ShuntVoltage = Vshunt / ShuntVoltage_LSB

=> I = (0.00512 / (calibration_divisor*ShuntVoltage_LSB)) * (Vshunt / Rshunt)

Ohm's law, I = Vshunt / Rshunt
=> 0.00512 / (calibration_divisor*ShuntVoltage_LSB) = 1

ShuntVoltage_LSB = 2.5 uV = 0.0000025 V
=> calibration_divisor = 2048

Signed-off-by: Chuang Zhu <git@chuang.cz>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: as73211: remove duplicate zero init of scan.chan[3]
David Lechner [Sun, 15 Mar 2026 19:21:51 +0000 (14:21 -0500)] 
iio: light: as73211: remove duplicate zero init of scan.chan[3]

Remove setting scan.chan[3] to zero. Since commit 433b99e92294 ("iio:
light: as73211: Ensure buffer holes are zeroed"), the entire scan struct
is zeroed before being filled with data, so this is redundant.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: amplifiers: fix typo from Curren to Current
Shi Hao [Mon, 16 Mar 2026 09:00:22 +0000 (14:30 +0530)] 
iio: amplifiers: fix typo from Curren to Current

Fix incorrect spelling from Curren to Current.

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: cdc: fix spelling mistakes in comments
Shi Hao [Mon, 16 Mar 2026 09:00:21 +0000 (14:30 +0530)] 
iio: cdc: fix spelling mistakes in comments

Fix spelling mistakes in comments.

- becaue -> because
- reenable -> re-enable
- irq's -> IRQs

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: chemical: rephrase comment and fix a typo
Shi Hao [Mon, 16 Mar 2026 09:00:20 +0000 (14:30 +0530)] 
iio: chemical: rephrase comment and fix a typo

Rephrase the comment and fix a spelling mistake.

- insuffient -> insufficient

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: common: fix spelling mistakes in comments
Shi Hao [Mon, 16 Mar 2026 09:00:19 +0000 (14:30 +0530)] 
iio: common: fix spelling mistakes in comments

Fix spelling mistakes in comments.

- exepects -> expects
- fuction -> function
- theoritical -> theoretical
- appopriate -> appropriate
- iio -> IIO

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: test: fix typo from neeeds to needs in comment
Shi Hao [Mon, 16 Mar 2026 09:00:18 +0000 (14:30 +0530)] 
iio: test: fix typo from neeeds to needs in comment

Fix incorrect spelling from neeeds to needs.

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: temp: fix spelling mistakes in comments
Shi Hao [Mon, 16 Mar 2026 09:00:17 +0000 (14:30 +0530)] 
iio: temp: fix spelling mistakes in comments

Fix spelling mistakes in comments.

- catched -> caught
- chanel -> channel

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: resolver: fix typo from degredation to degradation
Shi Hao [Mon, 16 Mar 2026 09:00:16 +0000 (14:30 +0530)] 
iio: resolver: fix typo from degredation to degradation

Fix incorrect spelling from degredation to degradation and fixed
up some missing spaces prior to */

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: proximity: fix typo from currenly to currently
Shi Hao [Mon, 16 Mar 2026 09:00:15 +0000 (14:30 +0530)] 
iio: proximity: fix typo from currenly to currently

Fix incorrect spelling from currenly to currently.

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: pressure: fix spelling mistakes in comments
Shi Hao [Mon, 16 Mar 2026 09:00:14 +0000 (14:30 +0530)] 
iio: pressure: fix spelling mistakes in comments

Fix several spelling mistakes in comments.

- opertion -> operations
- transfered -> transferred
- usng -> using
- externaly -> externally

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: magnetometer: fix various spelling mistakes
Shi Hao [Mon, 16 Mar 2026 09:00:13 +0000 (14:30 +0530)] 
iio: magnetometer: fix various spelling mistakes

Fix spelling mistakes in comments.

- follwing -> following
- atleast -> at least
- occured -> occurred
- measurment -> measurement
- rougly -> roughly

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: imu: fix typo from adjustement to adjustment
Shi Hao [Mon, 16 Mar 2026 09:00:12 +0000 (14:30 +0530)] 
iio: imu: fix typo from adjustement to adjustment

Fix incorrect spelling in a comment.

- adjustement -> adjustment

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: add an article and use digitize instead of digitalize
Shi Hao [Mon, 16 Mar 2026 09:00:11 +0000 (14:30 +0530)] 
iio: adc: add an article and use digitize instead of digitalize

Use digitize instead of digitalize, which is the correct technical term,
and add an article for clarity.

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: fix several incorrect spellings
Shi Hao [Mon, 16 Mar 2026 09:00:10 +0000 (14:30 +0530)] 
iio: light: fix several incorrect spellings

Fix spelling mistakes reported by codespell.

- sesnor -> sensor
- substraction -> subtraction
- simulataneous -> simultaneous
- proccessed -> processed
- coefficents -> coefficients

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: accel: fix typo celcius to Celsius
Shi Hao [Mon, 16 Mar 2026 09:00:09 +0000 (14:30 +0530)] 
iio: accel: fix typo celcius to Celsius

Fix incorrect spelling in comments
- celcius -> Celsius

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: aspeed: Reserve battery sensing channel for on-demand use
Billy Tsai [Fri, 20 Mar 2026 05:46:38 +0000 (13:46 +0800)] 
iio: adc: aspeed: Reserve battery sensing channel for on-demand use

For controllers with battery sensing capability (AST2600/AST2700), the
last channel uses a different circuit design optimized for battery
voltage measurement. This channel should not be enabled by default
along with other channels to avoid potential interference and power
efficiency issues.
This ensures optimal power efficiency for normal ADC operations while
maintaining full functionality when battery sensing is needed.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: aspeed: Replace mdelay() with fsleep() for ADC stabilization delay
Billy Tsai [Fri, 20 Mar 2026 05:46:37 +0000 (13:46 +0800)] 
iio: adc: aspeed: Replace mdelay() with fsleep() for ADC stabilization delay

The ADC stabilization delays in compensation mode and battery sensing
mode do not require atomic context. Using mdelay() here results in
unnecessary busy waiting.

Replace mdelay(1) with fsleep(1000) to allow the scheduler to run other
tasks while waiting for the ADC to stabilize.

Also fix a minor typo in the comment ("adc" -> "ADC").

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: Enable multiple consecutive channels based on model data
Billy Tsai [Fri, 20 Mar 2026 05:46:36 +0000 (13:46 +0800)] 
iio: adc: Enable multiple consecutive channels based on model data

Add helpers to generate channel masks and enable multiple ADC channels
according to the device model's channel count.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: adc: Add battery channel definition for ADC
Billy Tsai [Fri, 20 Mar 2026 05:46:35 +0000 (13:46 +0800)] 
iio: adc: Add battery channel definition for ADC

Defines a constant for the battery sensing channel, typically the last
channel of the ADC. Clarifies channel usage and improves code
readability.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ltc2632: add support for LTC2654 DAC family
David Marinovic [Fri, 20 Mar 2026 15:09:48 +0000 (16:09 +0100)] 
iio: dac: ltc2632: add support for LTC2654 DAC family

Add support for the Linear Technology LTC2654 quad DAC family.

The LTC2654 is a 4-channel, 16-/12-bit DAC with SPI interface,
sharing the same 24-bit SPI protocol as the existing LTC2632/
LTC2634/LTC2636 devices supported by this driver.

The 12-bit variants of LTC2654 reuse existing LTC2634 chip_info
structs as they are register-compatible.

Add support for the following variants:
- LTC2654L-16: 16-bit, 2.5V internal reference
- LTC2654L-12: 12-bit, 2.5V internal reference
- LTC2654H-16: 16-bit, 4.096V internal reference
- LTC2654H-12: 12-bit, 4.096V internal reference

Signed-off-by: David Marinovic <david.marinovic@pupin.rs>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
David Marinovic [Fri, 20 Mar 2026 15:09:47 +0000 (16:09 +0100)] 
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings

Add compatible strings for the LTC2654 quad-channel DAC family.

The LTC2654 devices are 4-channel, 16-/12-bit DACs with an internal
reference and SPI interface. They use the same 24-bit SPI command
format as the LTC2632/2634/2636 family.

The 16-bit variants (LTC2654-L16 and LTC2654-H16) require new
compatible strings, as no existing compatibles support 16-bit
resolution.

The 12-bit variants (LTC2654-L12 and LTC2654-H12) are register-
compatible with LTC2634-L12 and LTC2634-H12 respectively, and can
use them as fallback compatibles.

Signed-off-by: David Marinovic <david.marinovic@pupin.rs>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: dac: ltc2632: drop enum and use individual chip_info objects
David Marinovic [Fri, 20 Mar 2026 15:09:46 +0000 (16:09 +0100)] 
iio: dac: ltc2632: drop enum and use individual chip_info objects

Remove the ltc2632_chip_info_tbl[] array and related
ltc2632_supported_device_ids enum used for looking up chip-specific
information. Instead, use separate static const struct
ltc2632_chip_info objects for each supported chip variant.

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: David Marinovic <david.marinovic@pupin.rs>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agostaging: iio: ad9834: use sysfs_emit() and simplify show functions
Gabriel Rondon [Fri, 20 Mar 2026 22:24:24 +0000 (22:24 +0000)] 
staging: iio: ad9834: use sysfs_emit() and simplify show functions

Replace sprintf() with sysfs_emit() in sysfs attribute show functions.
sysfs_emit() is the preferred API for sysfs callbacks as it is aware
of the PAGE_SIZE buffer limit.

Also simplify the wavetype_available show functions by removing
the intermediate string variable and returning directly from each
branch.

Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agostaging: iio: ad5933: use sysfs_emit() in show functions
Gabriel Rondon [Fri, 20 Mar 2026 22:24:23 +0000 (22:24 +0000)] 
staging: iio: ad5933: use sysfs_emit() in show functions

Replace sprintf() with sysfs_emit() in all sysfs attribute show
functions. sysfs_emit() is the preferred API for sysfs callbacks as
it is aware of the PAGE_SIZE buffer limit.

Also remove the unnecessary (int) cast in ad5933_show_frequency()
and use the correct format specifier %llu for the unsigned long long
freqreg variable.

Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: add support for regulators
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:43 +0000 (18:45 +0200)] 
iio: light: vcnl4000: add support for regulators

Add supply, I2C and cathode voltage regulators to the sensor and enable
them. This keeps the sensor powered on even after its only supply shared
by another device shuts down.

Reported-by: Raymond Hackley <raymondhackley@protonmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: remove redundant check for proximity-near-level
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:42 +0000 (18:45 +0200)] 
iio: light: vcnl4000: remove redundant check for proximity-near-level

The data->near_level variable is already assigned 0 during
devm_kzalloc(), therefore checking if the property is present and then
assigning it 0 is redundant. Remove the check for device tree property
and let it fail silently if it is missing or invalid.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: use variables for I2C client and device instances
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:41 +0000 (18:45 +0200)] 
iio: light: vcnl4000: use variables for I2C client and device instances

After moving data->client and client->dev into variables of their own,
replace all instances of data->client and client->dev being used in
vcnl4200_init() and vcnl4000_probe() by the said variables to reduce
clutter.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: remove error messages for trigger and irq
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:40 +0000 (18:45 +0200)] 
iio: light: vcnl4000: remove error messages for trigger and irq

The error code is available in the log after return. In our case,
attaching a triggered buffer can only fail if we are out of memory, as
no other buffer is being attached. Remove duplicate error messages to
reduce noise in dmesg.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: replace mutex_init() with devm_mutex_init()
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:39 +0000 (18:45 +0200)] 
iio: light: vcnl4000: replace mutex_init() with devm_mutex_init()

Replace mutex_init() used across the driver with its device-managed
counterpart, so all assigned mutexes get destroyed.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: move power enablement from init to probe
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:38 +0000 (18:45 +0200)] 
iio: light: vcnl4000: move power enablement from init to probe

Given both vcnl4000_init() and vcnl4200_init() end with
dev->chip_spec->set_power_state(), they can be called once from the
probe to enable the sensors. Move the set_power_state function from init
and call it after init function in probe.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: light: vcnl4000: sort includes by their name
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:37 +0000 (18:45 +0200)] 
iio: light: vcnl4000: sort includes by their name

Sort include headers by file name for better readability.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: light: vcnl4000: add regulators
Erikas Bitovtas [Fri, 20 Mar 2026 16:45:36 +0000 (18:45 +0200)] 
dt-bindings: iio: light: vcnl4000: add regulators

These sensors can accept 2 supplies - one for the sensor and one for IR
LED [1]. Add supply properties for the sensor - 2 for the sensors and
one external, for their open drain interrupt line, to ensure the sensor
is powered on before proceeding with setup.

[1] https://www.vishay.com/docs/84274/vcnl4040.pdf

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: backend: use __free(fwnode_handle) for automatic cleanup
Antoniu Miclaus [Sat, 21 Mar 2026 10:01:51 +0000 (12:01 +0200)] 
iio: backend: use __free(fwnode_handle) for automatic cleanup

Convert __devm_iio_backend_fwnode_get() to use the __free(fwnode_handle)
cleanup attribute for the fwnode_back variable, removing the need for
manual fwnode_handle_put() calls. Move the declaration closer to its
first use, narrowing its scope.

No functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: accel: adxl372: add support for ADXL371
Antoniu Miclaus [Sat, 21 Mar 2026 10:04:59 +0000 (12:04 +0200)] 
iio: accel: adxl372: add support for ADXL371

Add support for the Analog Devices ADXL371, a +-200g 3-axis MEMS
accelerometer sharing the same register map as the ADXL372 but with
different ODR values (320/640/1280/2560/5120 Hz vs 400/800/1600/3200/
6400 Hz), different bandwidth values, and different timer scale
factors for activity/inactivity detection.

Due to a silicon anomaly (er001) causing FIFO data misalignment on
all current ADXL371 silicon, FIFO and triggered buffer support is
disabled for the ADXL371 - only direct mode reads are supported.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: accel: adxl372: factor out buffer and trigger setup
Antoniu Miclaus [Sat, 21 Mar 2026 10:04:58 +0000 (12:04 +0200)] 
iio: accel: adxl372: factor out buffer and trigger setup

Extract the triggered buffer, trigger allocation, and IRQ request
logic from adxl372_probe() into a dedicated adxl372_buffer_setup()
helper. This reduces the probe function complexity and prepares for
conditionally disabling buffer support on device variants with
known FIFO issues.

No functional change intended.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agodt-bindings: iio: accel: adi,adxl372: add ADXL371 compatible
Antoniu Miclaus [Sat, 21 Mar 2026 10:04:57 +0000 (12:04 +0200)] 
dt-bindings: iio: accel: adi,adxl372: add ADXL371 compatible

Add the adi,adxl371 compatible string to the ADXL372 binding. The
ADXL371 is a +-200g 3-axis MEMS accelerometer nearly identical to
the ADXL372 in register layout, differing only in ODR/bandwidth
values, timer scale factors, and a silicon anomaly affecting FIFO
operation.

Update the title and description to reflect both devices.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agoiio: accel: adxl372: introduce chip_info structure
Antoniu Miclaus [Sat, 21 Mar 2026 10:04:56 +0000 (12:04 +0200)] 
iio: accel: adxl372: introduce chip_info structure

Introduce a chip_info structure to parameterize device-specific
properties such as ODR/bandwidth frequency tables, activity/inactivity
timer scale factors, and the maximum ODR value. This refactors the
driver to use chip_info lookups instead of hardcoded values, preparing
the driver to support multiple device variants.

The sampling_frequency and filter_low_pass_3db_frequency available
attributes are switched from custom sysfs callbacks to read_avail()
based handling via info_mask_shared_by_type_available. This enforces
consistent formatting through the IIO framework and makes the values
accessible to in-kernel consumers.

The SPI/I2C probe functions are updated to pass a chip_info pointer
instead of a device name string.

No functional change intended.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2 months agomux: mmio: Zero the allocated memory
Krzysztof Kozlowski [Tue, 17 Mar 2026 15:20:30 +0000 (16:20 +0100)] 
mux: mmio: Zero the allocated memory

Zero the allocated memory in probe() for fields and hardware states
because:

1. The "hardware_states" array is not initialized in the probe, thus
   starting the device with uninitialized memory.  This not a bug,
   because pointed memory will be assigned in suspend callback, however
   it is a discouraged coding practice.
   The "fields" array is initialized shortly further in the probe().

2. Linux kernel convention for safer code encourages using zeroed
   allocations, as expressed in memory-allocation.rst document.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260317152029.274829-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agogpib: ni_usb: drop redundant device reference
Johan Hovold [Thu, 5 Mar 2026 10:27:45 +0000 (11:27 +0100)] 
gpib: ni_usb: drop redundant device reference

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260305102745.12032-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agogpib: agilent_82357a: drop redundant device reference
Johan Hovold [Thu, 5 Mar 2026 10:27:44 +0000 (11:27 +0100)] 
gpib: agilent_82357a: drop redundant device reference

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260305102745.12032-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agogpib: common: change gpib_class to a const struct
Jori Koolstra [Tue, 3 Mar 2026 19:21:20 +0000 (20:21 +0100)] 
gpib: common: change gpib_class to a const struct

The class_create() call has been deprecated in favor of class_register()
as the driver core now allows for a struct class to be in read-only
memory. Change gpib_class to be a const struct class and drop the
class_create() call.

Link: https://lore.kernel.org/all/2023040244-duffel-pushpin-f738@gregkh/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20260303192124.3855792-1-jkoolstra@xs4all.nl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agogpib: remove unnecessary module_init/exit functions
Ethan Nelson-Moore [Sat, 31 Jan 2026 01:41:40 +0000 (17:41 -0800)] 
gpib: remove unnecessary module_init/exit functions

Two GPIB drivers have unnecessary empty module_init and module_exit
functions. Remove them. Note that if a module_init function exists, a
module_exit function must also exist; otherwise, the module cannot be
unloaded.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260131014152.35875-1-enelsonmoore@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agogpib: lpvo_usb: rename driver symbol prefix
Johan Hovold [Thu, 5 Mar 2026 15:17:29 +0000 (16:17 +0100)] 
gpib: lpvo_usb: rename driver symbol prefix

The LPVO driver apparently includes a more or less verbatim copy of the
USB skeleton driver.

Replace the "skel_" symbol prefix with "lpvo_" and rename the "usb_skel"
struct "lpvo" to avoid symbol name clashes and make this a bit more
palatable.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260305151729.10501-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agoMerge 7.0-rc4 into char-misc-next
Greg Kroah-Hartman [Mon, 16 Mar 2026 10:41:58 +0000 (11:41 +0100)] 
Merge 7.0-rc4 into char-misc-next

We need the char/misc/iio fixes in this branch as well to build on top
of.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 months agoLinux 7.0-rc4 v7.0-rc4
Linus Torvalds [Sun, 15 Mar 2026 20:52:05 +0000 (13:52 -0700)] 
Linux 7.0-rc4

2 months agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 15 Mar 2026 20:15:39 +0000 (13:15 -0700)] 
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "The one core change is a re-roll of the tag allocation fix from the
  last pull request that uses the correct goto to unroll all the
  allocations. The remianing fixes are all small ones in drivers"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: hisi_sas: Fix NULL pointer exception during user_scan()
  scsi: qla2xxx: Completely fix fcport double free
  scsi: ufs: core: Fix SError in ufshcd_rtc_work() during UFS suspend
  scsi: core: Fix error handling for scsi_alloc_sdev()

2 months agoMerge tag 'probes-fixes-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 15 Mar 2026 20:08:05 +0000 (13:08 -0700)] 
Merge tag 'probes-fixes-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fixes from Masami Hiramatsu:

 - Avoid crash when rmmod/insmod after ftrace killed

   This fixes a kernel crash caused by kprobes on the symbol in a module
   which is unloaded after ftrace_kill() is called.

 - Remove unneeded warnings from __arm_kprobe_ftrace()

   Remove unneeded WARN messages which can be triggered if the kprobe is
   using ftrace and it fails to enable the ftrace. Since kprobes
   correctly handle such failure, we don't need to warn it.

* tag 'probes-fixes-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  kprobes: Remove unneeded warnings from __arm_kprobe_ftrace()
  kprobes: avoid crash when rmmod/insmod after ftrace killed

2 months agoMerge tag 'bootconfig-fixes-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 15 Mar 2026 19:50:05 +0000 (12:50 -0700)] 
Merge tag 'bootconfig-fixes-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull bootconfig fixes from Masami Hiramatsu:

 - fix off-by-one in xbc_verify_tree() unclosed brace error. This fixes
   a wrong error place in unclosed brace error message

 - check bounds before writing in __xbc_open_brace(). This fixes to
   check the array index before setting array, so that the bootconfig
   can support 16th-depth nested brace correctly

 - fix snprintf truncation check in xbc_node_compose_key_after(). This
   fixes to handle the return value of snprintf() correctly in case of
   the return value == size

 - Add bootconfig tests about braces Add test cases for checking error
   position about unclosed brace and ensuring supporting 16th depth
   nested braces correctly

* tag 'bootconfig-fixes-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  bootconfig: Add bootconfig tests about braces
  lib/bootconfig: fix snprintf truncation check in xbc_node_compose_key_after()
  lib/bootconfig: check bounds before writing in __xbc_open_brace()
  lib/bootconfig: fix off-by-one in xbc_verify_tree() unclosed brace error

2 months agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 15 Mar 2026 19:22:10 +0000 (12:22 -0700)] 
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "Quite a large pull request, partly due to skipping last week and
  therefore having material from ~all submaintainers in this one. About
  a fourth of it is a new selftest, and a couple more changes are large
  in number of files touched (fixing a -Wflex-array-member-not-at-end
  compiler warning) or lines changed (reformatting of a table in the API
  documentation, thanks rST).

  But who am I kidding---it's a lot of commits and there are a lot of
  bugs being fixed here, some of them on the nastier side like the
  RISC-V ones.

  ARM:

   - Correctly handle deactivation of interrupts that were activated
     from LRs. Since EOIcount only denotes deactivation of interrupts
     that are not present in an LR, start EOIcount deactivation walk
     *after* the last irq that made it into an LR

   - Avoid calling into the stubs to probe for ICH_VTR_EL2.TDS when pKVM
     is already enabled -- not only thhis isn't possible (pKVM will
     reject the call), but it is also useless: this can only happen for
     a CPU that has already booted once, and the capability will not
     change

   - Fix a couple of low-severity bugs in our S2 fault handling path,
     affecting the recently introduced LS64 handling and the even more
     esoteric handling of hwpoison in a nested context

   - Address yet another syzkaller finding in the vgic initialisation,
     where we would end-up destroying an uninitialised vgic with nasty
     consequences

   - Address an annoying case of pKVM failing to boot when some of the
     memblock regions that the host is faulting in are not page-aligned

   - Inject some sanity in the NV stage-2 walker by checking the limits
     against the advertised PA size, and correctly report the resulting
     faults

  PPC:

   - Fix a PPC e500 build error due to a long-standing wart that was
     exposed by the recent conversion to kmalloc_obj(); rip out all the
     ugliness that led to the wart

  RISC-V:

   - Prevent speculative out-of-bounds access using array_index_nospec()
     in APLIC interrupt handling, ONE_REG regiser access, AIA CSR
     access, float register access, and PMU counter access

   - Fix potential use-after-free issues in kvm_riscv_gstage_get_leaf(),
     kvm_riscv_aia_aplic_has_attr(), and kvm_riscv_aia_imsic_has_attr()

   - Fix potential null pointer dereference in
     kvm_riscv_vcpu_aia_rmw_topei()

   - Fix off-by-one array access in SBI PMU

   - Skip THP support check during dirty logging

   - Fix error code returned for Smstateen and Ssaia ONE_REG interface

   - Check host Ssaia extension when creating AIA irqchip

  x86:

   - Fix cases where CPUID mitigation features were incorrectly marked
     as available whenever the kernel used scattered feature words for
     them

   - Validate _all_ GVAs, rather than just the first GVA, when
     processing a range of GVAs for Hyper-V's TLB flush hypercalls

   - Fix a brown paper bug in add_atomic_switch_msr()

   - Use hlist_for_each_entry_srcu() when traversing mask_notifier_list,
     to fix a lockdep warning; KVM doesn't hold RCU, just irq_srcu

   - Ensure AVIC VMCB fields are initialized if the VM has an in-kernel
     local APIC (and AVIC is enabled at the module level)

   - Update CR8 write interception when AVIC is (de)activated, to fix a
     bug where the guest can run in perpetuity with the CR8 intercept
     enabled

   - Add a quirk to skip the consistency check on FREEZE_IN_SMM, i.e. to
     allow L1 hypervisors to set FREEZE_IN_SMM. This reverts (by
     default) an unintentional tightening of userspace ABI in 6.17, and
     provides some amount of backwards compatibility with hypervisors
     who want to freeze PMCs on VM-Entry

   - Validate the VMCS/VMCB on return to a nested guest from SMM,
     because either userspace or the guest could stash invalid values in
     memory and trigger the processor's consistency checks

  Generic:

   - Remove a subtle pseudo-overlay of kvm_stats_desc, which, aside from
     being unnecessary and confusing, triggered compiler warnings due to
     -Wflex-array-member-not-at-end

   - Document that vcpu->mutex is take outside of kvm->slots_lock and
     kvm->slots_arch_lock, which is intentional and desirable despite
     being rather unintuitive

  Selftests:

   - Increase the maximum number of NUMA nodes in the guest_memfd
     selftest to 64 (from 8)"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (43 commits)
  KVM: selftests: Verify SEV+ guests can read and write EFER, CR0, CR4, and CR8
  Documentation: kvm: fix formatting of the quirks table
  KVM: x86: clarify leave_smm() return value
  selftests: kvm: add a test that VMX validates controls on RSM
  selftests: kvm: extract common functionality out of smm_test.c
  KVM: SVM: check validity of VMCB controls when returning from SMM
  KVM: VMX: check validity of VMCS controls when returning from SMM
  KVM: SVM: Set/clear CR8 write interception when AVIC is (de)activated
  KVM: SVM: Initialize AVIC VMCB fields if AVIC is enabled with in-kernel APIC
  KVM: x86: Introduce KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM
  KVM: x86: Fix SRCU list traversal in kvm_fire_mask_notifiers()
  KVM: VMX: Fix a wrong MSR update in add_atomic_switch_msr()
  KVM: x86: hyper-v: Validate all GVAs during PV TLB flush
  KVM: x86: synthesize CPUID bits only if CPU capability is set
  KVM: PPC: e500: Rip out "struct tlbe_ref"
  KVM: PPC: e500: Fix build error due to using kmalloc_obj() with wrong type
  KVM: selftests: Increase 'maxnode' for guest_memfd tests
  KVM: arm64: pkvm: Don't reprobe for ICH_VTR_EL2.TDS on CPU hotplug
  KVM: arm64: vgic: Pick EOIcount deactivations from AP-list tail
  KVM: arm64: Remove the redundant ISB in __kvm_at_s1e2()
  ...

2 months agoMerge tag 'powerpc-7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sun, 15 Mar 2026 18:36:11 +0000 (11:36 -0700)] 
Merge tag 'powerpc-7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Madhavan Srinivasan:

 - Fix KUAP warning in VMX usercopy path

 - Fix lockdep warning during PCI enumeration

 - Fix to move CMA reservations to arch_mm_preinit

 - Fix to check current->mm is alive before getting user callchain

Thanks to Aboorva Devarajan, Christophe Leroy (CS GROUP), Dan Horák,
Nicolin Chen, Nilay Shroff, Qiao Zhao, Ritesh Harjani (IBM), Saket Kumar
Bhaskar, Sayali Patil, Shrikanth Hegde, Venkat Rao Bagalkote, and Viktor
Malik.

* tag 'powerpc-7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/iommu: fix lockdep warning during PCI enumeration
  powerpc/selftests/copyloops: extend selftest to exercise __copy_tofrom_user_power7_vmx
  powerpc: fix KUAP warning in VMX usercopy path
  powerpc, perf: Check that current->mm is alive before getting user callchain
  powerpc/mem: Move CMA reservations to arch_mm_preinit

2 months agoMerge tag 'x86-urgent-2026-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 15 Mar 2026 18:26:36 +0000 (11:26 -0700)] 
Merge tag 'x86-urgent-2026-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Ingo Molnar:
 "Work around S2RAM hang if the firmware unexpectedly re-enables the
  x2apic hardware while it was disabled by the kernel.

  Force-disable it again and issue a warning into the syslog"

* tag 'x86-urgent-2026-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic: Disable x2apic on resume if the kernel expects so