From: Robert Ijtsma via B4 Relay <devnull+robertijtsma.gmail.com@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Jacopo Mondi <jacopo@jmondi.org>,
Todor Tomov <todor.too@gmail.com>
Cc: Antoine Pichot <antoine.pichot@gmail.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Robert Ijtsma <robertijtsma@gmail.com>
Subject: [PATCH v2 2/3] media: i2c: ov7251: use pm_runtime_put_autosuspend()
Date: Sat, 28 Nov 2026 21:41:08 +0100 [thread overview]
Message-ID: <20261128-ov7251-strobe-ncont-v2-2-9428bbb6347e@gmail.com> (raw)
In-Reply-To: <20261128-ov7251-strobe-ncont-v2-0-9428bbb6347e@gmail.com>
From: Robert Ijtsma <robertijtsma@gmail.com>
ov7251_probe() configures runtime PM autosuspend with a 1000 ms delay,
but ov7251_s_ctrl() and ov7251_s_stream() call pm_runtime_put(),
immediately powering down the sensor on stream stop or control writes
instead of keeping it in software standby across the autosuspend window.
Use pm_runtime_put_autosuspend() in ov7251_s_ctrl() and
ov7251_s_stream().
Fixes: 207f4162f1c9 ("media: i2c: Add pm_runtime support to ov7251")
Signed-off-by: Robert Ijtsma <robertijtsma@gmail.com>
---
drivers/media/i2c/ov7251.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c
index 393260929f29..8c6e610586cd 100644
--- a/drivers/media/i2c/ov7251.c
+++ b/drivers/media/i2c/ov7251.c
@@ -905,7 +905,7 @@ static int ov7251_s_ctrl(struct v4l2_ctrl *ctrl)
break;
}
- pm_runtime_put(ov7251->dev);
+ pm_runtime_put_autosuspend(ov7251->dev);
return ret;
}
@@ -1153,14 +1153,14 @@ static int ov7251_s_stream(struct v4l2_subdev *subdev, int enable)
} else {
ret = ov7251_write_reg(ov7251, OV7251_SC_MODE_SELECT,
OV7251_SC_MODE_SELECT_SW_STANDBY);
- pm_runtime_put(ov7251->dev);
+ pm_runtime_put_autosuspend(ov7251->dev);
}
v4l2_subdev_unlock_state(state);
return ret;
err_power_down:
- pm_runtime_put(ov7251->dev);
+ pm_runtime_put_autosuspend(ov7251->dev);
v4l2_subdev_unlock_state(state);
return ret;
}
--
2.56.0
next prev parent reply other threads:[~2026-11-28 20:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 20:41 [PATCH v2 0/3] media: i2c: ov7251: software reset settle, autosuspend, and non-continuous clock Robert Ijtsma via B4 Relay
2026-11-28 20:41 ` [PATCH v2 1/3] media: i2c: ov7251: wait for software reset before global init Robert Ijtsma via B4 Relay
2026-11-28 20:41 ` Robert Ijtsma via B4 Relay [this message]
2026-11-28 20:41 ` [PATCH v2 3/3] media: i2c: ov7251: support non-continuous MIPI clock mode Robert Ijtsma via B4 Relay
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=20261128-ov7251-strobe-ncont-v2-2-9428bbb6347e@gmail.com \
--to=devnull+robertijtsma.gmail.com@kernel.org \
--cc=antoine.pichot@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=jacopo@jmondi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robertijtsma@gmail.com \
--cc=sakari.ailus@linux.intel.com \
--cc=todor.too@gmail.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
all inboxes | Powered by JetHome®