media: dw9807-vcm: The device is not active initially 30/293330/1
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 4 Jan 2023 10:16:08 +0000 (10:16 +0000)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 22 May 2023 08:02:36 +0000 (17:02 +0900)
commit7f37c3b298932fe5b435e7484e6959a7df16ccdf
treee27add7aed239f7cfac80f8203df592c0e546b6d
parente10ddf2615459b882bf2e0ba1d490c5ab80f04eb
media: dw9807-vcm: The device is not active initially

The probe calls pm_runtime_set_active in the probe, but
has never called dw9807_vcm_resume.
Without a regulator this causes no issue as it just
instructs the VCM to move to the idle position and power
down. With a regulator the pm_runtime_idle calls
dw9807_vcm_suspend, and we get a mismatch in the regulator framework.

Make the active state conditional on having a regulator.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
[sw0312.kim: cherry-pick raspberry pi kernel upstream to support rpi camera module v3]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I3bec010f791f78caf223d74eff9f327a92383988
drivers/media/i2c/dw9807-vcm.c