Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04BCC2459E7 for ; Fri, 20 Jun 2025 09:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750412114; cv=none; b=f8gKxareTcsTIEtVR1fJEVPPgOG0njUPkPyjepBYpsbPW5vkW24+u9uvV0mJvP2jKw3dJrI1JC5pGkyEYFP6NCRFgqCYK7aBcAJ/z2iaYjNpiFUikLjFrdTu27N/jvIy0DH3HchNsmRtYOn4VHu+ZEg/1Th0TMYZFvrE6uCCUgs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750412114; c=relaxed/simple; bh=vMFd3OCgJphSdDTRMyLXJlIJEQU8mV86g0AqS50ShRs=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=UN4lg8QA5oGjyxKOu4Pvs2eoxBGSEYgGYowXqz45zn3DfCE0zvK96JoDbrGsh5uCYOy18NdxNdzvaUr2WLZIaMT7N7RtMu/5VlSoly8t9KY2365O7ODVzVwlnufPKveAR21iBs/3DO1KNemkPCsAuLFlXUyRb59CvijVHFsTGGA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gQx71TgC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gQx71TgC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E1C0C4CEE3; Fri, 20 Jun 2025 09:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750412113; bh=vMFd3OCgJphSdDTRMyLXJlIJEQU8mV86g0AqS50ShRs=; h=Subject:To:Cc:From:Date:From; b=gQx71TgCdtVr/79EOjnT1s6NMDj0ANlpLnhjtpFqn/cR+W93pIoI7pzH5X/mr0APf 8meq502XRHU5aT76KKdnr/9fI0RKU8SwWTplnWGjx9jpsPTDBvZVlkhd8U9e9SmMaI 6mS7BWJmA8SambKPIUDXIKEqR71c2H00cmTUICdk= Subject: FAILED: patch "[PATCH] iio: accel: fxls8962af: Fix temperature calculation" failed to apply to 5.10-stable tree To: sean@geanix.com,Jonathan.Cameron@huawei.com,marcelo.schmitt1@gmail.com Cc: From: Date: Fri, 20 Jun 2025 11:34:53 +0200 Message-ID: <2025062053-deafness-gleeful-24ae@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-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 . 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.10.y git checkout FETCH_HEAD git cherry-pick -x 16038474e3a0263572f36326ef85057aaf341814 # git commit -s git send-email --to '' --in-reply-to '2025062053-deafness-gleeful-24ae@gregkh' --subject-prefix 'PATCH 5.10.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 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. Fixes: a3e0b51884ee ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") Cc: stable@vger.kernel.org Reviewed-by: Marcelo Schmitt Signed-off-by: Sean Nyekjaer Link: https://patch.msgid.link/20250505-fxls-v4-1-a38652e21738@geanix.com Signed-off-by: Jonathan Cameron diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index bf1d3923a181..5f5e917f7aa5 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -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 = { \