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 26EB92E36F2 for ; Thu, 16 Oct 2025 12:38:25 +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=1760618306; cv=none; b=WjJljq4AVVtH+A+46dvBzahATuZoR4Z9WfVPgrTiyhxZzgYXFZc3zMlPx3S0megsr1OM2vDiz5VMQxkAj2HfphXVeoRnnVf0nC4y73z0G4635gGwq27NEekDu7+cBEmtG+0AnA8mx/wCrAufTogZIR+88A6T0GvVAdF/tydS5E4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760618306; c=relaxed/simple; bh=W8QVhM+mqOqzOtIFhDtNbaDTO3I/p5/vyi+6KnDx3t8=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ia7SLN/hhRrlYX/4WmqDaIvRA4QcZ8vi1jlVwsxqEFgGGFxqJ6s+0JeIP1lJ85OjwUiRcnB5cGa44NE9EhdsWMTuP34NRR5zFKlEBdaFLLDNnVYpahbmWYwna9sVwdKAqXX/Cti4oW4LgVKwy/P40YZP4x0YCuF3gOLciDuDnBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iGZI2chr; 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="iGZI2chr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F095C4CEF1; Thu, 16 Oct 2025 12:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760618305; bh=W8QVhM+mqOqzOtIFhDtNbaDTO3I/p5/vyi+6KnDx3t8=; h=Subject:To:Cc:From:Date:From; b=iGZI2chruwyq4dsSc5WRrz3RteA5JjPBK/XO+eyxmFO1KiV8jxDt/dQXPGN5JnM1O CsGumuINyH+sxrYpwX/6Lj5Amv6H/7ab2P2tPNiQoQbmu6zdiyHiqyhx43Rs04M8Tw yt6mnsOG+hx2yUCQC1YIqe84cJTIq/KUwQEbYOdY= Subject: FAILED: patch "[PATCH] iio: imu: inv_icm42600: Avoid configuring if already" failed to apply to 6.12-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-attractor-shopper-b67e@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.12-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.12.y git checkout FETCH_HEAD git cherry-pick -x 466f7a2fef2a4e426f809f79845a1ec1aeb558f4 # git commit -s git send-email --to '' --in-reply-to '2025101623-attractor-shopper-b67e@gregkh' --subject-prefix 'PATCH 6.12.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);