From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Steve Longerbeam <slongerbeam@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: ov5640: Update last busy timestamp to reset autosuspend timer
Date: Sun, 15 Jan 2023 20:28:41 +0300 [thread overview]
Message-ID: <Y8Q3yXz3OolX/FW8@skv.local> (raw)
In-Reply-To: <Y8KgGhu0e/+xIfDm@valkosipuli.retiisi.eu>
On 23-01-14 14:29, Sakari Ailus wrote:
> Hi Andrey,
>
> On Sat, Jan 14, 2023 at 02:21:09PM +0300, Andrey Skvortsov wrote:
> > Otherwise autosuspend delay doesn't work and power is cut off
> > immediately as device is freed.
> >
> > Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
> > ---
> > drivers/media/i2c/ov5640.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > index ac35350..f71c0f7 100644
> > --- a/drivers/media/i2c/ov5640.c
> > +++ b/drivers/media/i2c/ov5640.c
> > @@ -1238,6 +1238,7 @@ static int ov5640_write_reg(struct ov5640_dev *sensor, u16 reg, u8 val)
> > return ret;
> > }
> >
> > + pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
> > return 0;
> > }
> >
> > @@ -1305,6 +1306,7 @@ static int ov5640_read_reg(struct ov5640_dev *sensor, u16 reg, u8 *val)
> > }
> >
> > *val = buf[0];
> > + pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
>
> I wouldn't add these calls to register accesses. It's generally relevant
> with autosuspend_put().
>
> The rest seems fine to me.
>
Thanks, Sakari, for the feedback. I wasn't sure about these calls either,
I'll remove them in the v2.
--
Best regards,
Andrey Skvortsov
next prev parent reply other threads:[~2023-01-15 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 11:21 Andrey Skvortsov
2023-01-14 12:29 ` Sakari Ailus
2023-01-14 15:19 ` Jacopo Mondi
2023-01-14 21:49 ` Sakari Ailus
2023-01-15 17:28 ` Andrey Skvortsov [this message]
2023-01-15 17:30 ` [PATCHv2] " Andrey Skvortsov
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=Y8Q3yXz3OolX/FW8@skv.local \
--to=andrej.skvortzov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
--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®