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 8A941219EA5 for ; Sat, 23 Aug 2025 15:46:36 +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=1755963996; cv=none; b=J2HrT97jEM4qu48UJTGO/tzxNCayqucgN/Q38n28WLSFwYD/Mwc4hSs2gIWzk+kypmKObrU4JH43b3mDKI/1VgLX6fU94P4VUkAO5XsLfIlSs3hMehW6qn0Gvom6JaonLJsAFCKnm4TK6QXvA8BNL1d/cylzwaGAfuU9oM95LGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755963996; c=relaxed/simple; bh=fMNsT6ltIz6o4WAIu8ls9UFclZY2Wei0qU4LbjFg7yI=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=oGRsHbmffA8XjPLKG2wSssaZhFH8pCJA2b61LOUgeFbeHHkFlt6Cof0E3pl2YBFnBloZAUDdLs4xV6VDRk/mI3wkkIhKWfKqRuHX/pyIwuH3r+N91mSBeXVe69tMKA0D7Ey1rXnfkChs2fVrHrC9i+bgYIRf6JHsizeVOQKL0Ew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XJaHirnm; 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="XJaHirnm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1308DC4CEE7; Sat, 23 Aug 2025 15:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755963996; bh=fMNsT6ltIz6o4WAIu8ls9UFclZY2Wei0qU4LbjFg7yI=; h=Subject:To:Cc:From:Date:From; b=XJaHirnma0SV/t8MlG5FcU/CPWeRIRpOwKnWuQoloBBP6k9z+ogkbibVfgSVz+y76 Gm5F9STA7m61kbT8BJO3BGyU/sx5IUEBCFsMJQw3OZzat9cM0/TwZGOFCvQVwCUthV ud6XCo5sI6Jf1v4xQ1aUKo6y1COyiTkda5xoTSXM= Subject: FAILED: patch "[PATCH] iio: imu: inv_icm42600: change invalid data error to -EBUSY" failed to apply to 5.15-stable tree To: jean-baptiste.maneyrol@tdk.com,Jonathan.Cameron@huawei.com,andy@kernel.org,sean@geanix.com Cc: From: Date: Sat, 23 Aug 2025 17:46:15 +0200 Message-ID: <2025082315-repeater-prefix-b627@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.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 . 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 dfdc31e7ccf3ac1d5ec01d5120c71e14745e3dd8 # git commit -s git send-email --to '' --in-reply-to '2025082315-repeater-prefix-b627@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From dfdc31e7ccf3ac1d5ec01d5120c71e14745e3dd8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Maneyrol Date: Fri, 8 Aug 2025 09:40:10 +0200 Subject: [PATCH] iio: imu: inv_icm42600: change invalid data error to -EBUSY Temperature sensor returns the temperature of the mechanical parts of the chip. If both accel and gyro are off, the temperature sensor is also automatically turned off and returns invalid data. In this case, returning -EBUSY error code is better then -EINVAL and indicates userspace that it needs to retry reading temperature in another context. Fixes: bc3eb0207fb5 ("iio: imu: inv_icm42600: add temperature sensor support") Signed-off-by: Jean-Baptiste Maneyrol Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko Reviewed-by: Sean Nyekjaer Link: https://patch.msgid.link/20250808-inv-icm42600-change-temperature-error-code-v1-1-986fbf63b77d@tdk.com Signed-off-by: Jonathan Cameron diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c index 8b15afca498c..271a4788604a 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c @@ -32,8 +32,12 @@ static int inv_icm42600_temp_read(struct inv_icm42600_state *st, s16 *temp) goto exit; *temp = (s16)be16_to_cpup(raw); + /* + * Temperature data is invalid if both accel and gyro are off. + * Return -EBUSY in this case. + */ if (*temp == INV_ICM42600_DATA_INVALID) - ret = -EINVAL; + ret = -EBUSY; exit: mutex_unlock(&st->lock);