media: dt-bindings: Add regulator to dw9807-vcm

The VCM driver will often be controlled via a regulator,
therefore add in the relevant DT hooks.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2023-01-03 16:41:08 +00:00
committed by Dom Cobley
parent a478034dc4
commit 0ce4299b73
2 changed files with 8 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ properties:
reg:
maxItems: 1
VDD-supply:
description:
Definition of the regulator used as VDD power supply to the driver.
required:
- compatible
- reg

View File

@@ -301,6 +301,10 @@ static void dw9807_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
if (dw9807_dev->vdd)
regulator_unregister_notifier(dw9807_dev->vdd,
&dw9807_dev->notifier);
pm_runtime_disable(&client->dev);
dw9807_subdev_cleanup(dw9807_dev);