Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Sean Nyekjaer <sean@geanix.com>
Cc: "Jean-Baptiste Maneyrol" <jean-baptiste.maneyrol@tdk.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] iio: imu: inv_icm42600: Simplify pm_runtime setup
Date: Thu, 10 Jul 2025 15:23:09 +0300	[thread overview]
Message-ID: <aG-wrULBZkMvWZVB@smile.fi.intel.com> (raw)
In-Reply-To: <p5aiunwdx7vcncsmamq3q7orffrfpmcjzwnrgn2vfczs3y26ak@jxgbwf3bduat>

On Thu, Jul 10, 2025 at 10:45:43AM +0000, Sean Nyekjaer wrote:
> On Thu, Jul 10, 2025 at 12:08:40PM +0100, Andy Shevchenko wrote:
> > On Wed, Jul 09, 2025 at 02:35:12PM +0200, Sean Nyekjaer wrote:
> > > Remove unnecessary pm_runtime_get_noresume() and pm_runtime_put()
> > > calls during probe. These are not required when the device is marked
> > > active via pm_runtime_set_active() before enabling pm_runtime with
> > > pm_runtime_enable().
> > 
> > Hmm... What will happen if the autosuspend triggers just before going out from
> > the probe when this change is applied?
> 
> Nothing, as pm_runtime is enabled as the last step in probe.

Note, that PM runtime can be enabled by userspace or disabled.

> > > Also remove the redundant pm_runtime_put_sync() call from the cleanup
> > > path, since the core is not incrementing the usage count beforehand.
> > 
> > This is interesting. Have anybody actually tried to see refcount WARN about this?
> > 
> > > This simplifies the PM setup and avoids manipulating the usage counter
> > > unnecessarily.
> > 
> > > Fixes: 31c24c1e93c3 ("iio: imu: inv_icm42600: add core of new inv_icm42600 driver")
> > > Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> > 
> > This should be the first, or close to the beginning of the series, patch.
> 
> Ok, but help me understand why?

The commits that are marked as Fixes should be easy to backport. When
the series is started with the refactoring, it's not good as potentially
backporting material might (even undeliberately) get a dependency on the
refactoring.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-07-10 12:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 12:35 [PATCH 0/6] iio: imu: inv_icm42600: pm_runtime fixes + various changes Sean Nyekjaer
2025-07-09 12:35 ` [PATCH 1/6] iio: imu: inv_icm42600: Use inv_icm42600_disable_vddio_reg() Sean Nyekjaer
2025-07-13 14:17   ` Jonathan Cameron
2025-07-09 12:35 ` [PATCH 2/6] iio: imu: inv_icm42600: Use devm_regulator_get_enable() for vdd regulator Sean Nyekjaer
2025-07-13 14:19   ` Jonathan Cameron
2025-07-09 12:35 ` [PATCH 3/6] iio: imu: inv_icm42600: Remove redundant error msg on regulator_disable() Sean Nyekjaer
2025-07-10  9:03   ` Andy Shevchenko
2025-07-10 10:47     ` Sean Nyekjaer
2025-07-10 13:07       ` Andy Shevchenko
2025-07-13 14:22   ` Jonathan Cameron
2025-07-09 12:35 ` [PATCH 4/6] iio: imu: inv_icm42600: Simplify pm_runtime setup Sean Nyekjaer
2025-07-10  9:08   ` Andy Shevchenko
2025-07-10 10:45     ` Sean Nyekjaer
2025-07-10 12:23       ` Andy Shevchenko [this message]
2025-07-13 14:28   ` Jonathan Cameron
2025-07-14  7:24     ` Sean Nyekjaer
2025-07-14  7:42       ` Sean Nyekjaer
2025-07-16  8:00         ` Jonathan Cameron
2025-07-18  6:40           ` Sean Nyekjaer
2025-07-19 11:47             ` Jonathan Cameron
2025-07-19 13:32               ` Jonathan Cameron
2025-08-08 13:42                 ` Sean Nyekjaer
2025-07-09 12:35 ` [PATCH 5/6] iio: imu: inv_icm42600: Drop redundant pm_runtime reinitialization in resume Sean Nyekjaer
2025-07-09 12:35 ` [PATCH 6/6] iio: imu: inv_icm42600: Avoid configuring if already pm_runtime suspended Sean Nyekjaer
2025-07-10  9:11   ` Andy Shevchenko
2025-07-13 14:32   ` Jonathan Cameron
2025-07-14 10:15     ` Sean Nyekjaer
2025-07-16  8:06       ` Jonathan Cameron
2025-07-10  9:12 ` [PATCH 0/6] iio: imu: inv_icm42600: pm_runtime fixes + various changes Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aG-wrULBZkMvWZVB@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=sean@geanix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox