difos/target/linux/bcm27xx/patches-6.12/950-0300-media-dt-bindings-Add-regulator-to-dw9807-vcm.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

40 lines
1.3 KiB
Diff

From 2e325695bee15df204caf13d044f3bad428ad58f Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Tue, 3 Jan 2023 16:41:08 +0000
Subject: [PATCH] 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>
---
.../devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml | 4 ++++
drivers/media/i2c/dw9807-vcm.c | 4 ++++
2 files changed, 8 insertions(+)
--- a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml
@@ -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
--- a/drivers/media/i2c/dw9807-vcm.c
+++ b/drivers/media/i2c/dw9807-vcm.c
@@ -301,6 +301,10 @@ static void dw9807_remove(struct i2c_cli
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);