mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: "Cédric Bellegarde" <cedric.bellegarde@adishatz.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	kieran.bingham@ideasonboard.com, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans Verkuil <hans@jjverkuil.nl>
Subject: Re: [PATCH] media: v4l2-async: link ancillary device runtime PM to the sensor's
Date: Wed, 23 Sep 2026 09:34:54 +0300	[thread overview]
Message-ID: <arNzDkG8JmIWedwF@kekkonen.localdomain> (raw)
In-Reply-To: <20260922-sensors_pm-v1-1-05adf2098b5e@adishatz.org>

Hi Cédric,

On Tue, Sep 22, 2026 at 09:39:12PM +0200, Cédric Bellegarde wrote:
> When a sensor's fwnode references an ancillary lens or flash device
> (e.g. via the "lens-focus" or "flash-leds" properties),
> v4l2_async_create_ancillary_links() already creates a media controller
> link between the two entities, but their runtime PM states remain
> independent.
> 
> This is a problem for devices such as VCM lens actuators, which are
> typically spring-loaded: holding a position away from the spring's
> rest point requires continuous power, and the position is not retained
> once power is cut. If such an actuator is allowed to runtime-suspend
> independently of the sensor, the lens can drift back to its rest
> position during an otherwise active capture session.
> 
> Add V4L2_SUBDEV_FL_PM_LINK to allow an ancillary subdevice to request
> that its runtime PM state be linked to the associated sensor.

Interesting idea.

The IPU bridge has created such a device link between the VCM and the
sensor as on some ACPI systems the VCM is in fact relying on the power
resources of the sensor. But to do this everywhere?

VCMs traditionally have been powered through opening their sub-device node
and that hasn't been exactly neat API-wise. It has been practical still,
AFAIK, as in order to control the VCM, you have to have a sub-device node
open.

This change also does mean that if the sensor is powered, even for
always-on use cases that generally consume very little power, the VCM is
powered on as well. VCMs still typically consume very little power if the
current is configured to zero. Maybe this won't be an issue? Backtracking
from such a change wouldn't be simple, and might not be possible at all.

There wouldn't be a need for a sub-device flag and this would be done for
all VCMs based on the ancillary link.

I wonder what others think.

Cc Laurent and Hans as well.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2026-09-23  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 19:39 Cédric Bellegarde
2026-09-23  6:34 ` Sakari Ailus [this message]
2026-09-23  6:58   ` Kieran Bingham
2026-09-25 11:15     ` 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=arNzDkG8JmIWedwF@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=cedric.bellegarde@adishatz.org \
    --cc=hans@jjverkuil.nl \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=phone-devel@vger.kernel.org \
    /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®