From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
To: Steve Longerbeam <slongerbeam@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Jarrah Gosbell <kernel@undef.tools>,
Arnaud Ferraris <arnaud.ferraris@collabora.com>
Cc: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Subject: [PATCH] media: ov5640: use pm_runtime_force_suspend/resume for system suspend
Date: Fri, 18 Aug 2023 20:34:16 +0300 [thread overview]
Message-ID: <20230818173416.2467832-1-andrej.skvortzov@gmail.com> (raw)
If system was suspended while camera sensor was used, data and
interrupts were still coming from sensor and that caused unstable
system. Sometimes system hanged during a resume. Use
pm_runtime_force_* helpers in order to support system suspend.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
drivers/media/i2c/ov5640.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 5fe85aa2d2ec..8130471caaa6 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3970,6 +3970,8 @@ static void ov5640_remove(struct i2c_client *client)
}
static const struct dev_pm_ops ov5640_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(ov5640_sensor_suspend, ov5640_sensor_resume, NULL)
};
--
2.40.1
next reply other threads:[~2023-08-18 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 17:34 Andrey Skvortsov [this message]
2023-09-13 15:27 ` Sakari Ailus
2023-09-13 20:48 ` Andrey Skvortsov
2023-09-14 8:54 ` Jacopo Mondi
2023-09-14 9:02 ` Laurent Pinchart
2023-09-14 9:55 ` Sakari Ailus
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=20230818173416.2467832-1-andrej.skvortzov@gmail.com \
--to=andrej.skvortzov@gmail.com \
--cc=arnaud.ferraris@collabora.com \
--cc=kernel@undef.tools \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=slongerbeam@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®