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 6A3E832860D for ; Thu, 16 Oct 2025 12:38:40 +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=1760618320; cv=none; b=JtcPi3ZecLctOsrsVKUdzrgG4aeJsOHoL/fXmzCLzvSA4OUMb7+9bOdSbzkB1BvK4CwYQwYg3ldrLj2wkCtC5Sv9plub6VPxSxcG7rzJgd5hyWvc6uit1niprd5hWj6wERqpJOWF4Sncw3EVmQd5Y+G4i3eoY0kWo+9Ib040D64= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760618320; c=relaxed/simple; bh=/R5kKiCfSyoNSJfGcz/NvrQHOmudxQOJDR6reevJSs0=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ZAHbygGlnH+thBQPiFTEidPMWYh7vWdikTlfYdUqZ2z3mA+30oR+0oI9Dxn975/5LGiOcWyLY6imNAEIK5gLTHrhSP/t3JCg/vv4Jehy70ECFZpiE00KcUeSKriPpV6K/9pHTBLwst0IweKMUiYEOAa+oprSjaQ48yzrfsQC2p0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sBcWaDU7; 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="sBcWaDU7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 913CEC4CEF1; Thu, 16 Oct 2025 12:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760618319; bh=/R5kKiCfSyoNSJfGcz/NvrQHOmudxQOJDR6reevJSs0=; h=Subject:To:Cc:From:Date:From; b=sBcWaDU7voo1WWUC9dDi6+tA5OliEKyDB+M9q9Yc8b/pAgg+7npO7i7UTOUCWmmD/ OdIwxcdxQLYm2sY81I9YTiRBF/DJ1V4eC5SfV2C5OSFs9Lu6CRsSNOM3kIaY6bg2Hg mN7X+hU5oPGylgKCUriR2yDn/ILGQAlKIskigkME= Subject: FAILED: patch "[PATCH] iio: imu: inv_icm42600: Avoid configuring if already" failed to apply to 5.10-stable tree To: sean@geanix.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org Cc: From: Date: Thu, 16 Oct 2025 14:38:24 +0200 Message-ID: <2025101624-legacy-gab-3e94@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 466f7a2fef2a4e426f809f79845a1ec1aeb558f4 # git commit -s git send-email --to '' --in-reply-to '2025101624-legacy-gab-3e94@gregkh' --subject-prefix 'PATCH 5.10.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);