[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8Q3yXz3OolX/FW8@skv.local>
Date: Sun, 15 Jan 2023 20:28:41 +0300
From: Andrey Skvortsov <andrej.skvortzov@...il.com>
To: Sakari Ailus <sakari.ailus@....fi>
Cc: Steve Longerbeam <slongerbeam@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: ov5640: Update last busy timestamp to reset
autosuspend timer
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@...il.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
Powered by blists - more mailing lists