media: imx355: Enable runtime PM before registering async sub-device
authorBingbu Cao <bingbu.cao@intel.com>
Wed, 22 Nov 2023 09:46:06 +0000 (17:46 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 4 Dec 2023 10:21:46 +0000 (11:21 +0100)
commitefa5fe19c0a9199f49e36e1f5242ed5c88da617d
treec78ca45ddd5282380539ccbbe960a017048ab489
parent28e0f37722965fa150af31d82101c95fd21aef60
media: imx355: Enable runtime PM before registering async sub-device

As the sensor device maybe accessible right after its async sub-device is
registered, such as ipu-bridge will try to power up sensor by sensor's
client device's runtime PM from the async notifier callback, if runtime PM
is not enabled, it will fail.

So runtime PM should be ready before its async sub-device is registered
and accessible by others.

Fixes: df0b5c4a7ddd ("media: add imx355 camera sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/imx355.c