Re: [PATCH] iio: pressure: bmp280: fix bmp580 buffer channel order
From: Andy Shevchenko
Date: Fri Dec 04 2026 - 11:58:55 EST
On Thu, Dec 03, 2026 at 09:45:17PM -0600, Eric Westphal wrote:
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> bmp580_channels[] declares pressure at scan_index 0 and temperature at
> scan_index 1, matching enum bmp280_scan. The original triggered-buffer
> support filled data->sensor_data[] in that order: pressure at offset 0,
> then temperature.
> Commit 872c8014e05e replaced the array with a stack-local scan struct,
> but declared the fields as temperature then pressure. The memcpy
> targets stayed correct, so the pushed buffer has the samples swapped
> relative to scan_index. Userspace therefore sees temperature counts in
> the pressure slot and vice versa.
> On a BMP581 this was observed as buffered values of about 26,800 Pa and
> 98 °C while the sysfs in_*_input attributes correctly reported about
> 100,601 Pa and 26.2 °C.
> Reorder the struct fields to match the scan_index mapping, as the
> bmp280, bme280, bmp380, and bmp180 trigger handlers already do.
> Fixes: 872c8014e05e ("iio: pressure: bmp280: drop sensor_data array")
> Cc: stable@xxxxxxxxxxxxxxx
> # Replace the placeholder Signed-off-by before sending (do not use
> # Eric Westphal unless he is the submitter and agrees to the DCO):
> Signed-off-by: [Your Name] <your.email@xxxxxxxxxxx>
NAK. This is a complete mess. Take your time to understand the process, tools,
and format of how properly send patches to the Linux kernel project.
The main issue, that you haven't even read what you had sent. This is
unacceptable.
--
With Best Regards,
Andy Shevchenko