media: adv748x: Configure device when resuming from sleep
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sun, 22 Nov 2020 16:36:37 +0000 (17:36 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 3 Dec 2020 06:48:14 +0000 (07:48 +0100)
commit5e67276638765f8dc2327dcf33c0e1f4d5726b7b
treec498e71c9680a0aa08734457b651b7aed26ca958
parent42bff048f4055f2865b77f4cdd8a0b0e209a9397
media: adv748x: Configure device when resuming from sleep

If the device is powered off (for example during system suspend to ram)
the devices loses its configuration, especially the slave i2c mappings
and other configuration set at probe time. This renders the device
unusable and the only way to recover is to unbind and rebind the device
to the driver to run the probe setup again.

Add an early resume callback that reinitializes the device and setup the
slave i2c address mappings and other probe time configuration.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/adv748x/adv748x-core.c