01 / KERNEL PATCHES

Linux Kernel
Contributions.

12 PATCHES·9 MERGED·3 IN REVIEW

10 of 10 shown
2026-10-20IIO○ IN REVIEW

iio: proximity: Add Benewake TF-Luna LiDAR driver

LORE.KERNEL.ORG

A new IIO driver for the Benewake TF-Luna, a single-point time-of-flight LiDAR that measures 0.2 m to 8 m over I2C. The sensor runs in trigger mode: each read starts one measurement, waits for the timestamp register to change, then reads distance and signal strength together, because in continuous mode a read can catch the result registers half-updated unless it is synchronised to the data-ready pin. When the signal is too weak the sensor reports a dummy distance of 0, so those readings, and overexposed ones, return -ENODATA instead of a wrong distance. Probe reads the mode register back after setting it, since the sensor silently drops writes it is not ready for. Posted as a 3-patch series with the devicetree binding and the benewake vendor prefix; in v1 review the devicetree maintainer acked the vendor prefix and reviewed the binding.

2026-09-28IIO● MERGED

iio: humidity: am2315: fix negative temperature decoding

LORE.KERNEL.ORG

The AM2315/AM2320 report temperature in sign-magnitude form: bit 15 is the sign and bits 14-0 are the magnitude in 0.1 °C steps. am2315_read_data() stored the raw value straight into an s16, so every reading below zero was decoded as two's complement and came out wildly wrong (-0.1 °C read as -3276.7 °C), on both the read_raw and triggered buffer paths. Fixed by decoding the sign bit before storing the value; positive readings are unchanged. Other, non-kernel drivers for the same sensor hit this bug when it was placed in a freezer. Applied by the IIO maintainer and marked for stable.

2026-07-15IIO● MERGED

iio: light: opt4060: Fix incorrect register name in threshold read error message

LORE.KERNEL.ORG

The second block in opt4060_get_thresholds() reads the HIGH threshold register but its dev_err() failure message reads "Failed to read THRESHOLD_LOW." — copy-pasted from the LOW block immediately above. Purely diagnostic: the return value and side effects are unchanged. Fixed by correcting the string to THRESHOLD_HIGH so dmesg points at the right register on failure. Marked for stable backport.

2026-07-15IIO● MERGED

iio: light: opt4060: Fix pointer type passed to div_u64_rem()

LORE.KERNEL.ORG

opt4060_read_ev_period() passes val2, an int *, to div_u64_rem() which expects a u32 * for its remainder argument. int * and u32 * are incompatible C pointer types. There is no functional impact — sizes are identical on all Linux-supported architectures and the remainder fits the positive range of int — but the type is wrong. Fixed by introducing a local u32 rem, passing its address to div_u64_rem(), and assigning back.

2026-07-15IIO● MERGED

iio: light: opt4060: Reject integration times with a non-zero seconds part

LORE.KERNEL.ORG

write_raw() for IIO_CHAN_INFO_INT_TIME uses IIO_VAL_INT_PLUS_MICRO encoding (val + val2×10⁻⁶), but only examines val2 and never validates val. All legal integration times for this chip have a seconds part of zero, so any non-zero val is by definition invalid — yet it was silently discarded and success returned, programming the wrong time. Fixed by returning -EINVAL early when val is non-zero, matching the IIO idiom used in sibling drivers. Marked for stable backport.

2026-07-13NTFS3● MERGED

fs/ntfs3: prevent positive E_NTFS_NONRESIDENT from reaching writeback error handling

LORE.KERNEL.ORG

attr_data_write_resident() returns ntfs3's private positive status code E_NTFS_NONRESIDENT (556) when a race between is_resident() and attr_make_nonresident() leaves the DATA attribute non-resident mid-writeback. ntfs_writepages() passed that value straight into generic writeback error handling, which expects 0 or a negative errno, so it tripped WARN_ON_ONCE(err > 0) in mapping_set_error() and writeback_iter(): a crash reported by syzbot. Sent as an RFC asking whether the path should fail or retry. The fix translates positive E_NTFS_* codes to -EIO before the error is recorded; in review, -EIO was kept over EFSCORRUPTED because the filesystem stays consistent and no metadata is corrupted. Applied by the ntfs3 maintainer.

2026-07-13IIO● MERGED

iio: light: ltrf216a: fix runtime PM reference leak in error path

LORE.KERNEL.ORG

ltrf216a_get_lux() acquires a runtime PM reference via ltrf216a_set_power_state(data, true) but returns early without releasing it when ltrf216a_read_data() fails. Every failed read leaks one PM reference, eventually preventing the device from autosuspending. Fixed by adding the matching ltrf216a_set_power_state(data, false) in the error branch so the usage count is balanced on both success and failure paths.

2026-07-04STAGING● MERGED

staging: media: ipu7: fix pm_runtime refcount leak in ipu7_resume()

LORE.KERNEL.ORG

A second pm_runtime refcount bug in the IPU7 driver: ipu7_resume() called pm_runtime_get_sync() and returned without restoring the counter on error, leaking the reference on every failed resume. Fixed with pm_runtime_resume_and_get() while preserving the intentional return-0-on-error behaviour — resume callbacks should not propagate failures to the PM core. Part of a two-patch series with the companion fix above.

2026-07-04STAGING● MERGED

staging: media: ipu7: fix pm_runtime refcount leak in ipu7_init_fw_code_region_by_sys()

LORE.KERNEL.ORG

ipu7_init_fw_code_region_by_sys() called pm_runtime_get_sync(), which increments the runtime-PM usage counter even when resume fails. The error path returned without a matching pm_runtime_put(), leaking a reference on every failed resume and eventually preventing the device from ever suspending. Fixed by switching to pm_runtime_resume_and_get(), which drops the reference automatically on failure — consistent with the sibling ipu6 driver.

2026-07-04IIO● MERGEDv7.2

iio: light: al3010: fix incorrect scale for the highest gain range

LORE.KERNEL.ORG

The al3010 ambient light sensor driver encoded the highest gain range scale as {0, 1187200}, but IIO_VAL_INT_PLUS_MICRO requires the micro part to be below 1,000,000. The malformed entry caused writes to return -EINVAL, making the top gain range impossible to select from userspace and reporting a bogus value on read. Fixed by re-encoding as {1, 187200}. Marked for backport to stable.

↳ ALL PATCHES SUBMITTED VIA LORE.KERNEL.ORG · GIT SEND-EMAIL WORKFLOW