Re: [PATCH v4 3/3] media: i2c: imx471: Add Sony IMX471 image sensor driver
From: Tarang Raval
Date: Thu Jun 11 2026 - 01:46:07 EST
Hi Sakari,
> On Wed, Jun 10, 2026 at 07:11:39AM +0000, Tarang Raval wrote:
> > > + /* V4L2 controls values will be applied only when power is already up */
> > > + if (!pm_runtime_get_if_in_use(sensor->dev))
> >
> > Use pm_runtime_get_if_active() or update the comment. With pm_runtime_get_if_in_use(),
> > the comment should say "applied only when the device is in use".
>
> Using pm_runtime_get_if_active() would allow more sparing I²C writes, which
> I understand the driver always does in enable_streams(). It's not a bug
> though.
Yes, you are right. My concern is only about the comment, as it does not accurately
describe the behavior when using pm_runtime_get_if_in_use(). That's why I said either
approach is fine, but if pm_runtime_get_if_in_use() is used, the comment should be
updated accordingly.
Best Regards,
Tarang