From mboxrd@z Thu Jan 1 00:00:00 1970 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 38CAF30E830 for ; Fri, 20 Jun 2025 09:35:09 +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=1750412110; cv=none; b=rspwx0z6mux1LL8kEGNo6tB6vhTf9cztHe029SF7e2yvp4dUlmZHThNgt1b8Si0Mf4i15nZfQO9884Rn+tKo3gXZwqawf9cG/chdowAOQx4hSv64pku1ixzTYNoHucQ5tCL9cQSNDMjHCP5pXFhX3rcFx0hhd+WyyIaZkkRJbH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750412110; c=relaxed/simple; bh=/NBup+FpjsgPUMwtwN+dEas0rUbjoQXBXO6A4fECcnM=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=M6b5xAGameLrgWrZxBTmnOn19Y/3zNGlYA7KBKaVGZKIJ4Bm3C2W0oGxejhleYU1pYKAi4Abgv6kQ6CV8e9cbfOhwALBNSO5PTYsXzPzJLt9mcbEJUkWcXmP6TNZQSiRP8we9bNFXJj8mzj/iAgs9d4mp+coH5Hipk9l0wm0FpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=g6HKx6Wt; 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="g6HKx6Wt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A682C4CEED; Fri, 20 Jun 2025 09:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750412109; bh=/NBup+FpjsgPUMwtwN+dEas0rUbjoQXBXO6A4fECcnM=; h=Subject:To:Cc:From:Date:From; b=g6HKx6Wto86kU3WmTSWnDQo8gWek6fG6QtDc60z3hUaVkLqz18ZgAIK8AlMQDsua4 bg4yHQU57h5P5o6onydwNxzv8vD0lrodGgt63UqA7sur79j0gvciBIax8y08GxcLw6 cYRGZ8lsYW1ju3yhZGxX+j+/FF4TS8iEspHKxyJk= Subject: FAILED: patch "[PATCH] iio: accel: fxls8962af: Fix temperature calculation" failed to apply to 6.6-stable tree To: sean@geanix.com,Jonathan.Cameron@huawei.com,marcelo.schmitt1@gmail.com Cc: From: Date: Fri, 20 Jun 2025 11:34:52 +0200 Message-ID: <2025062052-exceeding-exchange-46e3@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 6.6-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-6.6.y git checkout FETCH_HEAD git cherry-pick -x 16038474e3a0263572f36326ef85057aaf341814 # git commit -s git send-email --to '' --in-reply-to '2025062052-exceeding-exchange-46e3@gregkh' --subject-prefix 'PATCH 6.6.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 = { \