FAILED: patch "[PATCH] iio: accel: fxls8962af: Fix temperature calculation" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 16038474e3a0263572f36326ef85057aaf341814
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025062052-collar-amuser-47fe@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 16038474e3a0263572f36326ef85057aaf341814 Mon Sep 17 00:00:00 2001
From: Sean Nyekjaer <[email protected]>
Date: Mon, 5 May 2025 21:20:07 +0200
Subject: [PATCH] iio: accel: fxls8962af: Fix temperature calculation
According to spec temperature should be returned in milli degrees Celsius. Add in_temp_scale to calculate from Celsius to milli Celsius.
drivers/iio/accel/fxls8962af-core.c +12 -2
@@ -23,6 +23,7 @@#include <linux/regulator/consumer.h> #include <linux/regmap.h> #include <linux/types.h> +#include <linux/units.h> #include <linux/iio/buffer.h> #include <linux/iio/events.h>
@@ -439,8 +440,16 @@ static int fxls8962af_read_raw(struct iio_dev *indio_dev, *val =FXLS8962AF_TEMP_CENTER_VAL ;return IIO_VAL_INT ;case IIO_CHAN_INFO_SCALE : - *val =0 ; -return fxls8962af_read_full_scale (data, val2); +switch (chan->type) { +case IIO_TEMP : + *val =MILLIDEGREE_PER_DEGREE ; +return IIO_VAL_INT ; +case IIO_ACCEL : + *val =0 ; +return fxls8962af_read_full_scale (data, val2); +default : +return -EINVAL ; + }case IIO_CHAN_INFO_SAMP_FREQ :return fxls8962af_read_samp_freq (data, val, val2);default :
@@ -736,6 +745,7 @@ static const struct iio_event_spec fxls8962af_event[] = { .type = IIO_TEMP, \ .address = FXLS8962AF_TEMP_OUT, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE) | \ BIT(IIO_CHAN_INFO_OFFSET),\ .scan_index = -1, \ .scan_type = { \
PATCH 1/1 iio: accel: fxls8962af: Fix temperature calculation
According to spec temperature should be returned in milli degrees Celsius. Add in_temp_scale to calculate from Celsius to milli Celsius.
--- drivers/iio/accel/fxls8962af-core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/iio/accel/fxls8962af-core.c +12 -2
@@ -20,6 +20,7 @@#include <linux/pm_runtime.h> #include <linux/regulator/consumer.h> #include <linux/regmap.h> +#include <linux/units.h> #include <linux/iio/buffer.h> #include <linux/iio/iio.h>
@@ -416,8 +417,16 @@ static int fxls8962af_read_raw(struct iio_dev *indio_dev, *val =FXLS8962AF_TEMP_CENTER_VAL ;return IIO_VAL_INT ;case IIO_CHAN_INFO_SCALE : - *val =0 ; -return fxls8962af_read_full_scale (data, val2); +switch (chan->type) { +case IIO_TEMP : + *val =MILLIDEGREE_PER_DEGREE ; +return IIO_VAL_INT ; +case IIO_ACCEL : + *val =0 ; +return fxls8962af_read_full_scale (data, val2); +default : +return -EINVAL ; + }case IIO_CHAN_INFO_SAMP_FREQ :return fxls8962af_read_samp_freq (data, val, val2);default :
@@ -494,6 +503,7 @@ static int fxls8962af_set_watermark(struct iio_dev *indio_dev, unsigned val) .type = IIO_TEMP, \ .address = FXLS8962AF_TEMP_OUT, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE) | \ BIT(IIO_CHAN_INFO_OFFSET),\ .scan_index = -1, \ .scan_type = { \
Signature · 1 line
2.49.0
Sasha Levin
maintainerRe: [PATCH 5.15.y] iio: accel: fxls8962af: Fix temperature calculation
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
⚠️ Found matching upstream commit but patch is missing proper reference to it
Found matching upstream commit: 16038474e3a0263572f36326ef85057aaf341814
Status in newer kernel trees:
6.15.y | Present (different SHA1: b0df531da1ef)
6.12.y | Not found
6.6.y | Not found
6.1.y | Not found
Note: The patch differs from the upstream commit:
---
1: 16038474e3a02 ! 1: 8e583bd0770f6 iio: accel: fxls8962af: Fix temperature calculation
@@ Commit message
Signed-off-by: Sean Nyekjaer <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
+ (cherry picked from commit 16038474e3a0263572f36326ef85057aaf341814)
## drivers/iio/accel/fxls8962af-core.c ##
@@
+ #include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/regmap.h>
- #include <linux/types.h>
+#include <linux/units.h>
#include <linux/iio/buffer.h>
- #include <linux/iio/events.h>
+ #include <linux/iio/iio.h>
@@ drivers/iio/accel/fxls8962af-core.c: static int fxls8962af_read_raw(struct iio_dev *indio_dev,
*val = FXLS8962AF_TEMP_CENTER_VAL;
return IIO_VAL_INT;
@@ drivers/iio/accel/fxls8962af-core.c: static int fxls8962af_read_raw(struct iio_d
case IIO_CHAN_INFO_SAMP_FREQ:
return fxls8962af_read_samp_freq(data, val, val2);
default:
-@@ drivers/iio/accel/fxls8962af-core.c: static const struct iio_event_spec fxls8962af_event[] = {
+@@ drivers/iio/accel/fxls8962af-core.c: static int fxls8962af_set_watermark(struct iio_dev *indio_dev, unsigned val)
.type = IIO_TEMP, \
.address = FXLS8962AF_TEMP_OUT, \
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.15.y | Success | Success |