Skip to contentSkip to conversation

dw9807 binding and driver compatible changes

PATCH In review Sakari Ailus 2 participants 6 messages Mar 30, 2022

Subsystems (4)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

v3 cover dw9807 binding and driver compatible changes

Hello everyone,

These two patches convert dw9807 bindings to json-schema and add a new compatible string to the dw9807-vcm driver in order to support existing ACPI firmware.

since v2:

- Send the correct patches --- v2 patches were from an old branch before v1.

since v1:

- Use stronger language in a comment related to a compatible string for old firmware.

- Remove extra newlines and quotes from bindings.

Sakari Ailus (2):
dt-bindings: Convert Dongwoon dw9807-vcm bindings to json-schema
dw9807-vcm: Add "dongwoon,dw9807" compatible string

 .../media/i2c/dongwoon,dw9807-vcm.txt         |  9 ----
 .../media/i2c/dongwoon,dw9807-vcm.yaml        | 41 +++++++++++++++++++
 drivers/media/i2c/dw9807-vcm.c                |  2 +
 3 files changed, 43 insertions(+), 9 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml
Signature · 1 line
2.30.2
author maintainer
#1 lore raw

PATCH v3 1/2 dt-bindings: Convert Dongwoon dw9807-vcm bindings to json-schema

Convert the old text based dw9807-vcm chip DT bindings to json-schema.

---
 .../media/i2c/dongwoon,dw9807-vcm.txt         |  9 ----
 .../media/i2c/dongwoon,dw9807-vcm.yaml        | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 9 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.txt deleted +0 -9
deleted file mode 100644
index c4701f1eaaf63..0000000000000
@@ -1,9 +0,0 @@
-Dongwoon Anatech DW9807 voice coil lens driver
-
-DW9807 is a 10-bit DAC with current sink capability. It is intended for
-controlling voice coil lenses.
-
-Mandatory properties:
-
-- compatible: "dongwoon,dw9807-vcm"
-- reg: I2C slave address
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
2.30.2
Reviewed-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] dt-bindings: Convert Dongwoon dw9807-vcm bindings to json-schema

Quoted 10 lines · Sakari Ailus

Convert the old text based dw9807-vcm chip DT bindings to json-schema.

---
 .../media/i2c/dongwoon,dw9807-vcm.txt         |  9 ----
 .../media/i2c/dongwoon,dw9807-vcm.yaml        | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 9 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml

Best regards,
Krzysztof

author maintainer
#3 lore raw

Re: [PATCH v3 1/2] dt-bindings: Convert Dongwoon dw9807-vcm bindings to json-schema

Quoted 13 lines · Krzysztof Kozlowski
Quoted 10 lines · Sakari Ailus

Convert the old text based dw9807-vcm chip DT bindings to json-schema.

---
 .../media/i2c/dongwoon,dw9807-vcm.txt         |  9 ----
 .../media/i2c/dongwoon,dw9807-vcm.yaml        | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 9 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807-vcm.yaml
Quoted 1 line

Thanks!

Signature · 1 line
Sakari Ailus
author maintainer
#4 lore raw

PATCH v3 2/2 dw9807-vcm: Add "dongwoon,dw9807" compatible string

In reply to Sakari Ailus

There is firmware out there that uses "dongwoon,dw9807" compatible string that never made it to upstream as-is. Add it to the driver to make it load on such systems.

The chip also has an EEPROM part which is AT24 compatible (for reading purposes) on a separate I²C address. Adding possible support for this in the future is not affected by this change.

---
 drivers/media/i2c/dw9807-vcm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/i2c/dw9807-vcm.c +2 -0
index 95e06f13bc9ed..01c372925a806 100644
@@ -295,6 +295,8 @@ static int  __maybe_unused dw9807_vcm_resume(struct device *dev)
 
 static const struct of_device_id dw9807_of_table[] = {
 	{ .compatible = "dongwoon,dw9807-vcm" },
+	/* Compatibility for older firmware, NEVER USE THIS IN FIRMWARE! */
+	{ .compatible = "dongwoon,dw9807" },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, dw9807_of_table);
Signature · 1 line
2.30.2
Acked-by on v3 2/2
#5 lore raw

Re: [PATCH v3 2/2] dw9807-vcm: Add "dongwoon,dw9807" compatible string

Quoted 4 lines · Sakari Ailus

There is firmware out there that uses "dongwoon,dw9807" compatible string that never made it to upstream as-is. Add it to the driver to make it load on such systems.

Quoted 9 lines

The chip also has an EEPROM part which is AT24 compatible (for reading purposes) on a separate I²C address. Adding possible support for this in the future is not affected by this change.

---
 drivers/media/i2c/dw9807-vcm.c | 2 ++
 1 file changed, 2 insertions(+)

Best regards,
Krzysztof