From: Krzysztof Kozlowski <krzk@kernel.org>
To: Val Packett <val@packett.cool>
Cc: Daniel Scally <djrscally@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] media: dt-bindings: i2c: add DW9719/DW9718S VCM binding
Date: Mon, 10 Feb 2025 09:29:25 +0100 [thread overview]
Message-ID: <c2ff273a-bac5-4fa3-8339-ab722c9e63bf@kernel.org> (raw)
In-Reply-To: <20250210082035.8670-2-val@packett.cool>
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@packett.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@gmail.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
next prev parent reply other threads:[~2025-02-10 8:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 8:19 [PATCH 0/5] media: i2c: dw9719: add DT compatible and DW9718S support Val Packett
2025-02-10 8:19 ` [PATCH 1/5] media: dt-bindings: i2c: add DW9719/DW9718S VCM binding Val Packett
2025-02-10 8:29 ` Krzysztof Kozlowski [this message]
2025-02-10 10:36 ` Sakari Ailus
2025-02-10 11:04 ` Krzysztof Kozlowski
2025-07-02 20:31 ` André Apitzsch
2025-02-10 8:19 ` [PATCH 2/5] media: i2c: dw9719: add an of_match_table Val Packett
2025-02-10 8:19 ` [PATCH 3/5] media: i2c: dw9719: increase tOPR wait time Val Packett
2025-02-10 8:19 ` [PATCH 4/5] media: i2c: dw9719: update PM last busy time upon close Val Packett
2025-02-10 8:19 ` [PATCH 5/5] media: i2c: dw9719: add support for dw9718s Val Packett
2025-02-10 10:47 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2ff273a-bac5-4fa3-8339-ab722c9e63bf@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djrscally@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=val@packett.cool \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox