[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2ff273a-bac5-4fa3-8339-ab722c9e63bf@kernel.org>
Date: Mon, 10 Feb 2025 09:29:25 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Val Packett <val@...kett.cool>
Cc: Daniel Scally <djrscally@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Sakari Ailus <sakari.ailus@...ux.intel.com>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] media: dt-bindings: i2c: add DW9719/DW9718S VCM
binding
On 10/02/2025 09:19, Val Packett wrote:
> Add DT bindings for the dw9719 voice coil motor driver, which is getting
> devicetree compatibles added along with DW9718S support.
>
> Also mention the binding file in the corresponding MAINTAINERS entry.
>
> Signed-off-by: Val Packett <val@...kett.cool>
> ---
> .../bindings/media/i2c/dongwoon,dw9719.yaml | 110 ++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 111 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
> new file mode 100644
> index 000000000000..88161038223f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
> @@ -0,0 +1,110 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/i2c/dongwoon,dw9719.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Dongwoon Anatech DW9719 Voice Coil Motor (VCM) DAC
> +
> +maintainers:
> + - Daniel Scally <djrscally@...il.com>
> +
> +description: |-
> + The Dongwoon DW9719/DW9718S is a single 10-bit digital-to-analog converter
> + with 100 mA output current sink capability, designed for linear control of
> + voice coil motors (VCM) in camera lenses. This chip provides a Smart Actuator
> + Control (SAC) mode intended for driving voice coil lenses in camera modules.
> +
> +properties:
> + compatible:
> + enum:
> + - dongwoon,dw9719
> + - dongwoon,dw9718s
Keep alphabetical order.
> +
> + reg:
> + maxItems: 1
> +
> + vdd-supply:
> + description: VDD power supply
> +
> + dongwoon,sac-mode:
> + description: |
> + Slew Rate Control mode to use: direct, LSC (Linear Slope Control) or
> + SAC1-SAC6 (Smart Actuator Control).
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum:
> + - 0 # Direct mode
> + - 1 # LSC mode
> + - 2 # SAC1 mode (operation time# 0.32 x Tvib)
> + - 3 # SAC2 mode (operation time# 0.48 x Tvib)
> + - 4 # SAC3 mode (operation time# 0.72 x Tvib)
> + - 5 # SAC4 mode (operation time# 1.20 x Tvib)
> + - 6 # SAC5 mode (operation time# 1.64 x Tvib)
> + - 7 # SAC6 mode (operation time# 1.88 x Tvib)
> + default: 4
> +
> + dongwoon,vcm-freq:
> + description:
> + The switching frequency for the voice coil motor.
Frequency is in Hertz, so use proper property unit suffix. BTW, you
cannot add incorrect properties post-factum based on already accepted
ACPI driver. This would be nice bypass of review, right?
> + $ref: /schemas/types.yaml#/definitions/uint32
Drop.
minimum/maximum constraints
> +
No reset/powerdown gpios in the hardware?
Missing required block.
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: dongwoon,dw9718s
> + then:
> + properties:
> + dongwoon,vcm-freq:
> + default: 0
> + enum:
> + - 0 # 5.00 MHz
> + - 1 # 3.33 MHz
> + - 2 # 2.50 MHz
> + - 3 # 2.00 MHz
> + - 4 # 1.67 MHz
> + - 5 # 1.43 MHz
> + - 6 # 1.25 MHz
> + - 7 # 1.11 MHz
> + - 8 # 1.00 MHz
> + - 9 # 0.91 MHz
> + - 10 # 0.83 MHz
> + - 11 # 0.77 MHz
> + - 12 # 0.71 MHz
> + - 13 # 0.67 MHz
> + - 14 # 0.63 MHz
> + - 15 # 0.59 MHz
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: dongwoon,dw9719
> + then:
> + properties:
> + dongwoon,vcm-freq:
> + default: 0x60
Why no constraints? Why suddenly hex?
> +
> +required:
> + - compatible
> + - reg
> + - vdd-supply
required always follows properties.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> +
Drop stray blank line
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + vcm_rear: camera-lens@c {
> + compatible = "dongwoon,dw9718s";
> + reg = <0x0c>;
> +
> + vdd-supply = <&pm8937_l17>;
Missing properties, make the example complete.
> + };
> + };
> +
> +...
Best regards,
Krzysztof
Powered by blists - more mailing lists