media: i2c: ov5670: Add runtime_pm operations
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>
Thu, 26 Jan 2023 16:59:06 +0000 (17:59 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 6 Feb 2023 07:49:04 +0000 (08:49 +0100)
commit62ab1e32597851450c9d42aab6aaf96f397d0d15
treef4c15ccccacece64a350087546c1ef5c9485509e
parent0a844ab77bd1ee9349e34c2beac049dc4b50bf58
media: i2c: ov5670: Add runtime_pm operations

Implement the runtime resume and suspend routines and install them as
runtime_pm handlers.

While at it rework the probe() sequence in order to enable runtime_pm
before registering the async subdevice.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5670.c