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 53F0F2E6116 for ; Thu, 16 Oct 2025 12:38:37 +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=1760618317; cv=none; b=eDqUX5kYQTc5Cb7KIJ6AqD6V1+7bez1sNkjTaesoVX32+QuviD6agHpR/4TF2D7shuMoGnAzanXVV+r/GPR3SuD5jsCsbb58jsmSEIlC7WeuaJVvn7ECeGplcDVy3n6rKcCp7kBkTRdA00HdsFDEo4MMlFyWFQ8c3zn6NouHZS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760618317; c=relaxed/simple; bh=XS6YYEy/w1LZlyy3BZtKPGdpXhmEofnUwuliTWLlrsc=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=b62mi7EnGZHA+0PsGtoCqEhdGSGVCga6jMjVTzsbeEoZXxEgcVhslkvwDPZiv6SQ+FYhUwx3iSp88nJWOn2rEjWZCUnKwbfhPRsb6SxrsgvkZZhb7cO1n+olqpPiUwtraUSWX+LCRlfVKabgecP8bN8To/x7+ct3OhwdGnIOKmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=O4hTKGT+; 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="O4hTKGT+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9843C4CEF1; Thu, 16 Oct 2025 12:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760618317; bh=XS6YYEy/w1LZlyy3BZtKPGdpXhmEofnUwuliTWLlrsc=; h=Subject:To:Cc:From:Date:From; b=O4hTKGT+SgwkHOMMwT+poA0ocJqQ8YqRwdONSZYFqFDKaYerX/HQCZslymviZr7mO j7L5g72z3APRnYf3Xt/rZX8rFh7PImd23Q9HTCWsxRFrHmO/NGhNmRkPiFUtBSH7rW ZohrwLjft67jNASoD3T6svpIjWAv4X/kl0hLbb2I= Subject: FAILED: patch "[PATCH] iio: imu: inv_icm42600: Avoid configuring if already" failed to apply to 6.1-stable tree To: sean@geanix.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org Cc: From: Date: Thu, 16 Oct 2025 14:38:23 +0200 Message-ID: <2025101623-clarify-manhood-adaa@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.1-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.1.y git checkout FETCH_HEAD git cherry-pick -x 466f7a2fef2a4e426f809f79845a1ec1aeb558f4 # git commit -s git send-email --to '' --in-reply-to '2025101623-clarify-manhood-adaa@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 466f7a2fef2a4e426f809f79845a1ec1aeb558f4 Mon Sep 17 00:00:00 2001 From: Sean Nyekjaer Date: Mon, 1 Sep 2025 09:49:15 +0200 Subject: [PATCH] iio: imu: inv_icm42600: Avoid configuring if already pm_runtime suspended Do as in suspend, skip resume configuration steps if the device is already pm_runtime suspended. This avoids reconfiguring a device that is already in the correct low-power state and ensures that pm_runtime handles the power state transitions properly. Fixes: 31c24c1e93c3 ("iio: imu: inv_icm42600: add core of new inv_icm42600 driver") Signed-off-by: Sean Nyekjaer Link: https://patch.msgid.link/20250901-icm42pmreg-v3-3-ef1336246960@geanix.com Cc: Signed-off-by: Jonathan Cameron diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c index 41b275ecc7e2..ee780f530dc8 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c @@ -837,17 +837,15 @@ static int inv_icm42600_suspend(struct device *dev) struct device *accel_dev; bool wakeup; int accel_conf; - int ret; + int ret = 0; mutex_lock(&st->lock); st->suspended.gyro = st->conf.gyro.mode; st->suspended.accel = st->conf.accel.mode; st->suspended.temp = st->conf.temp_en; - if (pm_runtime_suspended(dev)) { - ret = 0; + if (pm_runtime_suspended(dev)) goto out_unlock; - } /* disable FIFO data streaming */ if (st->fifo.on) { @@ -900,10 +898,13 @@ static int inv_icm42600_resume(struct device *dev) struct inv_icm42600_sensor_state *accel_st = iio_priv(st->indio_accel); struct device *accel_dev; bool wakeup; - int ret; + int ret = 0; mutex_lock(&st->lock); + if (pm_runtime_suspended(dev)) + goto out_unlock; + /* check wakeup capability */ accel_dev = &st->indio_accel->dev; wakeup = st->apex.on && device_may_wakeup(accel_dev);