Thread (31 messages) 31 messages, 6 authors, 2022-09-22

Re: [PATCH v2 4/4] media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver

From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: 2022-09-19 13:03:50
Also in: linux-devicetree, linux-media, lkml

On Mon, Sep 19, 2022 at 03:49:04PM +0300, Laurent Pinchart wrote:
On Mon, Sep 19, 2022 at 12:39:35PM +0000, Sakari Ailus wrote:
quoted
quoted
+	dev_set_drvdata(dev, tc358746);
+	pm_runtime_set_autosuspend_delay(dev, 200);
+	pm_runtime_use_autosuspend(dev);
+	pm_runtime_enable(dev);
+
+	err = tc358746_init_hw(tc358746);
The driver depends on runtime PM being enabled but does not depend on
CONFIG_PM. I'd suggest to power the device on and only then enable runtime
PM. See
<URL:https://hverkuil.home.xs4all.nl/spec/driver-api/camera-sensor.html#power-management>.
Or simply depend on CONFIG_PM :-)
The user can still disable runtime PM.

I guess few do though. This should be addressed separately from this
driver, it'd be good to be able to deny that. In fact, no-one has ever
probably tested this for a large number of drivers and I guess it exists
just to have a way to disable runtime PM support in drivers that do not
work with it...

-- 
Sakari Ailus

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help